Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
    • Repair Yoast indexables
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning
Documentation/Monitoring and logs/Metrics

Metrics

LAST UPDATED

3 months ago

    WP Cloud Metrics provides high-resolution, time-series telemetry for individual sites and an entire WP Cloud host client account. Partners can use Metrics for dashboards, reporting, traffic analysis, cache measurements, and performance investigations.

    The Metrics feature announcement provides additional background on the current telemetry system.

    Use the Time Series Metrics endpoint under /metrics/.

    Choose a site or client query

    The endpoint supports two scopes:

    ScopePath
    Site/metrics/site/{atomic_site_id-or-primary_domain}
    Host client account/metrics/client/{atomic_client_id-or-client_slug}

    A site query can use an Atomic Site ID or primary domain. Use the persistent Atomic Site ID in stored integrations so a domain change does not break the query.

    Each response contains a series of periods. A period’s timestamp is the start of its time bucket, and data._meta.resolution gives the bucket length in seconds. A dimension splits each metric into values such as hostname, HTTP status, request path, or visitor operating system.

    Metrics can come from different data sources. Only compatible metrics and dimensions can be combined; a mixed or invalid combination returns HTTP 400.

    Set request parameters

    start and end are required. They accept Unix timestamps or date strings parsed by PHP’s strtotime() function, and start must be earlier than end.

    ParameterTypeDefaultPurpose
    startNumber or date stringRequiredBeginning of the requested range.
    endNumber or date stringRequiredEnd of the requested range.
    metricString or arrayresponse_time_averageOne or more metrics from the same data source.
    dimensionString or arrayhttp_hostOne dimension for multiple metrics, or up to five dimensions for one metric.
    resolutionInteger, in secondsAutomaticRequests a larger time bucket. It cannot force a finer bucket than the available data.
    summarizePath suffixOffUses /summarize to return one aggregate bucket.
    filters[...]Array of clausesNoneRestricts results by supported dimensions.
    max_bucket_sizeInteger from 1 through 2020Limits the number of dimension values returned for each time bucket.

    The endpoint returns at most 100 time periods. It selects a bucket size from the query range, requested age, and available stored resolution. Current data sources provide resolutions up to:

    • 10 seconds for data from the last seven days;
    • five minutes for data from the last 30 days;
    • one hour for data from the last 90 days; and
    • one day for older data.

    resolution can request a larger bucket. For example, if the endpoint selects 240 seconds, a requested resolution of 300 seconds is accepted, while a request for a smaller bucket is ignored.

    When a chart or calculated value looks impossible, preserve the exact query window, requested resolution, returned data._meta.resolution, metrics, dimensions, and filters before changing the query. Values from different windows or bucket sizes cannot be compared directly.

    max_bucket_size works like a top-X limit for each period, such as the top 10 referrers or top five autonomous system numbers (ASNs). Its maximum and default are both 20.

    Filter a metric

    Each filter contains a column, operator, and value. All filters are joined with AND; the endpoint does not support OR.

    FieldTypeNotes
    filters[n][column]StringMust be a supported dimension or filter column for the selected metric source.
    filters[n][operator]StringIN, NOT IN, =, !=, >, >=, <, or <=.
    filters[n][value]String, number, or arrayArrays are supported with IN and NOT IN.

    For example, this filter restricts a request metric to POST requests:

    filters[0][column]=request_method
    filters[0][operator]=%3D
    filters[0][value]=POST

    When form-encoded, the equality operator is sent as %3D.

    Edge request metrics and dimensions

    Edge request metrics include:

    MetricUnitMeaning
    requestsCountTotal HTTP requests.
    requests_persecCount per secondRequest rate.
    response_bytesBytesTotal response bandwidth.
    response_bytes_persecBytes per secondResponse bandwidth rate.
    response_bytes_averageBytesAverage response size.
    response_time_averageSecondsAverage response time and the default metric.
    php_response_time_sumSecondsTotal PHP rendering time for requests handled by PHP.
    edge_cache_hit_percentagePercentRequests reported as Edge Cache hits.
    edge_cache_miss_percentagePercentRequests reported as Edge Cache misses.

    Available dimensions and aliases include:

    DimensionAliasMeaning
    http_versionserver_protocolHTTP version used by the client.
    http_verbrequest_methodHTTP request method.
    http_host—Request hostname and the default dimension.
    http_status—HTTP response status.
    http_user_agent—Request user agent.
    http_refererreferer_domainRequest referrer.
    page_rendererrequest_rendererBackend that handled the request, such as PHP or a static-file handler.
    page_is_cachedis_upstream_cachedWhether an upstream cache served the response.
    wp_admin_ajax_action—Action supplied to /wp-admin/admin-ajax.php.
    visitor_asnasnASN associated with the request.
    visitor_country_codecountry_codeVisitor country inferred through GeoIP.
    visitor_is_crawleris_crawlerWhether the visitor appears to be an automated crawler.
    visitor_device_type—Detected device type.
    visitor_is_logged_in—Whether the visitor appears to be logged in.
    visitor_os—Detected operating system.
    visitor_browser—Detected browser.
    edge_cache_status—Edge result such as HIT, STALE, EXPIRED, UPDATING, MISS, or BYPASS.
    is_rate_limited—Whether WP Cloud rate limited the request.
    rate_limit_reason—Recorded reason for rate limiting.
    datacenter—Edge point-of-presence code.
    path—Request path without the query string.
    remote_address—Visitor address associated with the request.
    atomic_site_id—WP Cloud Atomic Site ID.
    proxy_type—Detected proxy type.

    Boolean dimensions are serialized as the strings "true" and "false" in responses.

    PHP metrics and dimensions

    PHP metrics include:

    MetricMeaning
    php_cpu_timeTotal PHP CPU time.
    php_cpu_time_persecPHP CPU time per second.
    php_response_timeTotal PHP response time.
    php_requestsNumber of PHP requests.
    php_requests_persecPHP requests per second.
    php_workers_averageAverage PHP workers in use.
    php_workers_minMinimum PHP workers in use.
    php_workers_maxMaximum PHP workers in use.
    php_request_burst_percentagePercentage of requests in burst mode.
    php_request_limited_percentagePercentage of requests limited from burst mode.
    php_request_normal_percentagePercentage of requests not in burst mode.

    PHP dimensions are http_verb, http_host, datacenter, atomic_site_id, and burst_status. burst_status reports BURST, LIMITED, or -.

    Visitor metrics

    uniques reports unique visitors, and views reports page views. Both are aggregated from edge data as daily statistics and use hostname as their dimension.

    MySQL metrics and dimensions

    MySQL user-statistics metrics are available only for /metrics/site; /metrics/client does not support them. Every metric also has a _persec variant that reports its rate per second.

    MetricMeaning
    mysql_total_connectionsTotal connections.
    mysql_concurrent_connectionsConcurrent connections.
    mysql_connected_timeCumulative seconds with active connections.
    mysql_busy_timeCumulative seconds with activity on connections.
    mysql_cpu_timeCumulative CPU time spent servicing connections.
    mysql_bytes_receivedBytes received.
    mysql_bytes_sentBytes sent.
    mysql_binlog_bytes_writtenBytes written to the binary log.
    mysql_rows_readRows read from tables.
    mysql_rows_sentRows sent from tables.
    mysql_rows_deletedRows deleted.
    mysql_rows_insertedRows inserted.
    mysql_rows_updatedRows updated.
    mysql_select_commandsSELECT commands.
    mysql_update_commandsUPDATE commands.
    mysql_other_commandsOther commands.
    mysql_commit_transactionsCOMMIT commands.
    mysql_rollback_transactionsROLLBACK commands.
    mysql_denied_connectionsDenied connections.
    mysql_lost_connectionsConnections terminated without a clean close.
    mysql_access_deniedCommands denied by the database.
    mysql_empty_queriesEmpty queries.
    mysql_total_ssl_connectionsConnections that used SSL.
    mysql_max_statement_time_exceededQueries that exceeded the maximum statement time.

    MySQL dimensions are pool, server, and atomic_site_id.

    PHP cgroup metrics and dimensions

    Cgroup user statistics describe PHP process CPU use and are available only for /metrics/site.

    MetricMeaning
    cgroup_cpu_usagePHP CPU usage.
    cgroup_cpu_usage_persecPHP CPU usage per second.

    Cgroup dimensions are pool, server, and atomic_site_id.

    Interpret responses

    Response metadata describes the returned periods:

    FieldMeaning
    data._meta.startStart of the returned range.
    data._meta.endEnd of the returned range.
    data._meta.resolutionSeconds represented by each period.
    data._meta.metric or metricsRequested metric or metrics.
    data._meta.dimension or dimensionsRequested dimension or dimensions.
    data._meta.tookBackend query time.
    data.periods[].timestampStart of that period.
    data.periods[].dimensionDimension values and their metric values for the period.

    A single-metric response has this form:

    {
      "message": "OK",
      "data": {
        "_meta": {
          "start": 1685577600,
          "end": 1685581200,
          "resolution": 300,
          "metric": "response_time_average",
          "dimension": "http_host",
          "took": 123
        },
        "periods": [
          {
            "timestamp": 1685577600,
            "dimension": {
              "example.com": 0.03431913399587993
            }
          }
        ]
      }
    }Code language: JSON / JSON with Comments (json)

    With multiple metrics and one dimension, the dimension contains a value group for each metric:

    {
      "message": "OK",
      "data": {
        "_meta": {
          "start": 1685577600,
          "end": 1685581200,
          "resolution": 300,
          "metrics": [
            "response_bytes_average",
            "response_time_average"
          ],
          "dimensions": ["http_verb"],
          "took": 123
        },
        "periods": [
          {
            "timestamp": 1685577600,
            "http_verb": {
              "response_bytes_average": {
                "GET": 42957.75494847475,
                "POST": 1990.5416771631374
              },
              "response_time_average": {
                "GET": 0.06258511425461395,
                "POST": 0.4576846168664701
              }
            }
          }
        ]
      }
    }Code language: JSON / JSON with Comments (json)

    Common errors include:

    HTTP statusCause
    400Missing time range, unsupported metric, incompatible source combination, invalid dimension, or a request that combines multiple metrics with multiple dimensions.
    403The API key, source address, host client account, or endpoint scope does not allow the request.
    404The site was not found.
    500WP Cloud could not complete the metrics query.

    Example requests

    Replace the timestamps and identifiers with values for the time range and WP Cloud host client account or site you need to inspect.

    Requests by visitor operating system:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --data-urlencode 'metric=requests' \
      --data-urlencode 'dimension=visitor_os' \
      --data-urlencode 'start=1740084605' \
      --data-urlencode 'end=1740581405' \
      "https://atomic-api.wordpress.com/api/v1.0/metrics/site/${WP_CLOUD_SITE_ID}"Code language: JavaScript (javascript)

    MySQL CPU use:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --data-urlencode 'metric=mysql_cpu_time_persec' \
      --data-urlencode 'dimension=atomic_site_id' \
      --data-urlencode 'start=1740084605' \
      --data-urlencode 'end=1740581405' \
      "https://atomic-api.wordpress.com/api/v1.0/metrics/site/${WP_CLOUD_SITE_ID}"Code language: JavaScript (javascript)

    Unique visitors and views in one response:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --data-urlencode 'metric[]=uniques' \
      --data-urlencode 'metric[]=views' \
      --data-urlencode 'dimension=hostname' \
      --data-urlencode 'start=1740084605' \
      --data-urlencode 'end=1740581405' \
      "https://atomic-api.wordpress.com/api/v1.0/metrics/site/${WP_CLOUD_SITE_ID}"Code language: JavaScript (javascript)

    Device-type requests restricted to POST:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --data-urlencode 'metric=requests' \
      --data-urlencode 'dimension=visitor_device_type' \
      --data-urlencode 'start=1740084605' \
      --data-urlencode 'end=1740581405' \
      --data-urlencode 'filters[0][column]=request_method' \
      --data 'filters[0][operator]=%3D' \
      --data-urlencode 'filters[0][value]=POST' \
      "https://atomic-api.wordpress.com/api/v1.0/metrics/site/${WP_CLOUD_SITE_ID}"Code language: JavaScript (javascript)
    Previous Web server logs
    Next Application performance monitoring

    Related Guides

    • Error logs

      Retrieve WP Cloud PHP error logs and understand how debugging settings and rate limits affect…

      3 Min.

      READ

    • Web server logs

      Retrieve WP Cloud origin web server logs and use Metrics for requests served at the…

      2 Min.

      READ

    • Application performance monitoring

      Capture request traces for a short window and inspect application work in the temporary APM…

      2 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications