Nagios not able to monitor service monitoring
Nagios not able to monitor service monitoring
Hi Team,
Our Nagios system not able to monitor service monitoring but performance monitoring able to monitor.
Please check screenshot attached. Please help me to resolve the issue.
Remote windows OS version: WIndows 2003 STandard Edition
Below is the command outputs:
[root@01]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxx' -p 'xxxxxx' -m checkcpu -w '90' -c '95'
OK (Sample Period 279 sec) - Average CPU Utilisation 7.40%|'Avg CPU Utilisation'=7.40%;90;95;
[root@01]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxx' -p 'xxxxxx' -m checkservice -a "CaptorSchedulerService"
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
[root@01]#
[root@01]#/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxx' -p 'xxxxxx' -m checkservice -a "CaptorSchedulerService" -t 120 -d
Command Line (v1.6): /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u USER -p PASS -m checkservice -a CaptorSchedulerService -t 120 -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Extra Wmic Arguments specified:--option=client ntlmv2 auth=Yes
Round #1 of 1
QUERY: /usr/bin/wmic '--option=client ntlmv2 auth=Yes' '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.173.134' 'select name, displayname, Started, StartMode, State, Status FROM Win32_Service '
OUTPUT: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [];
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
[root@01]#
Our Nagios system not able to monitor service monitoring but performance monitoring able to monitor.
Please check screenshot attached. Please help me to resolve the issue.
Remote windows OS version: WIndows 2003 STandard Edition
Below is the command outputs:
[root@01]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxx' -p 'xxxxxx' -m checkcpu -w '90' -c '95'
OK (Sample Period 279 sec) - Average CPU Utilisation 7.40%|'Avg CPU Utilisation'=7.40%;90;95;
[root@01]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxx' -p 'xxxxxx' -m checkservice -a "CaptorSchedulerService"
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
[root@01]#
[root@01]#/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxx' -p 'xxxxxx' -m checkservice -a "CaptorSchedulerService" -t 120 -d
Command Line (v1.6): /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u USER -p PASS -m checkservice -a CaptorSchedulerService -t 120 -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Extra Wmic Arguments specified:--option=client ntlmv2 auth=Yes
Round #1 of 1
QUERY: /usr/bin/wmic '--option=client ntlmv2 auth=Yes' '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.173.134' 'select name, displayname, Started, StartMode, State, Status FROM Win32_Service '
OUTPUT: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [];
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
[root@01]#
You do not have the required permissions to view the files attached to this post.
Re: Nagios not able to monitor service monitoring
Try running this command in a admin prompt on the Windows system:
Taken from here:
https://support.nagios.com/forum/viewto ... 35&t=31641
Let us know the results.
Code: Select all
sc sdset SCMANAGER D:(A;;CCLCRPRC;;;AU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)https://support.nagios.com/forum/viewto ... 35&t=31641
Let us know the results.
Re: Nagios not able to monitor service monitoring
Hi Sean,
Welcome back.
We executed the assisted comamnd in Admin prompt but still its not working. Attached for reference.
When i use the "-d" option at the end 0f the command, its giving "Could not find the CLASS: line - an error occurred", please check.
[root@01]#/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxxx' -p 'xxxxxxxx' -m checkservice -a "CaptorSchedulerService" -d
Command Line (v1.6): /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u USER -p PASS -m checkservice -a CaptorSchedulerService -t 500 -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Extra Wmic Arguments specified:--option=client ntlmv2 auth=Yes
Round #1 of 1
QUERY: /usr/bin/wmic '--option=client ntlmv2 auth=Yes' '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.173.134' 'select name, displayname, Started, StartMode, State, Status FROM Win32_Service '
OUTPUT: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [];
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
[root@01]#
Welcome back.
We executed the assisted comamnd in Admin prompt but still its not working. Attached for reference.
When i use the "-d" option at the end 0f the command, its giving "Could not find the CLASS: line - an error occurred", please check.
[root@01]#/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u 'xxxxxx' -p 'xxxxxxxx' -m checkservice -a "CaptorSchedulerService" -d
Command Line (v1.6): /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.134 -u USER -p PASS -m checkservice -a CaptorSchedulerService -t 500 -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Extra Wmic Arguments specified:--option=client ntlmv2 auth=Yes
Round #1 of 1
QUERY: /usr/bin/wmic '--option=client ntlmv2 auth=Yes' '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.173.134' 'select name, displayname, Started, StartMode, State, Status FROM Win32_Service '
OUTPUT: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [];
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
[root@01]#
You do not have the required permissions to view the files attached to this post.
Re: Nagios not able to monitor service monitoring
Thanks!
Are you able to reboot the system? I know the poster said a reboot wasn't required but it might be worth a try.
Try this as well:
First we need to determent the SID of the user wmiagent (substitute your username and SID in each command), from the command prompt enter:
In my output the SID is: S-1-5-21-3412302875-2573218200-1610287713-1007
Now we have the SID, we will use it in the next command to grant the rights to the service control manager. In the following example you will need to replace the SID with the one you obtained from the previous step. From the command prompt enter:
Then test, if still failing, try rebooting and see if that picks it up.
If all that doesn't work, please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:
https://support.nagios.com/tickets/
Are you able to reboot the system? I know the poster said a reboot wasn't required but it might be worth a try.
Try this as well:
First we need to determent the SID of the user wmiagent (substitute your username and SID in each command), from the command prompt enter:
Code: Select all
wmic useraccount where name='wmiagent' get sidNow we have the SID, we will use it in the next command to grant the rights to the service control manager. In the following example you will need to replace the SID with the one you obtained from the previous step. From the command prompt enter:
Code: Select all
sc sdset SCMANAGER D:(A;;CCLCRPRC;;;S-1-5-21-3412302875-2573218200-1610287713-1007)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)If all that doesn't work, please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:
https://support.nagios.com/tickets/
Re: Nagios not able to monitor service monitoring
Hi Sean,
Windows team got approval for rebooting after performing the steps provided by you.
After reboot, RDP was not working and Apllication services didn't come up normally.
Somehow with lot of troubleshooting, windows team made the application processes up.
Now, I see that all performance monitoring and service monitoring is working fine. They are all OK.
But windows team said to go this procedure will may lead to problems as they don't have microssoft support for 2003 servers.
We are looking to install Nagios agent. Nsclient.
Could you please help me which nsclient version we have to install on 2003 and 2008 servers.
Windows team got approval for rebooting after performing the steps provided by you.
After reboot, RDP was not working and Apllication services didn't come up normally.
Somehow with lot of troubleshooting, windows team made the application processes up.
Now, I see that all performance monitoring and service monitoring is working fine. They are all OK.
But windows team said to go this procedure will may lead to problems as they don't have microssoft support for 2003 servers.
We are looking to install Nagios agent. Nsclient.
Could you please help me which nsclient version we have to install on 2003 and 2008 servers.
Re: Nagios not able to monitor service monitoring
Are you are trying to install the 64 bit version of the NSClient++ on 32 bit Windows Server? If so, try installing the 32 bit version of NSClient++ instead.
Have you tried installing the latest? What errors are you getting?
Based on the info here it looks like you should be able to use the latest version:
Have you tried installing the latest? What errors are you getting?
Based on the info here it looks like you should be able to use the latest version:
Code: Select all
https://www.nsclient.org/nsclient/Re: Nagios not able to monitor service monitoring
Okay.I have 32 bit and 64 bit machines aswell.
So, for 2003 ad 2008 servers , latest veriosn of nsclient will work ?
So, for 2003 ad 2008 servers , latest veriosn of nsclient will work ?
Re: Nagios not able to monitor service monitoring
It looks that way from their supported OS list. Just use the 32 bit if you need it.
Re: Nagios not able to monitor service monitoring
Hi Sean,
Thanks for the update.
Have a question, how nsclient works in background.
Is nsclient agent is dependent on WMI in collecting OS performance data ?
Or nsclient uses some other way to collect OS performance data.
Thanks for the update.
Have a question, how nsclient works in background.
Is nsclient agent is dependent on WMI in collecting OS performance data ?
Or nsclient uses some other way to collect OS performance data.
Re: Nagios not able to monitor service monitoring
That I'm not sure of, I don't think it does by default, you can configure it to check WMI:
https://www.claudiokuenzler.com/blog/90 ... pe-windows
Really only the NSClient++ devs would know how their code grabs the info, as we did not write that agent (or maintain the code) you will need to reach out to the nsclient developers for that.
We help with configuration of the client if you use it but we don't control the code. Our agent (NCPA) uses the python psutils module to get that information (which should not use WMI).
https://www.claudiokuenzler.com/blog/90 ... pe-windows
Really only the NSClient++ devs would know how their code grabs the info, as we did not write that agent (or maintain the code) you will need to reach out to the nsclient developers for that.
Code: Select all
https://www.nsclient.org/support/