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.
... View more