Closed lucasalvatore closed 4 weeks ago
ended up getting this working:
processors:
- pem-state:
event-strings:
# debug: true
value-names:
- "/components/component/properties/property/state/value"
transforms:
- replace:
apply-on: value
old: "Online"
new: "1"
- replace:
apply-on: value
old: "Offline"
new: "0"
diff is i had "value" quoted
Having an issue trying to have
event-strings
replace a string with an int. I'm using gnmic to talk to a juniper MX router, and trying to change the PSU states from "Online" and "Offline" to "1" and "0" so i can send this to prometheus.This is my config.yml
(trying to send this to prometheus but for testing i'm just outputting it to a the screen)
This is the response from the Juniper device i'm querying:
When i run
gnmic --config config.yml sub --debug
i'm not seeing anything get replace... this is my output on the screen:the debug output shows this:
Any thoughts as to what i'm missing here? gnmic version is 0.37.0