I am working on making a parser for the command "show interface diagnostic optic" which displays data on the installed optics in the device. (e.g. Temp, Power and Rx/Tx strength) I think I have the parser working for all of the metrics except the Temp, which the devices return as a string containing values in C and F.
So I am experimenting with a way to make a measurement for both scales, and use REGEX to populate that measurement with the appropriate value from the string. The idea is that this would be a graphable value when Grafana pulls it out of the DB.
I'm not getting the measurement with the "C" or "F" suffix, nor is it giving me the value I think I am telling it to isolate. I am hoping that someone can point out where I am going wrong?
I am working on making a parser for the command "show interface diagnostic optic" which displays data on the installed optics in the device. (e.g. Temp, Power and Rx/Tx strength) I think I have the parser working for all of the metrics except the Temp, which the devices return as a string containing values in C and F.
So I am experimenting with a way to make a measurement for both scales, and use REGEX to populate that measurement with the appropriate value from the string. The idea is that this would be a graphable value when Grafana pulls it out of the DB.
I'm not getting the measurement with the "C" or "F" suffix, nor is it giving me the value I think I am telling it to isolate. I am hoping that someone can point out where I am going wrong?
Parser and Dashboard Attached:
show-interfaces-diagnostics-optics.parser.yaml.TXT interface_diag_optics.json.TXT