I’m totally new to Nagios. I installed Nagios 3 on a Ubuntu machine and it seems to work fine except when I deal with Windows services - the ones I’ve tried so far report something like this:
I don’t really know what’s the problem, but after trying the check_nt command, I found out the correct syntax was:
check_nt -H sw0129 -v SERVICESTATE -l “IIS Admin” -d “SHOWALL”
Also, when you want to do a check, you should separate all your arguments. So, instead of writing “-d SHOWALL -l IIS Admin”, you should write “!-d!SHOWALL!-l!IIS Admin”
hence, your check_command should maybe be:
check_command check_nt!-v!SERVICESTATE!-d!SHOWALL!-l!IIS Admin!
with your command check_nt is defined as:
define command{
command_name check_nt
command_line $USER1$/check_nt “$ARG1$” “$ARG2$” “$ARG3$” “$ARG4$” “$ARG5$” “$ARG6$”
}
You can also open the services.msc and go to the desired service that you want to monitor. Right-click and open properties. The first thing that you see on the top is the exact service name. I prefer this instead of opening the registry.
Yes I know that’s the quicker way but when you get to a service like Network location awareness the process is ‘C:\WINDOWS\system32\svchost.exe -k netsvcs’ how would you add that in nagios? you can’t so you have to do it through the registery