Page 3 of 5

Re: SNMP configuration issue from Nagios XI

Posted: Tue Aug 25, 2015 1:24 pm
by ssax
Just leave them unescaped in the resource.cfg file.
raamardhani7 wrote: I have created the password in resource.cfg,
And added the same command which you updated above in the portal and the output is as below.

COMMAND: /usr/local/nagios/libexec/check_snmp -H xx.xx.xx.xx -o '.1.3.6.1.4.1.12356.101.1.1403' -P 3 -U username -L authPriv -a sha -A '\$USER9\$' -x aes -X '\$USER10\$'
OUTPUT: External command error: snmpget: Timeout
As I said before, this will not work by running the test command button, go to Home > Service Detail and find the service, click on it to view the service details, and force an immediate check to see if it works.

Re: SNMP configuration issue from Nagios XI

Posted: Tue Aug 25, 2015 2:07 pm
by raamardhani7
ssax wrote:Just leave them unescaped in the resource.cfg file.
raamardhani7 wrote: I have created the password in resource.cfg,
And added the same command which you updated above in the portal and the output is as below.

COMMAND: /usr/local/nagios/libexec/check_snmp -H xx.xx.xx.xx -o '.1.3.6.1.4.1.12356.101.1.1403' -P 3 -U username -L authPriv -a sha -A '\$USER9\$' -x aes -X '\$USER10\$'
OUTPUT: External command error: snmpget: Timeout
As I said before, this will not work by running the test command button, go to Home > Service Detail and find the service, click on it to view the service details, and force an immediate check to see if it works.
Hi Ssax,

Thanks for the insights. Please find the screenshot attached below.. and advise if I need to something extra.

Re: SNMP configuration issue from Nagios XI

Posted: Tue Aug 25, 2015 4:40 pm
by ssax
That result means that the device doesn't have that OID (or isn't setup to offer that OID) are you sure it's the proper OID? Are you sure the device is configured properly?

You can try an SNMP walk to see what OIDs are available:

Code: Select all

snmpwalk -v 3 -u username -l authPriv -a SHA -A AUTHPASS -x AES -X PRIVPASS XXX.XXX.XXX.XXX:161 -On

Re: SNMP configuration issue from Nagios XI

Posted: Tue Aug 25, 2015 5:13 pm
by raamardhani7
ssax wrote:That result means that the device doesn't have that OID (or isn't setup to offer that OID) are you sure it's the proper OID? Are you sure the device is configured properly?

You can try an SNMP walk to see what OIDs are available:

Code: Select all

snmpwalk -v 3 -u username -l authPriv -a SHA -A AUTHPASS -x AES -X PRIVPASS XXX.XXX.XXX.XXX:161 -On
HI Ssax,

I could find the output of the oid.
grep .1.3.6.1.4.1.12356.101.1.1403 raamtest
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.12356.101.1.1403

Please find the output file attached. command is still executing :P

Re: SNMP configuration issue from Nagios XI

Posted: Wed Aug 26, 2015 12:21 am
by raamardhani7
Hi Ssax,

I've changed the OID to the one which it is listing or pointing to.

grep .1.3.6.1.4.1.12356.101.1.1403 raamtest
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.12356.101.1.1403

Screenshot form Portal is uploaded, please check, review and provide your comments on it please.

Re: SNMP configuration issue from Nagios XI

Posted: Wed Aug 26, 2015 9:46 am
by ssax
From your service screenshots it looks like you're trying to check system uptime, is that the case?

You would want to use this OID then: .1.3.6.1.2.1.1.3.0

Here is the description of the OID that you used (.1.3.6.1.2.1.1.2.0):

Code: Select all

sysObjectID OBJECT-TYPE
              SYNTAX  OBJECT IDENTIFIER
              ACCESS  read-only
              STATUS  mandatory
              DESCRIPTION
                      "The vendor's authoritative identification of the
                      network management subsystem contained in the
                      entity.  This value is allocated within the SMI
                      enterprises subtree (1.3.6.1.4.1) and provides an
                      easy and unambiguous means for determining `what
                      kind of box' is being managed.  For example, if
                      vendor `Flintstones, Inc.' was assigned the
                      subtree 1.3.6.1.4.1.4242, it could assign the
                      identifier 1.3.6.1.4.1.4242.1.1 to its `Fred
                      Router'."
              ::= { system 2 }
Try running the walk command without the -On to get more insight:

Code: Select all

snmpwalk -v 3 -u username -l authPriv -a SHA -A AUTHPASS -x AES -X PRIVPASS XXX.XXX.XXX.XXX:161

Re: SNMP configuration issue from Nagios XI

Posted: Thu Aug 27, 2015 1:03 am
by raamardhani7
ssax wrote:From your service screenshots it looks like you're trying to check system uptime, is that the case?

You would want to use this OID then: .1.3.6.1.2.1.1.3.0

Here is the description of the OID that you used (.1.3.6.1.2.1.1.2.0):

Code: Select all

sysObjectID OBJECT-TYPE
              SYNTAX  OBJECT IDENTIFIER
              ACCESS  read-only
              STATUS  mandatory
              DESCRIPTION
                      "The vendor's authoritative identification of the
                      network management subsystem contained in the
                      entity.  This value is allocated within the SMI
                      enterprises subtree (1.3.6.1.4.1) and provides an
                      easy and unambiguous means for determining `what
                      kind of box' is being managed.  For example, if
                      vendor `Flintstones, Inc.' was assigned the
                      subtree 1.3.6.1.4.1.4242, it could assign the
                      identifier 1.3.6.1.4.1.4242.1.1 to its `Fred
                      Router'."
              ::= { system 2 }
Try running the walk command without the -On to get more insight:

Code: Select all

snmpwalk -v 3 -u username -l authPriv -a SHA -A AUTHPASS -x AES -X PRIVPASS XXX.XXX.XXX.XXX:161
Hi Ssax,

Thanks a lot for your insights. This worked for device uptime.. i have changed the OID and it worked.

I wanted to configure for CPU, Mem, VPN sessions.

I have tried configuring CPU load using ./check_snmp_load.pl, please find the output and help me where I am going wrong please.
==============================================================================================
./check_snmp_load.pl -H xx.xx.xx.xx -v 3 -l username -x AUTHPASS -X PRIVPASS -w 50 -c 70 -T fg -L sha,aes -p 161
Alarm at 15 + 5
SNMPv3 login
SNMPv3 AuthPriv login : username, sha, aes
Checking OID : .1.3.6.1.4.1.12356.1.8.0
OID returned noSuchObject
Argument "noSuchObject" isn't numeric in printf at ./check_snmp_load.pl line 602.
CPU used 0.0% (<50) : OK
==============================================================================================

Re: SNMP configuration issue from Nagios XI

Posted: Thu Aug 27, 2015 9:38 am
by tgriep
What is the make and model of the device you are trying to monitor?

Re: SNMP configuration issue from Nagios XI

Posted: Thu Aug 27, 2015 12:58 pm
by raamardhani7
tgriep wrote:What is the make and model of the device you are trying to monitor?
It is fortigate device.
T1 interface WAN

Model I am not aware.. :(, but if it is mandatory I can get that information.

Re: SNMP configuration issue from Nagios XI

Posted: Thu Aug 27, 2015 3:15 pm
by tgriep
I don't think we need the model number.
The plugin looks like it can only check the CPU load for your device and that's all.
Can you run the snmpwalk command and post the output here?