Skip to content

SDK: Unable to retrieve uptime percentage after Monitor update #60

@iizno

Description

@iizno

Summary

Since the new Monitor update, it’s no longer possible to retrieve the uptime percentage value using the SDK.

Steps to Reproduce

  1. Call the uptime check summary:

    $uptime_check = $ohdear->checkSummary(<site_id>, CheckType::Uptime);

    Result:

    OhDear\PhpSdk\Dto\CheckSummary {
      +result: "succeeded"
      +summary: null
    }
    
  2. Call the performance check summary:

    $performance_check = $ohdear->checkSummary(<site_id>, CheckType::Performance);

    Result:

    OhDear\PhpSdk\Dto\CheckSummary {
      +result: "succeeded"
      +summary: null
    }
    
  3. Try to fetch uptime percentage from metrics:

    • $ohdear->httpUptimeMetrics → only returns latency, uptime percentage is missing
    • $ohdear->tcpUptimeMetrics and $ohdear->pingUptimeMetrics → always return 0 values, even with different UptimeMetricsSplit values and date ranges

    Example:

    $uptimes = collect($ohdear->pingUptimeMetrics(
        <site_id>,
        now()->subDays($days)->format('Y-m-d H:i:s'),
        now()->format('Y-m-d H:i:s'),
        UptimeMetricsSplit::Day,
    ));

    Result: empty data set (all values are 0)

Image

Expected Behavior

  • checkSummary should return the uptime/performance summary (including uptime percentage)
  • Metrics endpoints (httpUptimeMetrics, tcpUptimeMetrics, pingUptimeMetrics) should provide actual uptime percentage values

Actual Behavior

  • checkSummary always returns summary: null
  • Metrics endpoints do not return uptime percentage (or return only zeros)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions