Can I use PRTG to monitor values from the Sigfox API? What steps do I need to take?
1 Reply
This article applies to PRTG Network Monitor 19 or later
Monitoring the Sigfox API with the REST Custom Sensor
The Sigfox API uses the HTTP protocol, which follows the REST principles. Using the REST Custom sensor, you can monitor the Sigfox API. This way you can monitor information like the number of messages received from your Sigfox-connected device, for example.
API Access
The first step is to get your API Access credentials from the Sigfox backend. You will need these for authentication when setting up your REST Custom sensor in PRTG.
Note: The Sigfox API documentation is tailored depending on user rights. See the API documentation in the Sigfox Portal for more information.
Create a REST Configuration File
Because the REST Custom sensor maps JSON/XML results to sensor values, the mapping rule has to be available as a REST configuration file in JSON template (*.template) format according to the PRTG API definition for Custom sensors.
In the \Custom Sensors\rest subdirectory of the probe system's PRTG program directory, create a new REST configuration file, for example:
{ "prtg": { "result": [{ "channel": "Messages last Day", "CustomUnit": "#", "value": $.lastDay }, { "channel": "Messages last Week", "CustomUnit": "#", "value": $.lastWeek }, { "channel": "Messages last Month", "CustomUnit": "#", "value": $.lastMonth } ] } }
Give the template a descriptive name like sigfox.device.template. You will need this when setting up the sensor.
Create a REST Custom Sensor
The next step to montoring the Sigfox API is to add a REST Custom sensor to your PRTG installation.
- Create a new device or use an existing device in PRTG and enter backend.sigfox.com/api as IPv4 Address/DNS Name.
- Add a REST Custom Sensor to the device.
- Configure the sensor as follows.
Click to enlarge. - Select HTTPS as Request Protocol.
- Select Basic authentication as Authentication Method.
- Under User, enter the Login from your Sigfox API Access.
- Under Password, enter the Password from your Sigfox API Access.
- Under REST Query, enter a valid query for your REST resource. For example,
/devices/<Device-ID>/messages/metric
Note: Replace <Device-ID> with the ID of your device in the Sigfox backend. - Under REST Configuration, select the REST configuration file sigfox.device.template that you created earlier.
- Click Create to create the sensor.
The sensor now displays the information from the Sigfox API.
Click to enlarge.
More
Created on Jul 9, 2018 1:33:51 PM by
Brandy Greger [Paessler Support]
Last change on Jul 24, 2019 8:31:40 AM by
Maike Behnsen [Paessler Support]
Please log in or register to enter your reply.
Add comment