mrtg.cfg contains NO entries now

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

mrtg.cfg contains NO entries now

Post by tecnalb »

Upgrade to 2014R1.0 blew away my MRTG file. Is this something new?

Boy, this was not a good idea!!!


CentOS 5.7 x64
physical box using the xi-xxxxx.tar.gz

My graphs seem to be working. Maybe I missed a note or something.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: mrtg.cfg contains NO entries now

Post by tecnalb »

Added note. While your upgrade scripts migrate mrtg, from what i can tell, it left about half or more of my hosts without migration.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: mrtg.cfg contains NO entries now

Post by sreinhardt »

The mrtg config should no longer store anything other than the directory for the other configurations as individual devices. Could you provide an example of one that failed please? To my knowledge there shouldn't be any issues with the migration script in particular, but there is always a chance with different devices and configurations.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: mrtg.cfg contains NO entries now

Post by tecnalb »

It looks like you now use a conf.d directory to store the individual files, for each device. Is that true?

However, my main switch was not migrated at all, IOW, there was no x.x.x.x.cfg created for that device in conf.d

I am also noticing all my graphs do not seem to be indicating any traffic, and even my ping RTA graphs for all devices are now indicating nothing. Yet I am not getting alerts. So I guess the graphing piece has gone south on this upgrade :)
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: mrtg.cfg contains NO entries now

Post by sreinhardt »

You are correct that they are now in the conf.d directory. Have you tried grepping the configs, it is entirely possible that it was merged with another config, although slightly strange that it would do that.

Code: Select all

grep -Ri 'x.x.x.x' /etc/mrtg/conf.d/
Also I do believe that you should have an mrtg.confg.bk in /etc/mrtg/ still, is that true and does it have your device listed in there?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: mrtg.cfg contains NO entries now

Post by tecnalb »

I did, and no they did not show up in any other file. I manually transferred the data. I'm waiting to see... but as I mentioned, my ping charts and everything are not displaying now either.

Charting is just not working at all now.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: mrtg.cfg contains NO entries now

Post by tecnalb »

Oh, your upgrade did place a bunch of entries in another single config.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: mrtg.cfg contains NO entries now

Post by tecnalb »

Just an FYI, you guys may wish to look at what your update script is keying off of. Over the years I have had to make various manual entries in my mrtg.cfg file, even with your assistance and input. Well, those entries did not always have headers, etc in place. I believe this is where your update script fails. I have had several device cfg files that contained multiple IP addressing configurations for my devices, after upgrading. While, technically it works, it makes spaghetti out of the process, and now I'm combing thru every single device config looking for other devices configurations.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mrtg.cfg contains NO entries now

Post by lmiltchev »

Keeping a small, error-free mrtg.cfg file, and placing multiple configs in the "/etc/mrtg/conf.d/" directory is a good thing in the majority of the cases. It would be easier to rerun the wizard, in cases when you want to add ports (or some ports were administratively down during the first scan). If the past, you needed to remove all of the "old" entries from the "mrtg.cfg" file, which could be a tedious process. Having separate files, and not having to dig through one huge file could save you some valuable time. It would also be easier for us (on the support side of things).
Be sure to check out our Knowledgebase for helpful articles and solutions!
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: mrtg.cfg contains NO entries now

Post by tecnalb »

Hello,

I have this issue resolved. I understand why you perform the migration, but I think the method needs review.

I also wanted to let you know that when you performed the migration, that you did not backup the original mrtg.cfg (yes, technically it was up to me, and I did). You created an mrtg.cfg.orig, but it was an empty default. My thought was that you could have easily used that file to store the customer's original, before blowing it away.

-j
Locked