Replace snmp returned string of "" with "Unknown"



Quering a wireless controller, sometimes it doesn’t detect the device so it throws back an empty string.
Wondering if there was a way for me to replace the empty string with a value of “Unknown”

name = “hostname”
oid = “RFC1213-MIB::sysName.0”
is_tag = true

name = “mel_wifi_users”
inherit_tags = [ “hostname” ]
name = “UserName”
oid = “WLSX-USER-MIB::nUserName”
name = “DeviceType”
oid = “WLSX-USER-MIB::nUserDeviceType”
is_tag = true

Basically if name DeviceType = “” then replace with DeviceType = “Unknown”
Hope this makes sense


You could probably use the regex processor to make the modification in the case it is an empty string. I think it should be possible to use the override processor if it is not set at all. Use the metric filtering parameters to select only the metrics you wish to modify in the processor.