Setting up my first Nagios Server.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
JoseLopez
Posts: 10
Joined: Thu Jul 17, 2014 2:33 pm

Setting up my first Nagios Server.

Post by JoseLopez »

Good Afternoon All,

I am new to Nagios and I have been trying to setup a check proof of concepts so that I can then apply it throughout my organization. Currently I have an issue with a Windows 2003 box when trying to pull the IIS Web Server Service info and the SQL Server info via WMI.

This box does have IIS on and publishing a few sites and it does have SQL Express on and working. However I am given the following error for both service checks:

"UNKNOWN - The WMI query had problems. The target host (xxx.xxx.xxx.xxx) might not have the required WMI classes installed. This can happen, for example, if you are trying to checkiis but IIS is not installed. It can also happen if your version of Windows d"

More deatils give the following:

"
[wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0x80041001 - NT code 0x80041001
"

I have multiple different items reporting back with no problems. I followed the setup guide to set this up and I am using an AD Service account that doesn't not have Admin Rights on the box, but does have the appropriate (DCOM, Perfomance Log and Performance Monitor) rights as per the setup guide.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setting up my first Nagios Server.

Post by abrist »

It could be an issue with the counter, or you may have further restrictions on the IIS services. Could you post the full commands that are failing, and one that works fine?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JoseLopez
Posts: 10
Joined: Thu Jul 17, 2014 2:33 pm

Re: Setting up my first Nagios Server.

Post by JoseLopez »

I'm new to this, so if you could give me a location of what you want me to be provide I will do it. Just not sure I know what you are asking for, it's the default check done when you run the wizard.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Setting up my first Nagios Server.

Post by Box293 »

I've seen this problem, it occurs when you are using a non administrative user. I found the following steps from http://edcint.co.nz/checkwmiplus/?q=con ... owsfromop5 fixed the problem:
Service Control Manager

For op5 Monitor to query a windows server for service information we need to give non-admin users access to the SCM.

First we need to determent the SID of the WMI-user, do this by opening a Command prompt in Windows and enter:

wmic useraccount where name='wmiuser' get sid

You will get the user SID, it will look something like: S-1-5-21-831218587-1591663529-496921927-1002

Now we have to give rights for the wmi-user to access scmanger remotely, run the following command and replace <SID> with the SID you got from the command above.

sc sdset SCMANAGER D:(A;;CCLCRPRC;;;<SID>)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)

Alternativly you can replace <SID> with AU (Authenticated Users) if you don’t want to limit access only to one user.
NOTE: You will need to change wmiuser to wmiagent (or whatever username you chose to create).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
JoseLopez
Posts: 10
Joined: Thu Jul 17, 2014 2:33 pm

Re: Setting up my first Nagios Server.

Post by JoseLopez »

You are awesome! It worked right after putting that is. Just a note you do not have to put in the <domain> / <username> just the <username> worked to get the SID (incase anyone sees this in the future).

Issue Resolved!

Thanks!
Locked