Hi,
I am using icinga2 with snmp from itl. I have a SNMP device returning value STRING or INT value.
If I use STRING value a loose the performance data, If INT then I get the value multiplied by 10 - see the example
iso.3.6.1.4.1.21796.4.1.3.1.4.1 = STRING: "25.2"
iso.3.6.1.4.1.21796.4.1.3.1.4.2 = STRING: "24.1"
iso.3.6.1.4.1.21796.4.1.3.1.5.1 = INTEGER: 252
iso.3.6.1.4.1.21796.4.1.3.1.5.2 = INTEGER: 241
Is there a way how to postprocess values before they get stored?
BTW The service creation from Host values is superb!
object Host "temp" {
import "hwg-host"
display_name = "temp"
address = "XYZ"
vars.hwgoids["In"] = ".1.3.6.1.4.1.21796.4.1.3.1.5.1"
vars.hwgoids["Out"] = ".1.3.6.1.4.1.21796.4.1.3.1.5.2"
}
apply Service for (identifier => oid in host.vars.hwgoids) {
import "generic-service"
check_command = "snmp"
display_name = identifier
vars.snmp_oid = oid
vars.snmp_label = identifier
vars.snmp_units="C"
vars.snmp_version="1"
vars.snmp_community="public"
}
I am using icinga2 with snmp from itl. I have a SNMP device returning value STRING or INT value.
If I use STRING value a loose the performance data, If INT then I get the value multiplied by 10 - see the example
iso.3.6.1.4.1.21796.4.1.3.1.4.1 = STRING: "25.2"
iso.3.6.1.4.1.21796.4.1.3.1.4.2 = STRING: "24.1"
iso.3.6.1.4.1.21796.4.1.3.1.5.1 = INTEGER: 252
iso.3.6.1.4.1.21796.4.1.3.1.5.2 = INTEGER: 241
Is there a way how to postprocess values before they get stored?
BTW The service creation from Host values is superb!
object Host "temp" {
import "hwg-host"
display_name = "temp"
address = "XYZ"
vars.hwgoids["In"] = ".1.3.6.1.4.1.21796.4.1.3.1.5.1"
vars.hwgoids["Out"] = ".1.3.6.1.4.1.21796.4.1.3.1.5.2"
}
apply Service for (identifier => oid in host.vars.hwgoids) {
import "generic-service"
check_command = "snmp"
display_name = identifier
vars.snmp_oid = oid
vars.snmp_label = identifier
vars.snmp_units="C"
vars.snmp_version="1"
vars.snmp_community="public"
}