Moving 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.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Moving Nagios

Post by MPIvan »

Hi all,

I have some problems with the results that nagios gave me ... before all this was happens here is what is it .... I have installed Nagios on Ubuntu server 12.04 LTS on My machine on a Virtual machine (WMware player). After some time i copy/Put that machine on a vmware vcenter. And now it has new ip address ... Before (when it was on my machine) Nagios have address 10.10.10.1 and now it has 192.168.1.5. So when i start the Nagios some of the PC and Router went critical and some of them don't. When i start changing the SNMP on all machines that nagios have monitored i left some Routers not changed. So here is the problem ... for example i have Router named Router6 and on Nagios it shows that everything is ok ... but it is't ... on Router6 i have not changed the SNMP host address ( address that should send the SNMP info, new Nagios address) and dont show as critical .... any idea why ? or how to fix this ... ? Also i remmber that when i move the Nagios from my machine to vCnetter i add a root password and change them now in the moment :) ... info
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Moving Nagios

Post by slansing »

Is that device sending passive checks? IF you do not have check freshness measures enabled it could indefinitely be in an Ok state. Also, if it is the host you are talking about in particular, it could be running an active ping to the router's IP so in fact it would be in an Up state since it can actually resolve the address.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Moving Nagios

Post by MPIvan »

Hi slansing,

i guess Nagios does not make passive checks ( i remember somewhere that i enable that i will double check ) any how here is the results that i came that tell me i dont have enable passive check...
Nagios Stats 3.4.1
Copyright (c) 2003-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 05-11-2012
License: GPL

CURRENT STATUS DATA
------------------------------------------------------
Status File: /usr/local/nagios/var/status.dat
Status File Age: 0d 0h 0m 2s
Status File Version: 3.4.1

Program Running Time: 0d 18h 1m 12s
Nagios PID: 31266
Used/High/Total Command Buffers: 0 / 0 / 4096

Total Services: 1014
Services Checked: 1014
Services Scheduled: 1014
Services Actively Checked: 1014
Services Passively Checked: 0
Total Service State Change: 0.000 / 36.710 / 0.285 %
Active Service Latency: 0.002 / 0.354 / 0.130 sec
Active Service Execution Time: 0.004 / 11.975 / 1.084 sec
Active Service State Change: 0.000 / 36.710 / 0.285 %
Active Services Last 1/5/15/60 min: 35 / 544 / 1014 / 1014
Passive Service Latency: 0.000 / 0.000 / 0.000 sec
Passive Service State Change: 0.000 / 0.000 / 0.000 %
Passive Services Last 1/5/15/60 min: 0 / 0 / 0 / 0
Services Ok/Warn/Unk/Crit: 961 / 36 / 2 / 15
Services Flapping: 7
Services In Downtime: 0

Total Hosts: 157
Hosts Checked: 157
Hosts Scheduled: 157
Hosts Actively Checked: 157
Host Passively Checked: 0
Total Host State Change: 0.000 / 5.070 / 0.032 %
Active Host Latency: 0.000 / 0.299 / 0.160 sec
Active Host Execution Time: 4.011 / 30.018 / 4.233 sec
Active Host State Change: 0.000 / 5.070 / 0.032 %
Active Hosts Last 1/5/15/60 min: 29 / 141 / 157 / 157
Passive Host Latency: 0.000 / 0.000 / 0.000 sec
Passive Host State Change: 0.000 / 0.000 / 0.000 %
Passive Hosts Last 1/5/15/60 min: 0 / 0 / 0 / 0
Hosts Up/Down/Unreach: 155 / 2 / 0
Hosts Flapping: 0
Hosts In Downtime: 0

Active Host Checks Last 1/5/15 min: 47 / 192 / 587
Scheduled: 39 / 173 / 516
On-demand: 8 / 19 / 71
Parallel: 40 / 176 / 522
Serial: 0 / 0 / 0
Cached: 7 / 16 / 65
Passive Host Checks Last 1/5/15 min: 0 / 0 / 0
Active Service Checks Last 1/5/15 min: 30 / 549 / 1717
Scheduled: 30 / 549 / 1717
On-demand: 0 / 0 / 0
Cached: 0 / 0 / 0
Passive Service Checks Last 1/5/15 min: 0 / 0 / 0

External Commands Last 1/5/15 min: 0 / 0 / 0
I have Cisco Router that have not change the ip address of the nagios in snmp conf (example: it was configure like this
snmp-server community ciscocommunity RO
snmp-server host 10.10.0.7 ciscocommunity
when the Nagios was on My machine on vmwaer player... now like i sad it is on vCneter and Nagios have address like 192.168.1.7 but in the router i have not yet change the address for snmp-server it is still 10.10.0.7, so Nagios should tell me that is down but unfortunately it show me that is UP and OK .... how can i fix this ... because it scare me now the thing that i dont know what is rely active and whats not
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Moving Nagios

Post by scottwilkerson »

Can the New Nagios server reach all of the devices via the network (ie, is there firewalls the now block access to some?)

Is the Cisco sending traps to Nagios, or is Nagios polling it?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
IvanAK
Posts: 25
Joined: Sun Mar 17, 2013 9:43 am

Re: Moving Nagios

Post by IvanAK »

I haven't been to work long time but i can tell what was the last situation .... firs of all yes Nagios can reach all the device via the network (tested with ping and whit the check_something scripts). For the lest time that i see ... nagios is sending me messages that some of the cisco are down ( opening my mail ) but i cant see the status at the web page (no outside access and i can't go to work :S medical problems ) but i will be coming as fast as possible with the info how is the situation. As for i can say that is ok ... no one from the directors are calling me :) so i thing is ok for now ...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Moving Nagios

Post by scottwilkerson »

Let us know if there is anything else you need once you return
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Moving Nagios

Post by MPIvan »

Hi all
Hi scottwilkerson,

Yes the Nagios can reach the routers .... the problem here is that on Some ( there 4-5 Routers) that i have not change the IP address of a newly moved Nagios server ( as i say early the newly moved Nagios have a different ip now ) so in cisco the command: " snmp-server host <ip-address> <community> " tell the router to witch host ( in this situation Nagios ) to send the SNMP messages. So as i move the nagios to the vCenter and gave him a new ip address ... on that 4-5 Routers i haven't change the ip address of the newly Nagios. It's still the old ip address of Nagios, and Nagios show me that everything is OK
Router006
FastEthernet0/0
OK 04-29-2013 16:06:33 11d 0h 57m 18s 1/3 OK: Interface FastEthernet0/0 (index 1) is up.
FastEthernet0/1
OK 04-29-2013 16:09:52 7d 4h 33m 59s 1/3 OK: Interface FastEthernet0/1 (index 2) is up.
PING
OK 04-29-2013 16:09:17 0d 7h 9m 34s 1/3 PING OK - Packet loss = 0%, RTA = 7.74 ms
Serial0/0/0
CRITICAL 04-29-2013 16:04:31 11d 0h 53m 20s 3/3 CRITICAL: Interface Serial0/0/0 (index 3) is down.
Uptime
OK 04-29-2013 16:12:35 11d 1h 1m 16s 1/3 SNMP OK - Timeticks: (103534103) 11 days, 23:35:41.03
So what is the problem .... my opinion, i have to change the ip address on the Router to tell that nagios have new ip address, but the problem here is way Nagios wont tell me that there is a problem with this router. So is the problem on nagios or the router, i think both. And how can i see in Cisco Router if it sends the SNMP messages and way, and way Nagios dont show me the error ?

... ... ...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Moving Nagios

Post by scottwilkerson »

If you nagios is setup to receive traps those would be from the router, but as fat as Nagios querying the Interfaces, this would still work even if you change the Nagios IP address because the address of routers haven't been changed.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: Moving Nagios

Post by MPIvan »

Im not sure if we understand each other :) so i will ask ... how can i see if nagios receive traps from that router that i should check ? And i dont know if you understand me but or i dont understand you :)
this would still work even if you change the Nagios IP address because the address of routers haven't been changed.
I dont change the IP of the router, instead i haven't configure the router to send the SNMP and traps to the newly address of Nagios, and Nagios show me that is ok ... can you explain me once again what is causing this problem and how to fixed .... or is there relay a problem :) tnx in advanced and sorry for misunderstanding
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Moving Nagios

Post by abrist »

MPIvan wrote:ow can i see if nagios receive traps from that router that i should check ?
The end of the following document has steps to troubleshoot these type of issues: http://assets.nagios.com/downloads/nagi ... ith_XI.pdf
you can look in the following log file for unconfigured traps:

Code: Select all

vi /var/log/snmptt/snmpttunknown.log
MPIvan wrote:I dont change the IP of the router, instead i haven't configure the router to send the SNMP and traps to the newly address of Nagios, and Nagios show me that is ok ... can you explain me once again what is causing this problem and how to fixed .... or is there relay a problem :) tnx in advanced and sorry for misunderstanding
What are your freshness settings for those hosts that are still reporting "up"? Are you sure these are "traps" and not snmp gets (check_snmp)?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked