I am trying to monitor Cisco UCS IMC Redfish API using PRTG REST Custom Sensor. The data I want to monitor is the IMC firmware version and its udpate status. From testing, I can get return in JSON format as below
{ "@odata.id": "/redfish/v1/TaskService/Tasks/BmcFwUpdate", "Name": "Task BmcFwUpdate", "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity", "TaskStatus": "OK", "@odata.type": "#Task.v1_3_0.Task", "Id": "BmcFwUpdate", "TaskState": "Completed", "Oem": { "Cisco": { "FWVersion": "4.0(1d)", "UpdateStatus": "Success (100%)" } }, "Description": "Cisco IMC backup firmware version" }
I setup a template file in %PRTG Install folder%\Custom Sensors\REST folder as below.
{ "prtg": { "description" : { "comment": "Get Cisco UCS IMC firmware version and update status" }, "result": [{ "channel": "FWVersion", "ValueLookup": "prtg.standardlookups.cisco.ucs.fwstatus", "Value": $.Oem.Cisco.FWVersion }, { "channel": "UpdateStatus", "ValueLookup": "prtg.standardlookups.cisco.ucs.fwstatus", "value": $.Oem.Cisco.UpdateStatus } ] } }
After setup the sensor, I got error "Could not create channel FWVersion: expected number but got 4.0(1d) (string)". So it appears the sensor did manage to access the API get the correct data, but as "value" only takes in int and float, the channel creation failed. From PRTG doco https://www.paessler.com/manuals/prtg/custom_sensors I cannot find alternative field to use instead of "value". I tried with "text", but the sensor returns "parsing error". Can anyone help?
Hi there,
You are right, the parameter value can only show float or integer value. The only option would be showing the version number in the sensor message section. The syntax might look like this:
Kind regards,
Birk Guttmann, Tech Support Team
Jan, 2021 - Permalink