Page 1 of 1

NCPA/Nagios Core - Service Check

Posted: Thu Oct 05, 2017 1:49 pm
by nickanderson82
I am going in circles trying to figure out a way to check if a service is up or down on a windows server. Just for an example I want to monitor if the service wuauserv is up or down
What would I need to add to NCPA passive checks configuration on the server
example: %HOSTNAME%|CPU Usage = /cpu/percent --warning 80 --critical 90 --aggregate avg thats for cpu usgae... what would I add to monitor a service?

Now on the Daemon server what would I add to the NCPA.cfg file
example:
define service {
host_name xxxxxxx
service_description Process Count (do I change that to wuauserv)
check_command check_ncpa!-t xxxxxx -P 5693 -M processes -w 150 -c 200 (What would I add here to just check if it is running/up or down)
max_check_attempts 5
check_interval 5 (how would I change that to a 30 second or minute interval)
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}

Re: NCPA/Nagios Core - Service Check

Posted: Thu Oct 05, 2017 2:23 pm
by kyang
Here is how my service is defined for "wuauserv"

Code: Select all

define service {
    host_name               NCPA Windows
    service_description     wuauserv service
    check_command           check_ncpa!-t 'mytoken1' -P 5693 -M 'services' -q 'service=wuauserv,status=running'
    max_check_attempts      5
    check_interval          5
    retry_interval          1
    check_period            24x7
    notification_interval   60
    notification_period     24x7
    contacts                nagiosadmin
    register                1
}
Checks if the service is running. If it's not running, it will return critical or down.

As for service_description --> You can name it anything you'd like. I just have mine called "wuauserv service"

Let us know if this helps!

Re: NCPA/Nagios Core - Service Check

Posted: Thu Oct 05, 2017 2:53 pm
by nickanderson82
Awesome! That is exactly what I needed. This request is completed.

Re: NCPA/Nagios Core - Service Check

Posted: Thu Oct 05, 2017 2:56 pm
by kyang
Sounds great!

Did you have any more questions? Or are we okay to close this thread?

Re: NCPA/Nagios Core - Service Check

Posted: Thu Oct 05, 2017 3:16 pm
by nickanderson82
Completed