New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Create custom configuration template file for Rest Custom sensor

Votes:

0

Your Vote:

Up

Down

Good day.

I receive response from API server like this:

{
"output": null,
"errorList": [ {
"text": "There is no person with provided PIN",
"type": 7
}],
"errorPayload": null,
"isSuccess": false
}

Tell me, please, how can I create configuration template file for this vale so that sensor switch to green color?

prtg rest value

Created on Sep 13, 2018 1:04:11 PM by  Afon (0) 1

Last change on Sep 17, 2018 6:26:57 AM by  Sebastian Kniege [Paessler Support]



3 Replies

Votes:

0

Your Vote:

Up

Down

Hello Afon,

Thank you very much for your contact.

Do you already monitor this output with a Rest Custom sensor?
Just to check, did you already review the corresponding manual article in regards to the REST Custom Sensor? Please also see this section, that refers to details about the return value format.

Best regards,
Sebastian

Created on Sep 17, 2018 6:30:55 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

Your Vote:

Up

Down

From manual, I can't find how to output the text value which I got from API endpoint. I can't write the syntax this procedure correctly. Let me understand how I must declare variable for the text type, how assign value to this variable?

Thanks.

Created on Sep 17, 2018 8:57:44 AM by  Afon (0) 1



Votes:

0

Your Vote:

Up

Down

Hello Afon,

Please check the formatting of the text. It should be outside of the result as stated in our Custom Sensors documentation.

{
  "prtg": {
    "text": "Found State-Value: " + $.name.state,
    "result": [
      {
        "channel": "State",
        "value": lookup($.name.state, "active"),
        "limitmode": 1,
        "LimitMinError": 0,
        "LimitErrorMsg": "The value for 'state' is not 'active'!"
      }
    ]
  }
}

Best regards,
Sebastian

Created on Sep 19, 2018 5:10:44 AM by  Sebastian Kniege [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.