Updating Units in RRD graphs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Updating Units in RRD graphs

Post by CFT6Server »

Looks like the unit of measurement was set incorrectly in some of our network bandwidth checks. How do we update the unit, say from max speed of 100Mb to 1Gb and retain existing RRD data and have the graph shows the correct unit?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Updating Units in RRD graphs

Post by jdalrymple »

I don't think changing units (multipliers more properly) is going to be possible. Changing thresholds is pretty straightforward - is that all you're looking to do?

I wish multipliers weren't added to the perfdata to begin with :( the graphers know how to handle multipliers for you, basic units (bytes in this case) are best. Now what you'll end up with - let's say you have kilobytes/sec as your listed units, if you go up into the megabytes/sec range you'll end up with Kkilobytes/sec.

At this point I'm mostly just whining - I'm going to discuss ripping out the multipliers with the devs.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Updating Units in RRD graphs

Post by tmcdonald »

That's a fairly tricky question to answer. The way the bandwidth checks are made, MRTG actually does the checking in the backend and writes out the results to its own RRD. Then when Nagios checks, we pull data from the MRTG RRD, and then store the results in our own. So in that regard, you would need to make the adjustments in the MRTG config for the bits per second, adjust the M to a G in the CCM for that service, and then the hard part: Trying to get the data properly converted.

Speaking truthfully, I don't off the top of my head know of a built-in way to make this conversion in-place. That would require essentially copying the RRD data out, multiplying it by a factor, then writing it back into a new RRD, and this would need to be done for both the MRTG and Nagios RRDs. I will leave this open for comment from others, but I don't have an answer that you will like unless you like "Blow away the RRDs and start over with correct values from the start" as an answer.
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Updating Units in RRD graphs

Post by Box293 »

I believe the data in the RRD file will be OK after changing the MRTG config file, mainly because the unit is specified in the performance data:

Code: Select all

in=.090991Mb/s;15;20 out=.013843Mb/s;15;20
Hence when the performance data is inserted into the RRD's PNP should take this into account. I could be wrong though.

IF your device was firewall1.box293.local with port 1
I believe you need to change:
/etc/mrtg/conf.d/firewall1.box293.local.cfg
MaxBytes[firewall1.box293.local_1]: 125000000
That number at the end is 125.0 MBytes/s
Use this handy tool:
http://www.dr-lex.be/info-stuff/bytecalc.html

Then in CCM edit the service for this port and change $ARG4$ to your unit type, for example M to G.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Updating Units in RRD graphs

Post by CFT6Server »

I attempted to update units from Mb/s to Gbps and it doesn't seem to like it much. I think you are correct in that it needs to start at MRTG's level on how that data is captured. For now even though it isn't a good answer, any ports that have the wrong measurements to be redone at this point. The challenge would also be updating the MRTG file manually to update these ports.

Perhaps this could be something that can be worked on in the long run to help improve Nagios and have it interacts with MRTG and get performance data from network ports.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Updating Units in RRD graphs

Post by tmcdonald »

I can talk to the devs and see what can be done about the MRTG editing. I know it's been on our radar for a while to streamline this process.
Former Nagios employee
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Updating Units in RRD graphs

Post by CFT6Server »

Thanks. Also another item I noticed is that the wizard detects the ports and creates a check, but the port is actually down and we end up with a bunch of red to start. Not sure if the port status detection can be improved as well.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Updating Units in RRD graphs

Post by tmcdonald »

We could probably do a pre-check using a non-MRTG method ahead of time. I'll add that to the discussion.
Former Nagios employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Updating Units in RRD graphs

Post by tmcdonald »

Just as an update, I got word that the easiest thing to do would be re-run the wizard using the correct UOM. The wizard should configure the plugin to handle the rest.
Former Nagios employee
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Updating Units in RRD graphs

Post by CFT6Server »

FYI - rerunning the configuration requires additional steps. As the wizard does not overwrite previous MRTG configuration files. So any difference in port configurations has to be manually transferred over from the temp MRTG file to the one in /etc/mrtg/conf.d. So does that component matter or it will just use the UOM and update on the Nagios side?
Locked