Using the REST API, a list of all monitored hardware sensors in the firewall can be be retrieved. The reply is sent back by cOS Core in JSON format and consists of the values that can also be provided by using the cOS Core CLI hwm command.
Sending the Hardware Monitoring request
To retrieve the information, an HTTP GET should be sent to the following URI:/api/oper/hwm
The GET has no optional parameters.
The hwm information returned
The following is a list of the values sent back in the JSON reply:name - The name given to the hwm object in cOS Core.
value - The current value reported by the configured sensor at the time of the query.
min_limit - The minimum value configured (if set).
max_limit - The max value configured (if set).
unit - The unit type. Temperature (C), Voltage (V), Fan speed (RPM) or GPIO (which returns a blank value for this particular field).
An Example JSON Reply
Below is an example of a typical JSON reply:{ "error": false, "sensors": [ { "name": "CPU_Temp", "value": "51.000", "min_limit": "0.000", "max_limit": "100.000", "unit": "C" }, { "name": "Voltage_CMOS", "value": "3.100", "min_limit": "2.900", "max_limit": "3.200", "unit": "V" }, { "name": "CPU_Fan", "value": "7500.000", "min_limit": "5000.000", "max_limit": "8500.000", "unit": "RPM" } ] }