POST to free PRTG server communication

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
haim
Normal user
Posts: 2
Joined: 14 Mar 2019, 16:14

POST to free PRTG server communication

#1 Post by haim » 06 Oct 2019, 09:04

PRTG is a monitoring system which contains different king of sensors formats and protocols.
You can download it for free with up to 100 sensors.

I am trying to connect ESPEasy ver. 2.0 to PRTG different types of sensors with no success.

I am new to ESPEasy so I will be glad to get a full example format.

I try HTTP IoT Push Data Advanced Sensor

see this link: https://www.paessler.com/manuals/prtg/h ... ced_sensor


or HTTP XML/REST Value Sensor
see this link: https://www.paessler.com/manuals/prtg/h ... lue_sensor

or via HTTP Push data sensor, setting ESPEASY for generic HTTP

see this link: https://www.paessler.com/manuals/prtg/h ... ata_sensor

there are many other options to connect with PRTG but I think those above can work perfectly but i need to get and understand the configuration in ESPEASY needed.

Thanks in advance

haim
Normal user
Posts: 2
Joined: 14 Mar 2019, 16:14

Re: POST to free PRTG server communication

#2 Post by haim » 10 Oct 2019, 08:14

i found the solution how to post to PRTG.
this is not complete as i am using the standard post

DC876E_analog1?name=%sysname%&value=%value%

and for PRTG i am using HTTP post sensor.

you can contact me for more info.

TD-er
Core team member
Posts: 1656
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: POST to free PRTG server communication

#3 Post by TD-er » 10 Oct 2019, 08:45

Could you maybe prepare some basic howto, which we can include in the documentation of ESPEasy as an example use case?

I plan to have some links to existing dashboard systems out there to get people started.

popaserge
Normal user
Posts: 1
Joined: 07 Aug 2019, 19:02

Re: POST to free PRTG server communication

#4 Post by popaserge » 17 Oct 2019, 21:59

You may also use the Generic HTTP Advanced Controller (TDer debugged it a few months ago) and a quad dummy device to send 4 sensor values at the same time to PRTG.

Send your 4 devices values to a quad dummy device by the mean of rules
example for an air temperature : you even may send your values to an other node which can do the final job to PRTG

on Air#Temp do
TaskValueSet 6,2,[Air#Temp] #send value to dummy device task 6 value 2
SendTo 2,TaskValueSet 1,2,[Air#Air] #send value to dummy device on an other node
endon

Configure your dummy device to send the 4 values to the controller

The controller as to be configured as follows:

HTTP Method : Post
HTTP URI: Prtg token from your PRTG sensor + ?content=
HTTP Header: leave empty
HTTP Body: json string
{"prtg":{"result": [{"Channel":"%vname1%","Value":%val1%,"Unit":"Temperature","Float":1,"DecimalMode":2},
{"Channel":"%vname2%","Value":%val2%,"Unit":"Temperature","Float":1,"DecimalMode":2},
{"Channel":"%vname3%","Value":%val3%,"Unit":"Custom","CustomUnit":"mV","Float":1,"DecimalMode":2},
{"Channel":"%vname4%","Value":%val4%,"Unit":"Custom","CustomUnit":"mV","Float":1,"DecimalMode":2}]}}


%vname1%, %vname2%, %vname3% and %vname4% will be replaced by ESPEasy by the names of the 4 values of your dummy device and %val1%, %val2%, %val3% and %val4% by the values.
These names will be automatically taken by PRTG as the name of your sensors on your graphs and monitoring tools.
The other parameters are described in PRTG syntax for custom sensors

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 16 guests