Hello all,
I've recently upgraded my backup server to XI 5.2.7. Everything looked great, except my router services are reporting incorrect service information. All other types of services (disk, CPU, memory) are working fine and reporting the correct values for their services. But my bandwidth usage services are all reporting 0 in/0 out. If I run the "test check command", it comes back with "OK", along with 0s for the in/out data:
On backup server (running 5.2.7)
COMMAND: /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/10.16.132.98_1.rrd -w 300,300 -c 500,500 -l M
OUTPUT: OK - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;300;500 out=0Mb/s;300;500
I run the same command on my primary server (running version 2014r2.7), I'm getting correct information:
COMMAND: /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/10.16.132.98_1.rrd -w 300,300 -c 500,500 -l M
OUTPUT: OK - Current BW in: 3.01Mbps Out: 3.42Mbps|in=3.017978Mb/s;300;500 out=3.422293Mb/s;300;500
Looking at the /var/lib/mrtg/10.16.132.98_1.rrd file is showing is hasn't been touched since August of 2015.
backup:
104 -rw-r--r-- 1 root root 105312 Aug 20 2015 10.16.132.98_1.rrd
Where on the production server, it is showing as current:
104 -rw-r--r-- 1 root root 105312 May 6 18:06 10.16.132.98_1.rrd
So my question is, how do I fix this? Is there a way to wipe these old files and copy over the /var/lib/mrtg files from the primary to he backup and restart? Thanks.
Thanks,
Joe
Status information is not showing correct information.
Re: Status information is not showing correct information.
The files in /var/lib/mrtg are updated by the mrtg cron tab file. If that file has an error, that could stop them from updating.
Can you login to the XI server, run the following and post the output?
Can you login to the XI server, run the following and post the output?
Code: Select all
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfgBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Status information is not showing correct information.
Hello. Thanks for the quick reply.
Here's the output:
# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
ERROR: Line 33 (Target[10.25.72.101_1]: 1:[email protected]:::::2) in CFG file (/etc/mrtg/conf.d/10.25.72.101.cfg)
contains a duplicate definition for target[10.25.72.101_1].
First definition is on line 33
Here's the output:
# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
ERROR: Line 33 (Target[10.25.72.101_1]: 1:[email protected]:::::2) in CFG file (/etc/mrtg/conf.d/10.25.72.101.cfg)
contains a duplicate definition for target[10.25.72.101_1].
First definition is on line 33
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Status information is not showing correct information.
Edit this file:
/etc/mrtg/conf.d/10.25.72.101.cfg
Comment out the duplicate entry.
Thats about 37 lines to comment out with a #
There will be two sections that are referencing the same object:
[10.25.72.101_1]
Then re-run the mrtg command to check the configs.
Repeat this process to stop all the errors.
/etc/mrtg/conf.d/10.25.72.101.cfg
Comment out the duplicate entry.
Thats about 37 lines to comment out with a #
There will be two sections that are referencing the same object:
[10.25.72.101_1]
Then re-run the mrtg command to check the configs.
Repeat this process to stop all the errors.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Status information is not showing correct information.
Thanks for that. There were hundreds of files to edit, so this is what I did.
This is the fallback system that I'm preparing to make the primary system once everything is working as expected. It has the same hosts, services, etc as the live system. Both should be identical.
I just sco'd the MRTG files over from the current production server and restarted the system. I ran the check command and all appears to be OK. There are a few remaining files that haven't been updated since I upgraded. Should I remove those? I.E., any file in /var/lib/mrtg that hasn't been touched recently can be removed?
Are there any other implications to what I've done. I.E., is MySQL corrupted from this way of "fixing" it?
Thanks for the help!
This is the fallback system that I'm preparing to make the primary system once everything is working as expected. It has the same hosts, services, etc as the live system. Both should be identical.
I just sco'd the MRTG files over from the current production server and restarted the system. I ran the check command and all appears to be OK. There are a few remaining files that haven't been updated since I upgraded. Should I remove those? I.E., any file in /var/lib/mrtg that hasn't been touched recently can be removed?
Are there any other implications to what I've done. I.E., is MySQL corrupted from this way of "fixing" it?
Thanks for the help!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Status information is not showing correct information.
Yes, they can be deleted, they will be automatically recreated if they are required.[email protected] wrote: I.E., any file in /var/lib/mrtg that hasn't been touched recently can be removed?
It should be fine. MRTG doesn't touch MySQL.[email protected] wrote:Are there any other implications to what I've done. I.E., is MySQL corrupted from this way of "fixing" it?
You might want to backup and restore the databases when you make the switch. This guide shows you how to do this:[email protected] wrote:This is the fallback system that I'm preparing to make the primary system once everything is working as expected. It has the same hosts, services, etc as the live system. Both should be identical.
https://support.nagios.com/kb/article.p ... tegory=106
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.