bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
We have a problem with the bandwidth display of our interfaces.
Every Switch/Router displays:
OK - Current BW in: 0Mbps Out: 0Mbps
(LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg = no output)
What can we do?
Installed Version: Nagios XI 2014R2.3
Every Switch/Router displays:
OK - Current BW in: 0Mbps Out: 0Mbps
(LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg = no output)
What can we do?
Installed Version: Nagios XI 2014R2.3
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
Is your system language set to something non-English?
If so, the easiest way to fix this is to edit the resource.cfg file and add "LC_ALL=C" before the "$USER1$" macro as a prefix to be run before all commands Nagios runs.
1.) Open the /usr/local/nagios/etc/resource.cfg file in your preferred text editor.
2.) Edit the $USER1$ macro (typically the second line of the file) to be as follows:
3.) Save and close the file, then restart Nagios with the following command:
4.) Graphs should start showing proper information. It may take up to 15 minutes for the changes to take effect, possibly longer for large environments.
Setting "LC_ALL=C" before all Nagios commands will force the system language to whatever language the strings in the plugin/binary/application are written in, only for the duration of that command. This will not have an effect on the configured system language itself, and will only take effect when Nagios is running the command. In the case of Nagios XI installations, the plugins included by default are written in English and use the "1,000.00" number format, which is properly interpreted by check_rrdtraf and other plugins.
In systems using certain non-English languages (Spanish, French, and Russian, for example) numbers are represented differently. Whereas in English the comma (,) is used as the thousands separator and the period (.) is used as a decimal separator, most other languages will reverse the two, so that "one-thousand" would be written as "1.000,00" instead of "1,000.00". This causes the graphing to interpret the data incorrectly. Instead of seeing, for example, "1,270 MB/s" the system would see "1.270 MB/s" which is of course orders of magnitude smaller.
If so, the easiest way to fix this is to edit the resource.cfg file and add "LC_ALL=C" before the "$USER1$" macro as a prefix to be run before all commands Nagios runs.
1.) Open the /usr/local/nagios/etc/resource.cfg file in your preferred text editor.
2.) Edit the $USER1$ macro (typically the second line of the file) to be as follows:
Code: Select all
$USER1$=LC_ALL=C /usr/local/nagios/libexecCode: Select all
service nagios restartSetting "LC_ALL=C" before all Nagios commands will force the system language to whatever language the strings in the plugin/binary/application are written in, only for the duration of that command. This will not have an effect on the configured system language itself, and will only take effect when Nagios is running the command. In the case of Nagios XI installations, the plugins included by default are written in English and use the "1,000.00" number format, which is properly interpreted by check_rrdtraf and other plugins.
In systems using certain non-English languages (Spanish, French, and Russian, for example) numbers are represented differently. Whereas in English the comma (,) is used as the thousands separator and the period (.) is used as a decimal separator, most other languages will reverse the two, so that "one-thousand" would be written as "1.000,00" instead of "1,000.00". This causes the graphing to interpret the data incorrectly. Instead of seeing, for example, "1,270 MB/s" the system would see "1.270 MB/s" which is of course orders of magnitude smaller.
Former Nagios employee
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
Thank you for your reply.
I've changed the file /usr/local/nagios/etc/resource.cfg and restarted Nagios.
The bandwidth display has not been changed after 3 hours.
OK - Current BW in: 0Mbps Out: 0Mbps
I've changed the file /usr/local/nagios/etc/resource.cfg and restarted Nagios.
The bandwidth display has not been changed after 3 hours.
OK - Current BW in: 0Mbps Out: 0Mbps
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
Have you restarted nagios after updating the file?
/Luke
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
What is the version of the "Network Switch / Router" wizard that you are currently using?
Admin->Manage Config Wizards
Can you show us the actual command that you are running along with the output of it, for example:
Also, run:
and show us the output.
Admin->Manage Config Wizards
Can you show us the actual command that you are running along with the output of it, for example:
Code: Select all
[root@testbox ~]# /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.x.x_1.rrd -w 50,50 -c 80,80 -l M
OK - Current BW in: 3.82Mbps Out: 1.89Mbps|in=3.826504Mb/s;50;80 out=1.893251Mb/s;50;80Code: Select all
cat /etc/sysconfig/i18nBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
Version of the "Network Switch / Router" wizard:
Network Switch / Router
Version: 2.1.2
actual command:
/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/x.x.x.x_49.rrd -w 500,500 -c 800,800 -l M
OK - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;500;800 out=0Mb/s;500;800
cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
Network Switch / Router
Version: 2.1.2
actual command:
/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/x.x.x.x_49.rrd -w 500,500 -c 800,800 -l M
OK - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;500;800 out=0Mb/s;500;800
cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
Well, I would guess that mrtg is failing to record data to the mrtg rrd. What is the output of:
Code: Select all
rrdtool dump /var/lib/mrtg/x.x.x.x_49.rrd | tail -25Former 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.
"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.
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
rrdtool dump /var/lib/mrtg/x.x.x.x_49.rrd | tail -25
the output:
<!-- 2014-12-30 01:00:00 CET / 1419897600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2014-12-31 01:00:00 CET / 1419984000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-01 01:00:00 CET / 1420070400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-02 01:00:00 CET / 1420156800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-03 01:00:00 CET / 1420243200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-04 01:00:00 CET / 1420329600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-05 01:00:00 CET / 1420416000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-06 01:00:00 CET / 1420502400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-07 01:00:00 CET / 1420588800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-08 01:00:00 CET / 1420675200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-09 01:00:00 CET / 1420761600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-10 01:00:00 CET / 1420848000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-11 01:00:00 CET / 1420934400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-12 01:00:00 CET / 1421020800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-13 01:00:00 CET / 1421107200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-14 01:00:00 CET / 1421193600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-15 01:00:00 CET / 1421280000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-16 01:00:00 CET / 1421366400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-17 01:00:00 CET / 1421452800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-18 01:00:00 CET / 1421539200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-19 01:00:00 CET / 1421625600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-20 01:00:00 CET / 1421712000 --> <row><v> NaN </v><v> NaN </v></row>
the output:
<!-- 2014-12-30 01:00:00 CET / 1419897600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2014-12-31 01:00:00 CET / 1419984000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-01 01:00:00 CET / 1420070400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-02 01:00:00 CET / 1420156800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-03 01:00:00 CET / 1420243200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-04 01:00:00 CET / 1420329600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-05 01:00:00 CET / 1420416000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-06 01:00:00 CET / 1420502400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-07 01:00:00 CET / 1420588800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-08 01:00:00 CET / 1420675200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-09 01:00:00 CET / 1420761600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-10 01:00:00 CET / 1420848000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-11 01:00:00 CET / 1420934400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-12 01:00:00 CET / 1421020800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-13 01:00:00 CET / 1421107200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-14 01:00:00 CET / 1421193600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-15 01:00:00 CET / 1421280000 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-16 01:00:00 CET / 1421366400 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-17 01:00:00 CET / 1421452800 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-18 01:00:00 CET / 1421539200 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-19 01:00:00 CET / 1421625600 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2015-01-20 01:00:00 CET / 1421712000 --> <row><v> NaN </v><v> NaN </v></row>
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
I have seen the command
*/15 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
in /etc/cron.d/mrtg
Running the command manually
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
Everything is ok !
/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/x.x.x.x_49.rrd -w 500,500 -c 800,800 -l M
OK - Current BW in: 5.43Mbps Out: 4.98Mbps|in=5.439036Mb/s;500;800 out=4.981162Mb/s;500;800
I dont no why ?
*/15 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
in /etc/cron.d/mrtg
Running the command manually
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
Everything is ok !
/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/x.x.x.x_49.rrd -w 500,500 -c 800,800 -l M
OK - Current BW in: 5.43Mbps Out: 4.98Mbps|in=5.439036Mb/s;500;800 out=4.981162Mb/s;500;800
I dont no why ?
Re: bandwidth OK - Current BW in: 0Mbps Out: 0Mbps
After few minutes every Switch/Router displays again:
OK - Current BW in: 0Mbps Out: 0Mbps
OK - Current BW in: 0Mbps Out: 0Mbps