I have not had issues reported in the past for this, and the code for the SERVICESTATE has not changed in over two years. so the problem may be syntex or some other error in typing the command.
thing to try/test are:
1) Make sure you are using the correct syntex.
./check_nt -H hostname -v SERVICESTATE -d SHOWALL -l "LanmanServer,Schedule"
your above command does not have the -l but I suppose that was just typing the question and not in your testing.
2) use check_nc_net.c
use the commands enumservice to check what NC_NEt is seeing as the service name.
./check_nt -H HOSTNAME -v ENUMSERVICE –l all,short
will give the short names of the services, while just
./check_nt -H HOSTNAME -v ENUMSERVICE -l all
will give the long names of the services.
all can be substituted with running, stopped, automatic, manual or disabled
also the new verison of check_nc_net allows for a -A switch to overcome the buffer limmit of the ENUM commands.
3) check the Windows Application Log.
nc_net will report to windows application log whenever it fails to process a command like COunter or ServiceState.
4) test the command using the Test console on a windows host or use telnet (using Test console syntex). this bypasses Nagios and check_nt accidenly misinterpriting the command
THings to report for better understanding your problem:
1) the exact command line issues from the UNIX command line with its output and return code.
2) Copy of the Windows Application Log Event (use the copy button from Event Viewer) then remove private info.
3)output from ENUMSERVICE to verify the spelling of the services.
odds are you will find the issue by using the tools and commands above.
please post back with an update.
Tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to use command: check_nt -H address -v SERVICESTATE "service name" with polish letters in "service name" ?
I have not had issues reported in the past for this, and the code for the SERVICESTATE has not changed in over two years. so the problem may be syntex or some other error in typing the command.
thing to try/test are:
1) Make sure you are using the correct syntex.
./check_nt -H hostname -v SERVICESTATE -d SHOWALL -l "LanmanServer,Schedule"
your above command does not have the -l but I suppose that was just typing the question and not in your testing.
2) use check_nc_net.c
use the commands enumservice to check what NC_NEt is seeing as the service name.
./check_nt -H HOSTNAME -v ENUMSERVICE –l all,short
will give the short names of the services, while just
./check_nt -H HOSTNAME -v ENUMSERVICE -l all
will give the long names of the services.
all can be substituted with running, stopped, automatic, manual or disabled
also the new verison of check_nc_net allows for a -A switch to overcome the buffer limmit of the ENUM commands.
3) check the Windows Application Log.
nc_net will report to windows application log whenever it fails to process a command like COunter or ServiceState.
4) test the command using the Test console on a windows host or use telnet (using Test console syntex). this bypasses Nagios and check_nt accidenly misinterpriting the command
THings to report for better understanding your problem:
1) the exact command line issues from the UNIX command line with its output and return code.
2) Copy of the Windows Application Log Event (use the copy button from Event Viewer) then remove private info.
3)output from ENUMSERVICE to verify the spelling of the services.
odds are you will find the issue by using the tools and commands above.
please post back with an update.
Tony