WMI Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
chillipepper
Posts: 17
Joined: Mon Dec 12, 2016 3:23 pm

WMI Error

Post by chillipepper »

I have a solarwinds NPM that is using the same WMI credentials as the one specified in the Nagios while polling the servers with WMI but nagios keep giving the following error message

WMI Error Output:
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0x80041003 - NT code 0x80041003

https://assets.nagios.com/downloads/nag ... ios-XI.pdf was used as reference. Even tried making the account used by WMI as a local administrator still no workie.
User avatar
ruffsense
Posts: 140
Joined: Thu Apr 11, 2013 12:40 am

Re: WMI Error

Post by ruffsense »

I don't insult, I diagnose.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: WMI Error

Post by mcapra »

Thanks @ruffsense!

That error code usually pertains to permissions related issues with the remote Windows account.

Which version of Windows are you attempting to run these queries against?
Former Nagios employee
https://www.mcapra.com/
chillipepper
Posts: 17
Joined: Mon Dec 12, 2016 3:23 pm

Re: WMI Error

Post by chillipepper »

Running it against a server 2012, i am using the same account to querry via Solarwinds NPM and it runs without any issues.
chillipepper
Posts: 17
Joined: Mon Dec 12, 2016 3:23 pm

Re: WMI Error

Post by chillipepper »

I created a new account and WMI querry ran successfully, but now i cannot add the server and its services via WMI it gives an error message "An error occurred while attempting to apply your configuration to the monitoring engine. Contact your Nagios administrator if this problem persists." There is a post on this forum https://www.google.com/url?sa=t&rct=j&q ... 9868,d.amc that points to the same error message but i'm not authorized to read that forum.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: WMI Error

Post by mcapra »

Can you show us the errors being produced? When the configuration verification fails at the end of the wizard, it will usually tell you where specifically in the verification process something went wrong.
2016_12_21_12_11_11_CCM_Nagios_XI.png
You could also try the following command from the CLI of your Nagios XI machine and see if it produces specific errors:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
chillipepper
Posts: 17
Joined: Mon Dec 12, 2016 3:23 pm

Re: WMI Error

Post by chillipepper »

I don't get that option where it would prompt to show errors on the web gui. When i ran the cli command here's what i got.

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/10.1.22.20.cfg', starting on line 16)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: WMI Error

Post by mcapra »

Can you share the full contents of that file: /usr/local/nagios/etc/services/10.1.22.20.cfg

I'm assuming 10.1.22.20 is the Windows host that we're trying to monitor via WMI?
Former Nagios employee
https://www.mcapra.com/
chillipepper
Posts: 17
Joined: Mon Dec 12, 2016 3:23 pm

Re: WMI Error

Post by chillipepper »

Yes that is the host
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: WMI Error

Post by mcapra »

It seems like the first service definition was created without a service_description, which is a required directive within Nagios Core.

Can you share the outputs of the following commands executed from the CLI of your Nagios XI machine:

Code: Select all

cat /etc/*-release
uname -a
cat /usr/local/nagiosxi/html/includes/configwizards/windowswmi/windowswmi.inc.php | grep "CONFIGWIZARD_VERSION"
Former Nagios employee
https://www.mcapra.com/
Locked