Hi,
i want to add new sensors using a linux system.
So i wanted to use curl doing some api calling.
Is this even possible ? I found nothing about that in your docs.
Regars, Robert
Article Comments
All i want todo is to add some new sensors to new provisioned system. I don't want to do this manually so i wondered if this is possible via api call.
For example add a http sensor or TLS certifiacte sensor to a service.
Jun, 2020 - Permalink
You can either:
- Use device templates to deploy multiple sensors add once.
- It is possible to clone sensors via API. The documentation can be found directly in PRTG, menu Setup > PRTG API, tab "Object Manipulation".
- Use the Powershell API from LordMilko (a third party supplier; therefore not supported by Paessler) Also see: https://helpdesk.paessler.com/en/support/solutions/articles/79033
Jun, 2020 - Permalink
thanks for your answer - i know theres a powershell api.
my questions are:
- is this also possible without powershell just using curl for example - do i always need to have device template or can i simply add completely new sensors
Jul, 2020 - Permalink
You could use curl for http requests and use the API-calls mentioned here: "Setup > PRTG API, tab "Object Manipulation". I'm afraid it's not possible to add completely new sensors, you can however clone a sensor and change its settings.
Jul, 2020 - Permalink
Hello Robert,
What are you trying to monitor exactly using the curl api call? You can use the SSH Script Sensor to execute the script of your choice. You need to copy the script to the target host in the directory /var/prtg/scripts. You can find the required syntax on the Setup > PRTG API > Custom Sensors page. The result needs to look like that: returncode:value:message, where the return code looks as follows:
Kind Regards,
Timo Dambach
Paessler Tech Support
Jun, 2020 - Permalink