Below is the json result
I want to receive an alert when "enabled" is not "yes".
And I would like to see the following results in PRTG as a message,
No matter how I make a template, an error occurs. Ask for help how to create a template.
Please Help me.....
{
"instance_name": "sso9090",
"restart": "false",
"started": "yes",
"id": "sso9090",
"version": "1610601403",
"enabled": "yes"
},
{
"instance_name": "sso8080",
"restart": "false",
"started": "yes",
"id": "sso8080",
"version": "1610960581",
"enabled": "yes"
}
Article Comments
Hello SMJ,
The custom sensors require a particular syntax for PRTG which is documented on the Setup > PRTG API > Custom Sensors page.
For single values, it looks like this:
{
"prtg": {
"result": [
{
"channel": "First channel",
"value": 10
},
{
"channel": "Second channel",
"value": 20
}
]
}
}
This means that you need to convert the Enabled: Yes / No into an integer for PRTG, since PRTG does only store numerical values.
For the error message
{
"prtg": {
"error": 1,
"text": "Not Enabled"
}
}
would be the required syntax. The text will then be visible in the sensor message, but not evaluated for thresholds.
Hope this helps.
Kind regards,
Felix Saure, Tech Support Team
Mar, 2021 - Permalink
Hello SMJ,
The custom sensors require a particular syntax for PRTG which is documented on the Setup > PRTG API > Custom Sensors page.
For single values, it looks like this:
This means that you need to convert the Enabled: Yes / No into an integer for PRTG, since PRTG does only store numerical values.
For the error message
would be the required syntax. The text will then be visible in the sensor message, but not evaluated for thresholds.
Hope this helps.
Kind regards,
Felix Saure, Tech Support Team
Mar, 2021 - Permalink