Custom Metrics
Last updated
Last updated
In the Edge Signal platform, you can access default device monitoring metrics like cpu usage, memory usage, disk usage, cpu temperature, and data usage in the monitoring section.
However, you can also create custom metrics to generate and monitor device data that falls outside of the Edge Signal default metric views using the steps below.
Log in to the Edge Signal platform
Navigate in the sidebar to the ADMINISTRATION section where you’ll find Custom Metrics
At the top right of the page click the Add New button to open a dialogue
Enter a meaningful name, and a relevant key (ensure there are no spaces between the characters in the key you enter)
Note: A key is a topic used by an application to send the relevant data you wish to monitor
For custom metric type, choose between number and enumerated: choose number for instances where the data required is a numeric value, and choose enumerated when the data required is, for example, a state such as on/off or idle/active
Note: Currently only number is supported
Click the Create Metric button, and you will see the custom metric appear in the list
You can modify the name of this custom metric by clicking the pencil icon
You can delete this custom metric by clicking on the info icon
Once created, the custom metric monitoring view will be present in the monitoring page directly after the Edge Signal default metrics
To view the data you wish to monitor, select a device which is currently running an application that is using the Edge Signal API employing the metric key which will allow reporting of the relevant data
When you create a custom metric, it is available across all your account projects
To send data to the Edge Signal platform from your devices, the following API should be implemented on the device:
POST
http://localhost:5000/api/metrics
Sample Request: curl -X POST -H 'Content-Type: application/json' -d '{"metricKey":"metric1","value":"1"}' http://localhost:5000/api/metrics
metricKey: - max length = 10 - min length = 1 - Regex: '^[a-zA-Z0-9._-]*$'
value: - max length = 10 - min length = 1 - Regex: '^[a-zA-Z0-9._-]*$'
metricKey*
String
metricValue*
String