Re: orphaned check and force an imediate check doesn't work
Posted: Fri Jun 11, 2021 9:55 am
Not that I would recommend that but you would need to write the plugin to monitor for orphaned files and do the logic you're trying to check for but the restarting of the service could be done with an event handler, see page 3 of this doc for an example event handler script, instead of the check_nrpe command in the script, just have it restart the gearmand service:
https://assets.nagios.com/downloads/nag ... h-NRPE.pdf
I found this post that is doing it with check_logfiles plugin but I don't think it has all of the logic you're trying to do:
Taken from here:
https://serverfault.com/q/499783
If you'd like us to investigate the system further to see what we can find, pllease create a ticket for this and include a link back to this forum thread so we can get a remote session setup:
https://support.nagios.com/tickets/
Thank you!
https://assets.nagios.com/downloads/nag ... h-NRPE.pdf
I found this post that is doing it with check_logfiles plugin but I don't think it has all of the logic you're trying to do:
Code: Select all
check_logfiles --tag=orphaned --logfile=/usr/local/nagios/var/nagios.log --warningpattern="looks like it was orphaned"https://serverfault.com/q/499783
If you'd like us to investigate the system further to see what we can find, pllease create a ticket for this and include a link back to this forum thread so we can get a remote session setup:
https://support.nagios.com/tickets/
Thank you!