Page 2 of 2

Re: Trouble using Nagios Core to monitor Remote Windows host

Posted: Mon Oct 24, 2016 5:05 pm
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?

Re: Trouble using Nagios Core to monitor Remote Windows host

Posted: Tue Oct 25, 2016 9:30 am
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

Re: Trouble using Nagios Core to monitor Remote Windows host

Posted: Tue Oct 25, 2016 2:49 pm
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!

Re: Trouble using Nagios Core to monitor Remote Windows host

Posted: Wed Oct 26, 2016 9:22 am
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?

Re: Trouble using Nagios Core to monitor Remote Windows host

Posted: Wed Oct 26, 2016 2:01 pm
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.

Re: Trouble using Nagios Core to monitor Remote Windows host

Posted: Wed Oct 26, 2016 2:08 pm
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.