Multiple iods check

I check the logs with check_snmp.

root:~# **snmpwalk -v2c -c XXX 192.168.70.1 IMM-MIB::eventLogSeverity**
IMM-MIB::eventLogSeverity.1 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.2 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.3 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.4 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.5 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.6 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.7 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.8 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.9 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.10 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.11 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.12 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.13 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.14 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.15 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.16 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.17 = INTEGER: error(0)
IMM-MIB::eventLogSeverity.18 = INTEGER: information(2)
IMM-MIB::eventLogSeverity.19 = INTEGER: information(2)
...

i do it with this command

root:~# /lib/nagios/plugins/check_snmp -H 192.168.70.1 -P 2c -C XXX -o IMM-MIB::eventLogSeverity.1 -r '(Such|inf)' -o IMM-MIB::eventLogSeverity .2 -r '(Such|inf)' -o IMM-MIB::eventLogSeverity.3 -r '(Such|inf)' ...
SNMP CRITICAL - information(2) information(2) *error(0)* | IMM-MIB::eventLogSeverity.1=inf IMM-MIB::eventLogSeverity.2=inf ...

do you have an easier solution?

for example

/lib/nagios/plugins/check_snmp -H 192.168.70.1 -P 2c -C XXX -o IMM-MIB::eventLogSeverity.**{1-100}** -r '(Such|inf)'

My solution

Clear IBM Integrated Management Module (IMM) “Event Log”

check last 10 line logs
warns on all except information

apply Service "Ibm IMM Log" {
    check_timeout = 2m
    import "1-hour"
    check_command = "check_snmp"
    vars.customer_services = "on"
    vars.snmp_address = "$host.vars.iloip$"
    vars.snmp_oid = ["IMM-MIB::eventLogSeverity.1", "IMM-MIB::eventLogSeverity.2", "IMM-MIB::eventLogSeverity.3", "IMM-MIB::eventLogSeverity.4", "IMM-MIB::eventLogSeverity.5", "IMM-MIB::eventLogSeverity.6", "IMM-MIB::eventLogSeverity.7", "IMM-MIB::eventLogSeverity.8", "IMM-MIB::eventLogSeverity.9", "IMM-MIB::eventLogSeverity.10"]
    vars.snmp_ereg = ["2|Such","2|Such","2|Such","2|Such","2|Such","2|Such","2|Such","2|Such","2|Such","2|Such"]
    assign where match("x3850_X*", host.vars.hardware)
}
object Host "esx52.domain.com" {
  import "customer-host"
  address = "1.1.1.1"
  vars.cluster = "customer_esx"
  vars.hostip = "1.1.1.1"
  vars.iloip = "192.168.11.11"
  vars.os = "esxi_7"
  vars.hardware = "x3850_X6_6241B3G"
  vars.distro = "esxi"
}

if there is a problem solve the problem
and again clear log