Page 1 of 3

Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 11:00 am
by Noctis0791
Hello Guys,

I have installed nagios3 on Ubuntu 12.04 LTS and I would like to configure it to monitor a remote Windows machine. I’ve been following this guide (http://nagios.sourceforge.net/docs/3_0/ ... ndows.html) but I can’t seem to find this file and directory (/usr/local/nagios/etc/nagios.cfg) so I assume it would be /etc/nagios3/nagios.cfg. I edited this file and uncommented this line (cfg_file=/etc/nagios3/objects/Windows.cfg). Now I'm stuck as I can’t find that Windows.cfg in its described directory. Can you guys tell me what would be the next step?

Thank You,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 11:11 am
by tmcdonald
How did you install it? It looks like a typical apt-get install, and Ubuntu likes to do a lot differently.

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 11:14 am
by Noctis0791
Yes, I just ran these commands.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nagios3

Thanks,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 11:46 am
by slansing
Did you create the Windows.cfg file? You will need to create the configuration and define a host and services under it first.

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 12:03 pm
by Noctis0791
I see, so I need to create them manually. Okay so I just need to put these below lines on my windows.cfg file and specify the host details, right? Can I define multiple host here?

define host{

use windows-server ; Inherit default values from a Windows server template (make sure you keep this line!)

host_name winserver

alias My Windows Server

address 192.168.1.2

}

(some service to check here)

Thank You,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 12:22 pm
by slansing
Yes, in Nagios Core you have to define them manually, as opposed to Nagios XI. I'd recommend looking over the Object Definitions documentation, it will show you plenty of examples and strategies you can use to set your host/service objects up :):

http://nagios.sourceforge.net/docs/3_0/ ... tions.html

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 12:34 pm
by Noctis0791
Cool! :) Okay, I'll do some reading for now. Thanks slansing.

Regards,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Mon Oct 28, 2013 12:55 pm
by slansing
No problem, let us know if you have issues!

Re: Configuring Nagios to monitor windows machine

Posted: Mon Nov 04, 2013 1:51 pm
by Noctis0791
Hi Guys,

I’m trying to follow this guide (http://awaseroot.wordpress.com/2012/11/ ... th-nagios/) to monitor remote Windows machines but I’m testing it first on a local Windows box. However, I’m stuck with this error now (see attached) while running a check on my nagios.cfg, any ideas? I have also attached my commands.cfg and nt.cfg files so you guys could check on them. Let me know if you need further details from me.

Thank You,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Mon Nov 04, 2013 4:44 pm
by sreinhardt
Based on your definitions, you have dupicates in command.cfg and nt.cfg. I would suggest removing the commands from commands.cfg if you would like to separate them out, and leave them in nt.cfg. Alternatively, if you want all your commands in one place, remove nt.cfg from being imported via the main nagios.cfg. Once one is done, try verifying\staring nagios again.