Uptime pingdom api
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

Uptime pingdom api

martip07martip07 Member
edited December 2012 in Help

How can I check how many hours a server is up using Pingdom API?

this is the example of php code that show days but I would lie to check and show days too.

thank you for your time:


https://martip07.me/ - Freelance Sysadmin.



  • Uptime is one thing, and time since last downtime is another.

    Pingdom can't give you a server's uptime.

    Fusioned | KVM SSD VPS | LSI RAID10 | Netherlands 1Gbps | R1Soft | IPv4 & IPv6 | SolusVM
  • mm good point .......

    https://martip07.me/ - Freelance Sysadmin.

  • WintereiseWintereise Member
    edited December 2012

    Uptime since last downtime would be pretty easy to figure out from that snippet, but as George said, you can't find out the real uptime via pingdom.

        $response = json_decode(curl_exec($curl), true);
    if (isset($response['error'])) {
    exit('Error: ' . $response['error']['errormessage']);
    $days = floor((time() - $response['check']['lasterrortime']) / 86400);
    $hours = // calculate $days * 24 here, should be easy ;)

    -- BOFH

Sign In or Register to comment.