static IP address for Nagios?

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.
Locked
thuyen
Posts: 7
Joined: Tue Jan 17, 2012 12:00 pm

static IP address for Nagios?

Post 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
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: static IP address for Nagios?

Post 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.
thuyen
Posts: 7
Joined: Tue Jan 17, 2012 12:00 pm

Re: static IP address for Nagios?

Post 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
Attachments
Services status detail for hosts
Services status detail for hosts
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: static IP address for Nagios?

Post 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?
thuyen
Posts: 7
Joined: Tue Jan 17, 2012 12:00 pm

Re: static IP address for Nagios?

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: static IP address for Nagios?

Post 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.
thuyen
Posts: 7
Joined: Tue Jan 17, 2012 12:00 pm

Re: static IP address for Nagios?

Post 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
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: static IP address for Nagios?

Post 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?
Locked