|
When I run command bin/splunk add monitor '/var/mqm/qmgrs/*/errors/AMQERR01.LOG' -follow-only True to monitor specific log file under several directories
e.g.
$ ls /var/mqm/qmgrs/*/errors/AMQERR01.LOG
/var/mqm/qmgrs/QM1/errors/AMQERR01.LOG bin/splunk list monitor returns the following
However despite what list monitor says - I do see the error files I am looking for in Splunk Is this a bug? |
|
Yes, the There is a way you can get this information, but it's in the early stages of development and not as pretty as it could be. If you hit this endpoint with your browser - |
|
Thanks for that. I did find that using the wild card wasn't the smartest thing as the splunkd process used a bunch of CPU - I assume scanning the file system for file matches repeatedly. It would be nice to separate the polling for files to monitor (say only poll for new file every 5,10,60 etc. minutes) versus polling the files themselves. splunk add monitor '/var/mqm/qmgrs/*/errors/AMQERR01.LOG' -follow-only True Anyway I switched and ran this instead ls /var/mqm/qmgrs/*/errors/AMQERR01.LOG | xargs -i -t bin/splunk add monitor {} -follow-only True which adds each found file separately. Cpu dropped dramatically. I will just script to it to run that daily to pick up any new files. |
