Is there a sensor to monitor uptimerobot data?


Article Comments

Hello Thor,

At this time, no. We do not have a sensor for Uptime Robot.

Benjamin Day
[Paessler Suppport]


Feb, 2022 - Permalink

Hello Thor,

At this time, no. We do not have a sensor for Uptime Robot.

Benjamin Day
[Paessler Suppport]


Feb, 2022 - Permalink

and do you have any example of api access to a provider that is easy to implement?


Feb, 2022 - Permalink

Hi Benjamin

With PS script I have been able to access UptimeRobot with this result:

$APIKeyWrite = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$APIUrl = "https://api.uptimerobot.com/v2/"
$listMonitors = "getMonitors"
$urlRequest = $APIUrl+$listMonitors
$contentType = "application/x-www-form-urlencoded"
$headers = @{"cache-control"="no-cache"}
$params = @{"api_key"=$APIKeyWrite;
            }

$contentWrite = (Invoke-WebRequest -Uri $urlRequest -Method POST -Headers $headers -body $params).content



<?xml version="1.0"?>
<monitors stat="ok">
    <pagination>
        <offset>0</offset>
        <limit>50</limit>
        <total>40</total>
    </pagination>
    <monitor id="790047106" friendly_name="SENSOR01" url="https://sensor01.com" type="1" sub_type="" keyword_type="null" keyword_case_type="null" keyword_value="" http_username="" http_password="" port="" interval="900" timeout="30" status="2" create_datetime="1639410071"/>
    <monitor id="789857369" friendly_name="SENSOR02" url="https://sensor02.com" type="1" sub_type="" keyword_type="null" keyword_case_type="null" keyword_value="" http_username="" http_password="" port="" interval="60" timeout="30" status="0" create_datetime="1637861689"/>
    <monitor id="787115031" friendly_name="SENSOR03" url="https://sensor03.com" type="1" sub_type="" keyword_type="null" keyword_case_type="0" keyword_value="" http_username="" http_password="" port="" interval="60" timeout="30" status="2" create_datetime="1612286255"/>
</monitors>

I would be interested in a sensor that shows 'friendly_name' and 'status', being status=2 OK and another value DOWN (alert)


Feb, 2022 - Permalink

Thor,

OK, so with that output, you just need to come up with a script to take that data, and form it into a format that PRTG is OK with. Here is the definitions for our custom sensors.

Advanced Script, HTTP Data, and REST Custom Sensors

Benjamin Day
[Paessler Support]


Feb, 2022 - Permalink

Benjamin,

Can you give me an example, please?


Feb, 2022 - Permalink

Thor,

I do not have any examples, as this would be custom sensor work. At this time, we do not support or assist with custom sensor work. I can introduce you to some of our partners who can assist with this if you would like.

Benjamin Day
[Paessler Support]


Feb, 2022 - Permalink