I thought that it might be better to post this in a seperate thread rather than having two subjects mixed into the one thread.
My problem is that when I use the command template for CHECK_NT to monitor the state of a service on a remote system, regardless of its actual state it always reports as being down. I have run the check_nt command from the command line and get a correct report of the service state. Through nagios it always fails. I created a specific check in the COMMANDS.CFG file and the service gets reported correctly.
My service check definition is:
service_description Microsoft Exchange IMAP
check_command check_nt!SERVICESTATE!-d SHOWALL -l IMAP4Svc
Now I have also created a specific command to run the check in the COMMANDS.CFG file:
command_line $USER1$/check_nt -H aserver -p 12489 -v SERVICESTATE -d SHOWALL -l imap4svc
When I reference my above command this works correctly. It appears that the issue maybe with the passing of the IMAP4Svc variable. But are the any situations where nagios might not handle having the word IMAP4 correctly in the service name. The reason I pose the question is that if I reference the service by display name (which also contains the "IMAP4" word) is still will not see the service state correctly through nagios.
Any help would be greatly appreciated.