Version used = 2.13.1-1
OS and version = RHEL 7.9
Enabled features = api checker command debuglog ido-mysql influxdb mainlog notification syslog
Icinga 2 Web 2 version = 2.9.3
Config validation = All green => Icinga application loader (version: 2.13.2-1)
Hello all,
I experience a strange phenomenon that non-enterprise OIDs cannot be queried (or only manually via CLI). Enterprise OIDs are functional. Of 8 checks that are generated completely identically, only 2 (the Enterprise ones) are functional. The following is configured:
A bash script that automatically generates the hosts file and writes the OIDs including ports to a host custom variable every hour.
object Host "Switch 01" {
import "generic-host"
address = "10.xxx.xxx.xx1"
vars.switchrole = "SwitchRole1"
vars.switchName = "Switch#01"
vars.newAristaConf = "true"
vars.aristaIfInOctetRate = "1.3.6.1.4.1.30065.3.15.1.1.1.5.29 1.3.6.1.4.1.30065.3.15.1.1.1.5.30 1.3.6.1.4.1.30065.3.15.1.1.1.5.31 1.3.6.1.4.1.30065.3.15.1.1...[...].."
vars.aristaIfOutOctetRate = "1.3.6.1.4.1.30065.3.15.1.1.1.6.29 1.3.6.1.4.1.30065.3.15.1.1.1.6.30 1.3.6.1.4.1.30065.3.15.1.1.1.6.31 1.3.6.1.4.1.30065.3.15.1.1..[...].."
vars.ifInOctets = "1.3.6.1.2.1.31.1.1.1.6.29,1.3.6.1.2.1.31.1.1.1.6.30,1.3.6.1.2.1.31.1.1.1.6.31,1.3.6.1.2.1.31.1.1.1.6.32,1.3.6.1.2.1.31.1.1.1.6.33,1.3.6.1...[...].."
vars.ifOutOctets = "1.3.6.1.2.1.2.2.1.16.29 1.3.6.1.2.1.2.2.1.16.30 1.3.6.1.2.1.2.2.1.16.31 1.3.6.1.2.1.2.2.1.16.32 1.3.6.1.2.1.2.2.1.16.33 1.3.6.1.2.1.2.2.1..[...].."
vars.ifInErrors = "1.3.6.1.2.1.2.2.1.14.29 1.3.6.1.2.1.2.2.1.14.30 1.3.6.1.2.1.2.2.1.14.31 1.3.6.1.2.1.2.2.1.14.32 1.3.6.1.2.1.2.2.1.14.33 1.3.6.1.2.1.2.2.1...[...].."
vars.ifOutErrors = "1.3.6.1.2.1.2.2.1.20.29 1.3.6.1.2.1.2.2.1.20.30 1.3.6.1.2.1.2.2.1.20.31 1.3.6.1.2.1.2.2.1.20.32 1.3.6.1.2.1.2.2.1.20.33 1.3.6.1.2.1.2.2.1..[...].."
vars.ifInDiscards = "1.3.6.1.2.1.2.2.1.13.29 1.3.6.1.2.1.2.2.1.13.30 1.3.6.1.2.1.2.2.1.13.31 1.3.6.1.2.1.2.2.1.13.32 1.3.6.1.2.1.2.2.1.13.33 1.3.6.1.2.1.2.2...[...].."
vars.ifOutDiscards = "1.3.6.1.2.1.2.2.1.19.29 1.3.6.1.2.1.2.2.1.19.30 1.3.6.1.2.1.2.2.1.19.31 1.3.6.1.2.1.2.2.1.19.32 1.3.6.1.2.1.2.2.1.19.33 1.3.6.1.2.1.2.2..[...].."
}
object Host "Switch #02" {
import "generic-host"
address = "10.xxx.xxx.xx2"
vars.switchrole = "SwitchRole2"
vars.switchName = "Switch#02"
vars.newAristaConf = "true"
vars.aristaIfInOctetRate = "1.3.6.1.4.1.30065.3.15.1.1.1.5.29 1.3.6.1.4.1.30065.3.15.1.1.1.5.30 1.3.6.1.4.1.30065.3.15.1.1.1.5.31 1.3.6.1.4.1.30065.3.15.1.1...[...].."
vars.aristaIfOutOctetRate = "1.3.6.1.4.1.30065.3.15.1.1.1.6.29 1.3.6.1.4.1.30065.3.15.1.1.1.6.30 1.3.6.1.4.1.30065.3.15.1.1.1.6.31 1.3.6.1.4.1.30065.3.15.1.1..[...].."
vars.ifInOctets = "1.3.6.1.2.1.31.1.1.1.6.29,1.3.6.1.2.1.31.1.1.1.6.30,1.3.6.1.2.1.31.1.1.1.6.31,1.3.6.1.2.1.31.1.1.1.6.32,1.3.6.1.2.1.31.1.1.1.6.33,1.3.6.1...[...].."
vars.ifOutOctets = "1.3.6.1.2.1.2.2.1.16.29 1.3.6.1.2.1.2.2.1.16.30 1.3.6.1.2.1.2.2.1.16.31 1.3.6.1.2.1.2.2.1.16.32 1.3.6.1.2.1.2.2.1.16.33 1.3.6.1.2.1.2.2.1..[...].."
vars.ifInErrors = "1.3.6.1.2.1.2.2.1.14.29 1.3.6.1.2.1.2.2.1.14.30 1.3.6.1.2.1.2.2.1.14.31 1.3.6.1.2.1.2.2.1.14.32 1.3.6.1.2.1.2.2.1.14.33 1.3.6.1.2.1.2.2.1...[...].."
vars.ifOutErrors = "1.3.6.1.2.1.2.2.1.20.29 1.3.6.1.2.1.2.2.1.20.30 1.3.6.1.2.1.2.2.1.20.31 1.3.6.1.2.1.2.2.1.20.32 1.3.6.1.2.1.2.2.1.20.33 1.3.6.1.2.1.2.2.1..[...].."
vars.ifInDiscards = "1.3.6.1.2.1.2.2.1.13.29 1.3.6.1.2.1.2.2.1.13.30 1.3.6.1.2.1.2.2.1.13.31 1.3.6.1.2.1.2.2.1.13.32 1.3.6.1.2.1.2.2.1.13.33 1.3.6.1.2.1.2.2...[...].."
vars.ifOutDiscards = "1.3.6.1.2.1.2.2.1.19.29 1.3.6.1.2.1.2.2.1.19.30 1.3.6.1.2.1.2.2.1.19.31 1.3.6.1.2.1.2.2.1.19.32 1.3.6.1.2.1.2.2.1.19.33 1.3.6.1.2.1.2.2..[...].."
}
...
The services (the first two are functional, the following are not functional, although created according to the same scheme) are called in the service file as follows:
### The rate, in octets per second, of data inbound on an interface, averaged over aristaIfRateInterval ###
apply Service "snmp_aristaIfInOctetRate" {
import "generic-service"
check_command = "snmpv3"
vars.snmpv3_oid = "$host.vars.aristaIfInOctetRate$"
vars.snmpv3_user = "xxxxxx"
vars.snmpv3_auth_key = "XXXXXXXXXXXXXX
vars.snmpv3_auth_alg = "MD5"
vars.snmpv3_priv_alg = "AES"
vars.snmpv3_priv_key = "XXXXXXXXXXXXXX"
vars.snmpv3_seclevel = "authPriv"
assign where host.vars.newAristaConf == "true"
}
### The rate, in octets per second, of data outbound on an interface, averaged over aristaIfRateInterval ###
apply Service "snmp_aristaIfOutOctetRate" {
import "generic-service"
check_command = "snmpv3"
vars.snmpv3_oid = "$host.vars.aristaIfOutOctetRate$"
vars.snmpv3_user = "xxxxxx"
vars.snmpv3_auth_key = "XXXXXXXXXXXXXX"
vars.snmpv3_auth_alg = "MD5"
vars.snmpv3_priv_alg = "AES"
vars.snmpv3_priv_key = "XXXXXXXXXXXXXX"
vars.snmpv3_seclevel = "authPriv"
assign where host.vars.newAristaConf == "true"
}
### Total number of octets received on an interface, including framing characters ###
apply Service "snmp_IfInOctets" {
import "generic-service"
check_command = "snmpv3"
vars.snmpv3_oid = "$host.vars.IfInOctets$"
vars.snmpv3_user = "xxxxxx"
vars.snmpv3_auth_key = "XXXXXXXXXXXXXX"
vars.snmpv3_auth_alg = "MD5"
vars.snmpv3_priv_alg = "AES"
vars.snmpv3_priv_key = "XXXXXXXXXXXXXX"
vars.snmpv3_seclevel = "authPriv"
assign where host.vars.newAristaConf == "true"
}
### Total number of octets transmitted on an interface, including framing characters ###
apply Service "snmp_IfOutOctets" {
import "generic-service"
check_command = "snmpv3"
vars.snmpv3_oid = "$host.vars.IfOutOctets$"
vars.snmpv3_user = "xxxxxx"
vars.snmpv3_auth_key = "XXXXXXXXXXXXXX"
vars.snmpv3_auth_alg = "MD5"
vars.snmpv3_priv_alg = "AES"
vars.snmpv3_priv_key = "XXXXXXXXXXXXXX"
vars.snmpv3_seclevel = "authPriv"
assign where host.vars.newAristaConf == "true"
}
...
The GUI shows the following:
Host Custom Variables:
Host Services:
Non-functional Service:
Functional Service:
With the best will in the world, I can’t find the problem. The only difference that I can see is that the first two services are Enterprise OIDs. The commands can be executed on the CLI via check_snmp with all OIDs, only executed by Icinga it shows “NO OIDs specified”.
Test via CLI both functional:
root@icinga2:~>>/usr/lib64/nagios/plugins/check_snmp -P 3 -a MD5 -A XXXXXXXXXXXXXX -L authPriv -U xxxxxxx -x AES -X XXXXXXXXXXXXXX! -4 -H 10.xxx.xxx.xxx -o "1.3.6.1.4.1.30065.3.15.1.1.1.5.1 1.3.6.1.4.1.30065.3.15.1.1.1.5.10 1.3.6.1.4.1.30065.3.15.1.1.1.5.11 1.3.6.1.4.1.30065.3.15.1.1.1.5.12"
SNMP OK - 198282 0 1354 0 | SNMPv2-SMI::enterprises.30065.3.15.1.1.1.5.1=198282c SNMPv2-SMI::enterprises.30065.3.15.1.1.1.5.10=0c SNMPv2-SMI::enterprises.30065.3.15.1.1.1.5.11=1354c SNMPv2-SMI::enterprises.30065.3.15.1.1.1.5.12=0c
root@icinga2:~>>/usr/lib64/nagios/plugins/check_snmp -P 3 -a MD5 -A XXXXXXXXXXXXXX -L authPriv -U xxxxxxx -x AES -X XXXXXXXXXXXXXX! -4 -H 10.xxx.xxx.xxx -o "1.3.6.1.2.1.2.2.1.13.1 1.3.6.1.2.1.2.2.1.13.10 1.3.6.1.2.1.2.2.1.13.11 1.3.6.1.2.1.2.2.1.13.12"
SNMP OK - 0 0 0 0 | IF-MIB::ifInDiscards.1=0c IF-MIB::ifInDiscards.10=0c IF-MIB::ifInDiscards.11=0c IF-MIB::ifInDiscards.12=0c
Does anyone have any idea what might be the cause?
Greetings
JJ