Configuring Nagios to monitor windows machine
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Configuring Nagios to monitor windows machine
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
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
How did you install it? It looks like a typical apt-get install, and Ubuntu likes to do a lot differently.
Former Nagios employee
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
Yes, I just ran these commands.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nagios3
Thanks,
Arnel
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nagios3
Thanks,
Arnel
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
Did you create the Windows.cfg file? You will need to create the configuration and define a host and services under it first.
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
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
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
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
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
http://nagios.sourceforge.net/docs/3_0/ ... tions.html
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
Cool!
Okay, I'll do some reading for now. Thanks slansing.
Regards,
Arnel
Regards,
Arnel
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
No problem, let us know if you have issues!
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
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
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
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Configuring Nagios to monitor windows machine
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.