I'm trying to use check_snmp to monitor a Dell switch.
The oid in particular that i'm trying to read returns output across multiple lines.
Code: Select all
/usr/local/nagios/libexec/check_snmp -H 10.32.1.122 -p 161 -o '.1.3.6.1.2.1.1.1.0' -P 3 --seclevel=authPriv --secname='SOMEUSER' --authproto=SHA --authpasswd='somepassword' --privpasswd='someotherpassword' -x aes
| P OK - Dell EMC Networking OS10 Enterprise.
.1.3.6.1.2.1.1.1.0:
"Dell EMC Networking OS10 Enterprise.
Copyright (c) 1999-2021 by Dell Inc. All Rights Reserved.
System Description: OS10 Enterprise.
OS Version: 10.5.2.7.
System Type: S3048-ON"
I tried using more specific and complex regular expressions to no avail (eg '/10\.5\.2\.7/gms' ).
Code: Select all
/usr/local/nagios/libexec/check_snmp -H 10.32.1.122 -p 161 -o '.1.3.6.1.2.1.1.1.0' -P 3 --seclevel=authPriv --secname='SOMEUSER' --authproto=SHA --authpasswd='somepassword' --privpasswd='someotherpassword' -x aes -r '10.5.2.7'
* | CRITICAL - *Dell EMC Networking OS10 Enterprise.
.1.3.6.1.2.1.1.1.0:
"Dell EMC Networking OS10 Enterprise.
Copyright (c) 1999-2021 by Dell Inc. All Rights Reserved.
System Description: OS10 Enterprise.
OS Version: 10.5.2.7.
System Type: S3048-ON"
Any help would be appreciated. Thanks.