Page 1 of 1
static IP address for Nagios?
Posted: Wed Feb 08, 2012 11:21 am
by thuyen
I re-installed the Nagios Core for Ubuntu 11 many times but still couldn't get all the hosts reported into the Nagios interface site. Is it because I don't have a static IP address for my server? (I took the server out from the server room and placed in my office and connected to the internet through a 4 ports switch). I also installed the NSClient++ for a few window machines, and added my current nagios server hosts address in C:\NSClient++\NSC.Ini . Don't know what did I do wrong, would you please advice
thanks
Re: static IP address for Nagios?
Posted: Wed Feb 08, 2012 4:25 pm
by jsmurphy
I have a feeling you might have missed a crucial step... have you configured those hosts in the Nagios configuration files? Or are you just expecting that they will check in to Nagios when the client is installed and just appear?
If it's the later, read this:
http://nagios.sourceforge.net/docs/3_0/ ... ndows.html and pay careful attention to the configuring Nagios section because it doesn't work like you think it does

.
While having a dynamic IP on your Nagios server isn't exactly desirable... it won't stop Nagios gathering information from the hosts.
Re: static IP address for Nagios?
Posted: Fri Feb 10, 2012 3:13 pm
by thuyen
thanks for the resply. I got a few hosts up on the nagios now, however, it shows either "no route to host", "can not fetch information from the server", or "connection refuse". Please take a look at the screen shot file attachment. I checked nsclient++ that installed in those server and also can do pinging from this linux server, but still can't get it fixed. Can you please give me some advice.
thanks again
Re: static IP address for Nagios?
Posted: Sun Feb 12, 2012 5:25 pm
by jsmurphy
For the servers that can't fetch information... if they are windows servers ensure that the windows client NSClient++
http://www.nsclient.org/nscp/ is installed and configured. For Linux servers ensure that NRPE is installed and configured.
Can you ping the server that says no route to host from the linux console? Is it behind a firewall or on a different VLAN?
Re: static IP address for Nagios?
Posted: Mon Feb 20, 2012 10:58 am
by thuyen
thanks for the reply and sorry I was out of the office last week so couldn't response
I did install the NSClient++ for most of the Window server, and edit the config files as the instruction recommended. However, I still got those message for "No route to host" and "couldn't fetch information from server". One thing you caught my attention is the pinging for IP address. I disabled the firewall and re-tried the ping but the hosts are unreachable. I noticed that the the few of the servers are under different VLAN. So, is there anyway to correct and connect to a different VLAN? thanks again
Re: static IP address for Nagios?
Posted: Mon Feb 20, 2012 1:22 pm
by agriffin
This problem is entirely dependent on your particular network infrastructure, but often you can add exceptions to your switch or router to allow communication between different VLANs.
Re: static IP address for Nagios?
Posted: Thu Feb 23, 2012 2:24 pm
by thuyen
I think i'm in 70% completed. However, I have 2 issues. 1) the Linux Ubuntu server can't ping to the router or other servers in the same subnet (other servers are pinging fine). I checked the network interfaces it seems ok (I think), as below:
# The loopback network interface
auto lo
iface lo inet loopback
# primary network interface
auto eth0
iface eth0 inet static
address: 10.192.158.231
netmask: 255.255.255.0
gateway: 10.192.158.1
2) I changed my email address in the contact.cfg but still can't receive the email notification alert in my inbox. please advice
thank you very much
Re: static IP address for Nagios?
Posted: Thu Feb 23, 2012 5:52 pm
by jsmurphy
Well if you can't reach your default gw then there's definitely a network issue and you won't receive emails until that is resolved, can you type ip route on the command prompt and post that? Are you certain it's a /24 subnet? I don't often see /24 on class B addressing. When you ping does it say Network unreachable or Timed out?