Page 2 of 3

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Thu Mar 03, 2016 3:38 pm
by fodorm
They were run as root user.

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Thu Mar 03, 2016 6:04 pm
by lmiltchev
Run the following commands and show the output:

Code: Select all

ll -d /usr/local/nagios/libexec
ll /usr/local/nagios/libexec/check_rrdtraf

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 9:12 am
by fodorm
lmiltchev wrote:Run the following commands and show the output:

Code: Select all

ll -d /usr/local/nagios/libexec

Returns: 
drwxrwxr-x 2 nagios nagios 4096 Feb  3 15:33 /usr/local/nagios/libexec

ll /usr/local/nagios/libexec/check_rrdtraf
Returns:
-rw-r--r-- 1 root root 9743 Dec 22 2014 /usr/local/nagios/libexec/check_rrdtraf

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 1:10 pm
by tgriep
The permission denied is strange, can you run the command like the example below and post the output?

Code: Select all

bash -x /usr/local/nagios/libexec/check_rrdtraf --help

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 1:13 pm
by lmiltchev
Run the following commands to change permissions:

Code: Select all

chown apache:nagios /usr/local/nagios/libexec
chmod g+s /usr/local/nagios/libexec
chown apache:nagios /usr/local/nagios/libexec/check_rrdtraf
chmod 775 /usr/local/nagios/libexec/check_rrdtraf
Let us know if this fixed your issue.

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 1:14 pm
by fodorm
tgriep wrote:The permission denied is strange, can you run the command like the example below and post the output?

Code: Select all

bash -x /usr/local/nagios/libexec/check_rrdtraf --help

++ echo '/usr/local/rrdtool*/bin'
++ awk '{for(i=1;i<=NF;i++) printf(":%s",$i)}'
+ RRDTOOLPATH=':/usr/local/rrdtool*/bin'
+ PATH='/sbin:/bin:/usr/sbin:/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/rrdtool*/bin'
+ SCALE=2
++ uname -s
+ OSTYPE=Linux
+ '[' Linux = Linux ']'
+ STATFLAGS='-c %Y'
++ basename /usr/local/nagios/libexec/check_rrdtraf
+ PROGNAME=check_rrdtraf
++ echo /usr/local/nagios/libexec/check_rrdtraf
++ sed -e 's,[\/][^\/][^\/]*$,,'
+ PROGPATH=/usr/local/nagios/libexec
+ REVISION=0.5
+ . /usr/local/nagios/libexec/utils.sh
++ STATE_OK=0
++ STATE_WARNING=1
++ STATE_CRITICAL=2
++ STATE_UNKNOWN=3
++ STATE_DEPENDENT=4
+ exitstatus=3
+ MAXAGE=0
+ FILEAGE=0
+ VERBOSITY=0
+ LC_NUMERIC=en_US.UTF-8
+ case $1 in
+ print_help
+ print_version
+ echo 'check_rrdtraf v0.5'
check_rrdtraf v0.5
+ print_usage
+ echo ''

+ echo Usage:
Usage:
+ echo ' check_rrdtraf -f <rrd_file> -w <warning_pair> -c <critical_pair>'
check_rrdtraf -f <rrd_file> -w <warning_pair> -c <critical_pair>
+ echo ' [-v][-e expire_seconds] [-l label_units]'
[-v][-e expire_seconds] [-l label_units]
+ echo ' check_rrdtraf (-V | --version)'
check_rrdtraf (-V | --version)
+ echo ' check_rrdtraf (-h | --help)'
check_rrdtraf (-h | --help)
+ echo ' '

+ echo Options:
Options:
+ echo '-h, --help'
-h, --help
+ echo ' Print detaiiled help screen'
Print detaiiled help screen
+ echo '-V, --version'
-V, --version
+ echo ' Print version information'
Print version information
+ echo '-v Verbose output. Can be specified twice for more verbosity'
-v Verbose output. Can be specified twice for more verbosity
+ echo '-vv More verbose output, same as -v -v'
-vv More verbose output, same as -v -v
+ echo '-f Full path to RRD file to read data from'
-f Full path to RRD file to read data from
+ echo '-w Warning threshold <rate> or pair <incoming>,<outgoing>'
-w Warning threshold <rate> or pair <incoming>,<outgoing>
+ echo '-c Critical threshold <rate> or pair <incoming>,<outgoing>'
-c Critical threshold <rate> or pair <incoming>,<outgoing>
+ echo '-e Log age threshold (in seconds, 5min=300)'
-e Log age threshold (in seconds, 5min=300)
+ echo '-l Data display label, one of B,K,M or G'
-l Data display label, one of B,K,M or G
+ echo ''

+ echo Notes:
Notes:
+ echo '-Warning and critical thresholds are MAX values,'
-Warning and critical thresholds are MAX values,
+ echo ' going above the threshold will trigger an alert.'
going above the threshold will trigger an alert.
+ echo '-Labels and units for warning and critical values'
-Labels and units for warning and critical values
+ echo ' are determined by the -l argument (if specified):'
are determined by the -l argument (if specified):
+ echo ' B=bps; K=Kbps; M=Mbps; G=Gbps'
B=bps; K=Kbps; M=Mbps; G=Gbps
+ echo '-If the -l switch is specified, input values are assumed to'
-If the -l switch is specified, input values are assumed to
+ echo ' be in the same units as specified in the -l switch'
be in the same units as specified in the -l switch
+ echo '-If the -l switch is not specified, output values are scaled'
-If the -l switch is not specified, output values are scaled
+ echo ' appropriately, and input values are assumed to be in Kbps'
appropriately, and input values are assumed to be in Kbps
+ echo ''

+ echo 'Nagios Plugin: Check Bandwidth within an RRD.'
Nagios Plugin: Check Bandwidth within an RRD.
+ echo ''

+ support
+ printf %b 'Send email to [email protected] if you have questions regarding use\nof this software. To submit patches or suggest improvements, send email to\[email protected]. Please include version information with all\ncorrespondence (when possible, use output from the --version option of the\nplugin itself).\n'
Send email to [email protected] if you have questions regarding use
of this software. To submit patches or suggest improvements, send email to
[email protected]. Please include version information with all
correspondence (when possible, use output from the --version option of the
plugin itself).
+ echo 'You may also contact the developer of this plug-in directly'
You may also contact the developer of this plug-in directly
+ echo 'at [email protected]'
at [email protected]
+ exit 3

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 2:32 pm
by lmiltchev
fodorm, did you try changing the permissions of the "libexec" directory, and "check_rrdtraf"? Did this fix the issue?

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 2:36 pm
by fodorm
lmiltchev wrote:fodorm, did you try changing the permissions of the "libexec" directory, and "check_rrdtraf"? Did this fix the issue?
Just got a chance and that did the trick. Thanks for your assistance lmiltchev!

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 3:07 pm
by hsmith
Glad that it is working for you. Are we good to close this thread?

Re: Bandwith Check on a switch - Return code of 13 is out of

Posted: Fri Mar 04, 2016 3:48 pm
by fodorm
Yes thank you