Page 1 of 1

check_rrdtraf - command not found / SNMP Error

Posted: Wed Mar 25, 2015 5:31 am
by litsupport.box
Hello again!

I'm trying to use check_rrdtraf to monitor a switch.

First of all, how do i install check_rrdtraf properly? I think i just did something wrong in the process. I fixed errors step by step, it started with a plugin missing on my gearman worker then i had to install SNMP and MRTG, i installed rrdcached too. i copied the check_rrdtraf from another server where it does work but i don't know if it needs some background files or configuration.

I tried following: http://support.nagios.com/forum/viewtop ... 7&start=10 what seemed closest to my problem. But no good results plus no solution.

Image

for example: this is line 306.. do these commands have to be elsewhere?
Image

I guess its best if i first find out how to properly configure/install this plugin.

Also i'm still getting: on all ports

Code: Select all

WARNING: SNMP error: No response from remote host "xxx.xxx.xxx.xxx"
thanks in advance.

Re: check_rrdtraf - command not found / SNMP Error

Posted: Wed Mar 25, 2015 11:26 am
by abrist
It looks like you are missing the command line calculator package "bc". This is required as bash cannot do decimal/floating point math unassisted. Install it with;

Code: Select all

yum install bc

Re: check_rrdtraf - command not found / SNMP Error

Posted: Thu Mar 26, 2015 3:30 am
by litsupport.box
abrist wrote:It looks like you are missing the command line calculator package "bc". This is required as bash cannot do decimal/floating point math unassisted. Install it with;

Code: Select all

yum install bc
It now changed to:
Image

something did change but it's still not working properly.

Re: check_rrdtraf - command not found / SNMP Error

Posted: Thu Mar 26, 2015 9:51 am
by tmcdonald
Are you by chance using a non-English language for your system language?

When running Nagios XI on a system which uses certain non-English languages, bandwidth services (amongst others) and their associated graphs may incorrectly report 0 Mb/s even though there is traffic actively flowing through the given port. 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.

Open the /usr/local/nagios/etc/resource.cfg file in your preferred text editor.
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/libexec
Save and close the file, then restart Nagios with the following command:

Code: Select all

service nagios restart
Graphs should start showing proper information. It may take up to 15 minutes for the changes to take effect, possibly longer for large environments.

One thing to note is that this will add some overhead to your checks since it has to set an environment variable for every command that is run. You might be able to edit the commands in the CCM to only add this prefix for the commands that are not working, but I have not tested this.

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.

http://unix.stackexchange.com/questions ... c-all-c-do

Re: check_rrdtraf - command not found / SNMP Error

Posted: Tue Apr 07, 2015 8:37 am
by litsupport.box
That didn't work unfortunately. I'm going to put this on hold for a while, i've got some other priorities but when im done with them ill catch this up again.

Re: check_rrdtraf - command not found / SNMP Error

Posted: Tue Apr 07, 2015 9:17 am
by tmcdonald
Fair enough. I am going to lock this for the sake of keeping it the way it is now, but when you are ready to resume please PM either myself or another member of the Nagios team and we'll unlock it for you.