Monitor Task Scheduler task
Monitor Task Scheduler task
Any way to have nagios monitor a task, if it fails, restart or email?
Re: Monitor Task Scheduler task
Yes,it can..you can configure nagios to monitor it as a service through service definition...https://assets.nagios.com/downloads/nag ... .html#host...
example:
Then you can set up an event handler to perform a specific action command or script when a host or service state changes in your case,the event handler would 'restart or email'. Follow the link below..
https://assets.nagios.com/downloads/nag ... dlers.html
example:
Code: Select all
define service{
host_name linux-server
service_description check-disk-sda1
check_command check-disk!/dev/sda1
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
contact_groups linux-admins
}
https://assets.nagios.com/downloads/nag ... dlers.html
Re: Monitor Task Scheduler task
It's worth noting, if you want to monitor a remote machine, you will likely need to install something like NRPE or NCPA to accomplish this:
https://github.com/NagiosEnterprises/nrpe
https://www.nagios.org/ncpa/help.php
https://github.com/NagiosEnterprises/nrpe
https://www.nagios.org/ncpa/help.php
Former Nagios employee