Hello,
I am getting an error ("Return code of 13 for service [servicename] on host [remotehost] was out of bounds" when trying to measure remote host TCP segment stats (error,sent,etc). Following other forum posts I made sure permissions were correct on the plugin.
From what I've read it seems like this is due to the fact that I originally ran the plugin at the command line to see if it would work, which created a tmp file under the user root instead of under the user nagios (user nagios needs to be able to edit the tmp file for the plugin to work?)
Is this as easy as deleting the tmp file and then running the command from the UI to create the tmp file under the user nagios? If so, where can I find this tmp file in order to remove it? I am looking all over for tmp files owned by root but can't find anything that seems related to my issue.
Thanks in advance!
Plugin Error 13: check_snmp_generic
Re: Plugin Error 13: check_snmp_generic
HiI am trying to replicate this.
What is the command you ran from the command line as root?
If you can't remember run 'history'
Thanks
What is the command you ran from the command line as root?
If you can't remember run 'history'
Thanks
Re: Plugin Error 13: check_snmp_generic
Here is the command:
./check_snmp_generic.pl -d "TCP segment error (in):" -l tcpcon -w 200 -c 250 -e 1.3.6.1.2.1.6.14.0 -H [HostAddress] -N "-c [string] -v 2c"
I was trying to follow the format from ./check_snmp_generic.pl --help
The command still seems to be working from the command line (as of this morning)
edit: added .pl to the plugin
./check_snmp_generic.pl -d "TCP segment error (in):" -l tcpcon -w 200 -c 250 -e 1.3.6.1.2.1.6.14.0 -H [HostAddress] -N "-c [string] -v 2c"
I was trying to follow the format from ./check_snmp_generic.pl --help
The command still seems to be working from the command line (as of this morning)
edit: added .pl to the plugin
Re: Plugin Error 13: check_snmp_generic
Hi
I am not seeing a tmp file when I run the command as root or nagios.
If you are seeing one please send me a copy, and then go ahead and delete it and
try running the command from the command line again.
Also try running the command with the verbose option (-v):
Thanks
I am not seeing a tmp file when I run the command as root or nagios.
If you are seeing one please send me a copy, and then go ahead and delete it and
try running the command from the command line again.
Also try running the command with the verbose option (-v):
Code: Select all
/usr/local/nagios/libexec/check_snmp_generic.pl -v -d "TCP segment error (in):" -l tcpcon -w 200 -c 250 -e 1.3.6.1.2.1.6.14.0 -H 192.168.23.82 -N "-c public -v 2c"Thanks
Re: Plugin Error 13: check_snmp_generic
Hmmm okay. Is Return Code 13 a permissions issue? Maybe I've been led astray by some other forum posts.
Here is the output from the command with verbose mode (I redacted the host name)
I am still erroring from the UI.
Here is the output from the command with verbose mode (I redacted the host name)
Code: Select all
Executing: snmpget -OqvU -c WinDowSR -v 2c -t2 -r0 [HostAddress] 1.3.6.1.2.1.6.14.0 2>&1
Got following Values:
288
$VAL_100/$CURRENT_REAL: 288/0
got param key/value: SNMP_[HostAddress]_TCP_segment_error_in__tcpcon_ 288
got tmp value: SNMP_[HostAddress]_TCP_segment_error_in__tcpcon_;280;1627497401
got tmp value: SNMP_[HostAddress]_TCP_segment_error_in__tcpcon_;288;1627561748
got tmp value: SNMP_127_0_0_1_TCP_segment_error_in__tcpcon_;230;1627497262
got tmp value: SNMP_[HostAddress]_SNMP_Errors_out__snmperrors_;0;1627066327
got tmp value: SNMP_[HostAddress]_TCP_segment_sent__tcpcon_;268198488;1627497542
diff_value/diff_sec: 0/89927
saving new value: SNMP_[HostAddress]_TCP_segment_error_in__tcpcon_;288;1627651675
OK - TCP segment error (in): 0 | tcpcon=0;200;250;;Re: Plugin Error 13: check_snmp_generic
Hi
As root user:
Now test from the gui please.
Thanks
As root user:
Code: Select all
cd /usr/local/nagios
chown -R apache:nagios libexec
chmod -R 755 libexecThanks
Re: Plugin Error 13: check_snmp_generic
No luck with those changes. They did actually change the behavior of the Ping service, which is now giving this output:
"Warning: This plugin must be either run as root or setuid root."
Was the default owner:group combo for libexec root root?
"Warning: This plugin must be either run as root or setuid root."
Was the default owner:group combo for libexec root root?
Re: Plugin Error 13: check_snmp_generic
Please run these commands as root to fix the ping checks (check_dhcp would fail too):
EDIT: I think you are right about permissions.
Try this:
Then run the check again.
Code: Select all
chown root.nagios /usr/local/nagios/libexec/check_dhcp
chmod 4775 /usr/local/nagios/libexec/check_dhcp
chown root.nagios /usr/local/nagios/libexec/check_icmp
chmod 4775 /usr/local/nagios/libexec/check_icmpTry this:
Code: Select all
chown nagios.nagios /tmp/SNMP_MONITORING_VALUES_TMP.txt
chmod 664 /tmp/SNMP_MONITORING_VALUES_TMP.txtRe: Plugin Error 13: check_snmp_generic
Both the ping checks and the TCP checks are working at this point. Thanks so much for your help!