Server Monitoring

Track and visualize system-level metrics across your servers using simple, real-time charts. The Server Monitoring feature provides a clear overview of essential resource usage — including CPU usage, memory consumption, disk activity, and network traffic.

This feature is designed for teams that need lightweight server insights presented in an accessible format. It offers visual clarity into how server resources are consumed over time.

Use cases:
  • Visual monitoring — View usage patterns in simple charts without complex analysis tools.
  • Trend spotting — Observe gradual changes in resource behavior over hours or days.
  • Health awareness — Stay informed about basic server activity at a glance from your dashboard.

To enable this feature, install the monitoring agent and connect it to your server. For setup instructions, see the Server Monitoring Installation Guide.
ENDPOINTS
Expand all
  • Server monitoring operations
    POST/v1/server-resource
    DELETE/v1/server-resource
    PUT/v1/server-resource/{id}
  • Server monitoring records
  • Server performance metrics overview
Setup Server for Monitoring
Register a new server for metric tracking by providing details such as service_id, name, description, and timezone. This endpoint creates a server monitoring resource, allowing you to visualize essential system metrics like CPU, memory, and disk usage through charts.

Once configured, the server will begin reporting usage data to your dashboard, giving your team consistent visibility into system activity across different services and environments.

Use cases:
  • Infrastructure setup — Quickly onboard new servers and begin tracking system-level metrics without deep configuration.
  • Timezone labeling — Assign a timezone to each server so that metric timestamps in visualizations reflect local server time, improving clarity during reviews.
  • Visual trend tracking — View how system resource usage evolves over time to assist in capacity planning or basic diagnostics.

    Authorization: Bearer YOUR_TOKEN

    Request Body Parameters
    • service_id string
      The unique service ID associated with the server resource. Example: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98'
    • name string
    • description string
    • timezone string
    • chart_type_default string
    • os string
    • metric_types_basic array
    • metric_types_advanced array
    • metric_types_complex array
    • interval integer
    • enabled boolean
    JavaScript
    Response codes
    const axios = require('axios');
    
    const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource';
    const data = {
      service_id: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98',
      name: 'Resource name',
      description: 'Resource description',
      timezone: 'Europe/Berlin',
      chart_type_default: 'line',
      os: 'ubuntu',
      metric_types_basic: ['cpu-total-usage'],
      metric_types_advanced: ['disk-io-unified'],
      metric_types_complex: ['processes-unified'],
      interval: 60,
      enabled: true
    };
    
    axios.post(url, data, {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      }
    })
    .then(response => {
      console.log(response.data);
    })
    .catch(error => {
      console.error(error);
    });
    ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Delete Multiple Server Monitors
Delete multiple server monitoring resources in a single request by passing their corresponding monitor_ids as query parameters. This bulk operation is ideal for cleaning up inactive, deprecated, or test servers from your monitoring environment.

It simplifies server management by allowing teams to remove several monitored servers at once instead of deleting them individually.

Use cases:
  • Infrastructure cleanup — Remove outdated or unused server entries to keep the monitoring dashboard organized and relevant.
  • Environment resets — Clear demo or temporary monitors after staging or testing phases.
  • Bulk offboarding — When retiring multiple servers or services, use this endpoint to efficiently decommission their monitors.


Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified server monitoring resources will be deleted, and a confirmation message along with the IDs of the deleted resources will be returned.
  • If the request is unauthorized or the provided IDs are invalid, an error message will be returned, specifying the issue.
Query Parameters
  • id string
    A list of server resource IDs to delete.
    Example: ['6766163a-568d-47b4-a1fa-91a0957e06d4', 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'].
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource?id=6766163a-568d-47b4-a1fa-91a0957e06d4&id=c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Update Server Monitor
Update an existing server monitoring resource by specifying its monitor_id in the path and submitting the new configuration values in the request body. You can modify properties such as the name, description, or timezone to keep the server's metadata up to date.

This endpoint is helpful for maintaining clear and meaningful labels in your monitoring dashboard, especially when server roles change, descriptions need refinement, or timezone alignment improves data readability.

Use cases:
  • Rename monitored servers — Keep server names consistent with their real-world purpose or environment.
  • Update descriptions — Add context or notes that make it easier to identify monitored systems during troubleshooting.
  • Correct timezone configuration — Ensure metric timestamps align with local server time for easier data interpretation.

To view the current details of a server before updating, use the Get Specific Server Monitor endpoint.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the server resource will be updated, and a confirmation message along with the updated resource ID will be returned.
  • If the request is unauthorized or the provided ID is invalid, an error message will be returned, specifying the issue.
Path Parameters
  • id string
    The unique ID of the server resource to be updated. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
Request Body Parameters
  • service_id string
    The unique service ID associated with the server resource.
    Example: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98'
  • name string
  • description string
  • timezone string
  • chart_type_default string
  • os string
  • metric_types_basic array
  • metric_types_advanced array
  • metric_types_complex array
  • interval integer
  • enabled boolean
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource/445a5c1f-c0eb-403a-96d7-3976e5dc74ed';
const data = {
  service_id: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98',
  name: 'Resource name',
  description: 'Resource description',
  timezone: 'Europe/Berlin',
  chart_type_default: 'line',
  os: 'ubuntu',
  metric_types_basic: ['cpu-total-usage'],
  metric_types_advanced: ['disk-io-unified'],
  metric_types_complex: ['processes-unified'],
  interval: 60,
  enabled: true,
};

axios.put(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Full List of Server Monitoring Records
Retrieve a complete list of all server monitoring resources associated with a specific service by providing the service_id in the path. This endpoint returns metadata for each registered server, allowing teams to see which servers are actively being monitored under a given service.

Pagination is supported through the limit and page query parameters, making it easier to manage large infrastructures and avoid overloading responses.

Use cases:
  • Monitoring overview — View all servers linked to a service in one place for easy review and filtering.
  • Infrastructure audits — Confirm which servers are actively tracked, and identify naming, description, or timezone discrepancies.
  • Bulk operations support — Use the returned list to trigger updates, cleanups, or batch actions across monitored servers.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the service.
    Example: '906a3444-15ce-4410-8041-89a238e9e91f'
Query Parameters
  • page (optional) positive integer
    The page of the result. Use this parameter to paginate through results when there are multiple pages of data.
    Example: 50.
  • limit (optional) positive integer
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/service/906a3444-15ce-4410-8041-89a238e9e91f/server-resources?limit=50&page=1';

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Get Specific Server Monitor
Retrieve detailed information about a specific server monitoring resource by providing its monitor_id in the path. The response includes metadata such as the server name, description, timezone, and service association, allowing you to review its current configuration.

This endpoint is helpful for inspecting how a server is registered within your monitoring system before performing updates, deletions, or analysis.

Use cases:
  • Pre-update verification — Review server details before applying changes using the Update Server Monitor endpoint.
  • Metadata auditing — Validate naming, descriptions, or timezone settings across your monitored infrastructure.
  • Troubleshooting support — Identify the specific server configuration when investigating metric charts or alerts.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the server resource.
    Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/server-resource/445a5c1f-c0eb-403a-96d7-3976e5dc74ed';

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
View Server Performance Metrics
Retrieve time-series metric data for a specific server by providing its monitor_id in the path. This endpoint allows you to query server resource usage — such as CPU, memory, disk, or network — across a specified time window.

You can refine the results using query parameters like type (e.g., cpu, memory), start_date, end_date, interval (e.g., on-demand, hourly), and limit to control the resolution and size of the returned dataset.

Use cases:
  • Chart rendering — Populate monitoring dashboards with metric visualizations for a selected server and time period.
  • Usage trend analysis — Explore how system resource consumption changes over time to assist with capacity planning.
  • Spike investigation — Drill into specific intervals to identify periods of high usage or irregular activity.


Authorization: Bearer YOUR_TOKEN


Path Parameters
  • id string
    The unique ID of the server resource for which metrics are being retrieved. Example: '9bb4505f-6073-4a9b-abd3-cc698f695c7b'
Query Parameters
  • type string
    The type of metric being retrieved. The accepted values are: 'cpu-total-usage', 'memory-usage', 'disk-io-unified', 'disk-usage-unified', 'system-load-unified', 'swap-usage', and 'network-usage-unified'.
    Example: 'cpu-total-usage'
  • start_date (optional) string
  • end_date (optional) string
  • interval (optional) string
  • limit (optional) positive integer
JavaScript
Response codes
const axios = require('axios');

const url = 'https://statistic-query.api.pinghome.io/v1/server-resource/9bb4505f-6073-4a9b-abd3-cc698f695c7b/metrics?type=cpu-total-usage&start_date=2023-04-03T21:00:00Z&end_date=2023-04-03T22:04:00Z&interval=on-demand&limit=100';

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).