Page 1 of 1

Interface Bandwidth Graphs in b/s measurements

Posted: Wed May 18, 2011 2:17 pm
by hhlodge
Hi,

I see this subject brought up over a year ago and the thread is hard to follow, but it don't see that anyone resolved it and it's surely an issue with the latest release. My graphs for Cisco interface bandwidth is in b/s versus Mb/s.
graph1.png
If I set $ARG4$ to G, the increment measurement says mb/s, which makes no sense, and of course the values are invalid. If I change it back to M, they go back to b/s. Is this resolvable? If not, the graphs are of little use. Thanks.
graph2.png
- Kyle

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 19, 2011 9:20 am
by tonyyarusso
Yeah, this is all the result of PNP's code. I'm hoping that switching to PHP version 0.6 might fix it, and we're in the process of investigating that, but with quite a few changes to how it works it takes a while to rework the necessary XI parts.

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 19, 2011 11:31 am
by hhlodge
In an attempt to work around this for now, can you tell me the process that is doing the polling and creating the rrd files in /var/lib/mrtg and can I change the increments from Mb to Kb?

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 19, 2011 12:14 pm
by tonyyarusso
That would be MRTG. Its configuration lives in /etc/mrtg, and you'll find the documentation for it on http://oss.oetiker.ch/mrtg/doc/index.en.html.

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Wed May 25, 2011 12:32 pm
by hhlodge
Where would XI store the configuration files from the output of cfgmaker, which I assume is run once when the wizard is used. I want to change the graphs for existing bandwidth checks. I found configs in /usr/local/nagiosxi/tmp but the directory named "tmp" leads me to believe it's not these and a change made there didn't change the graphs. Thanks.

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Wed May 25, 2011 12:39 pm
by tonyyarusso
/etc/mrtg

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 26, 2011 9:58 am
by hhlodge
If I look at /usr/local/nagiosxi/html/includes/configwizards/switch/switch.inc.php, it looks like the wizard puts the output of cfgmaker in these tmp files.

$tmp_dir=get_tmp_dir();
$outfile=$tmp_dir."/mrtgscan-".$address;
$cmd=$cfgmaker_cmd." > ".$outfile." ; touch ".$donefile." > /dev/null &";

What is appending the these tmp config files to /etc/mrtg/mrtg.cfg? I'd like to manually add checks/graphs for Windows and Linux systems interfaces throughput as needed but don't want to stomp on anything. Thanks.

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 26, 2011 10:30 am
by tonyyarusso
It's in that same file actually, look for this:

Code: Select all

        // open the mrtg file for appending
        $fo=fopen($mrtg_cfg,"a+");

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 26, 2011 10:35 am
by hhlodge
Ah, thanks. So I should be able to just run cfgmaker >> /etc/mrtg/mrtg.cfg and be safe?

Re: Interface Bandwidth Graphs in b/s measurements

Posted: Thu May 26, 2011 10:41 am
by tonyyarusso
I believe so. Test first. :P