Trouble using Nagios Core to monitor Remote Windows hosts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Trouble using Nagios Core to monitor Remote Windows host

Post by avandemore »

The command dhclient eth0 should acquire a dynamic IP address from you DHCP server. Just to be sure, what is the output of ip addr?
Previous Nagios employee
jimbo1215
Posts: 7
Joined: Sun Oct 23, 2016 6:02 pm

Re: Trouble using Nagios Core to monitor Remote Windows host

Post by jimbo1215 »

So I fixed the IP issues from yesterday and forwarded the correct ports on the router interface but on the remote hosts I'm still getting 3 OK messages and 4 unknowns as follows

Code: Select all

C:\ Drive Space UNKNOWN 	10-25-2016 10:21:56 	0d 0h 23m 32s 	3/3 	Free disk space : Invalid drive 
	
CPU Load OK 	10-25-2016 10:22:55 	0d 0h 22m 33s 	1/3 	CPU Load 0% (5 min average) 
	
Explorer UNKNOWN 	10-25-2016 10:23:54 	0d 0h 21m 34s 	3/3 	could not fetch information from server 
	
Memory Usage UNKNOWN 	10-25-2016 10:24:52 	0d 0h 20m 36s 	3/3 	could not fetch information from server 
	
NSClient++ Version OK 	10-25-2016 10:15:51 	0d 0h 9m 37s 	1/3 	(No output returned from plugin) 
	
Uptime OK 	10-25-2016 10:16:50 	0d 0h 28m 38s 	1/3 	System Uptime - 0 day(s) 0 hour(s) 0 minute(s) 
	
W3SVC UNKNOWN 	10-25-2016 10:17:48 	0d 0h 7m 40s 	3/3 	could not fetch information from server 
I know the formatting is a bit off but it's readable. Any Ideas
Last edited by dwhitfield on Tue Oct 25, 2016 2:16 pm, edited 1 time in total.
Reason: cleaned up the code block a bit
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Trouble using Nagios Core to monitor Remote Windows host

Post by dwhitfield »

Can you send us your service definitions? You'll find some examples at https://assets.nagios.com/downloads/nag ... ndows.html. I suspect you've already been looking at that document, but in case not. Thanks!
jimbo1215
Posts: 7
Joined: Sun Oct 23, 2016 6:02 pm

Re: Trouble using Nagios Core to monitor Remote Windows host

Post by jimbo1215 »

dwhitfield wrote:Can you send us your service definitions? You'll find some examples at https://assets.nagios.com/downloads/nag ... ndows.html. I suspect you've already been looking at that document, but in case not. Thanks!

My service definitions are just the default ones that come with the windows.cfg. Do I need to edit anything for specific hosts? Sorry I'm having trouble figuring out copying multiple files in the terminal since I haven't used linux in quite some time.

Also, another question. If remote sites are using DHCP to acquire an IP address how do I change my host definitions to account for that? A single IP might be used by a completely different machine once the lease time expires.

One more thing, we aren't using a vpn so I'm assuming we'd be using active checks right? and how tedious would it be in the configs to add multiple new sites?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Trouble using Nagios Core to monitor Remote Windows host

Post by rkennedy »

Please post your /usr/local/nagios/var/objects.cache file for us to look at, as this will have your configuration files after templates as well. It's hard to say what's going on without seeing the problems.
Also, another question. If remote sites are using DHCP to acquire an IP address how do I change my host definitions to account for that? A single IP might be used by a completely different machine once the lease time expires.
You would need to adjust the host definition in the flat file you created for the host. I recommend setting up your systems with static IP's to avoid this. Depending on how your DNS is setup, it may work for this, but a flushing of the DNS cache will be needed should it not refresh to the newest IP.
One more thing, we aren't using a vpn so I'm assuming we'd be using active checks right? and how tedious would it be in the configs to add multiple new sites?
I recommend adding something like this to your nagios.cfg.
cfg_dir=/usr/local/nagios/etc/servers/

Then, create a folder at that path. This will tell Nagios to listen for new configuration files in that directory, and read them on startup. Then, whenever you need to add a new host / service, just copy / replace a configuration file in that folder as needed. It isn't too difficult.
Former Nagios Employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Trouble using Nagios Core to monitor Remote Windows host

Post by dwhitfield »

Additionally, active or passive can work without a VPN depending on a variety of factors. If you were to move to XI, then you could do a 1-hour quickstart with us. Our ability to troubleshoot network stuff is pretty limited with Core.

As for copying multiple files in Linux, one thing you might think about is using ssh -X. I don't know how well this works on Windows, but it works very well Linux to Linux. There's http://x.cygwin.com/ but whether you want to set up cygwin I guess it just depends on whether you want to learn the Linux commandline. I know people use cygwin, but I am not sure specifically about cygwin/X. If you wanted to use ssh -X in this way you'll need thunar, nautalis, or some graphical file browser install on your Linux box. That's out of the scope of our support, but it might get you headed in the right direction. It might be more work than it is worth, but it is something I used when I was learning Linux.
Locked