Metric conditions

Get a metric condition

Returns the condition with the hosts and projects it applies to.

get/metric-conditions/{condition}

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Path parameters

conditionstring uuid required

Metric condition ID.

Response

The metric condition.

idstring uuid required

Metric condition ID

metric'cpu_usage' | 'system.cpu.user' | 'system.cpu.system' | 'system.cpu.iowait' | 'system.cpu.stolen' | 'system.cpu.idle' | 'system.cpu.guest' | 'system.cpu.interrupt' | 'memory_usage' | 'system.memory.total' | 'system.memory.used' | 'system.memory.free' | 'system.memory.available' | 'system.memory.available_percent' | 'system.swap.total' | 'system.swap.used' | 'system.swap.free' | 'system.swap.free_percent' | 'system.swap.in' | 'system.swap.out' | 'disk_usage' | 'system.disk_usage.total' | 'system.disk_usage.used' | 'system.disk_usage.free' | 'system.disk_usage.inodes_total' | 'system.disk_usage.inodes_used' | 'system.disk_usage.inodes_free' | 'system.disk_usage.inodes_used_percent' | 'load_average' | 'system.load.1' | 'system.load.5' | 'system.load.15' | 'network_in' | 'network_out' | 'system.net.packets_recv' | 'system.net.packets_sent' | 'system.net.err_in' | 'system.net.err_out' | 'system.net.drop_in' | 'system.net.drop_out' | 'system.net.fifo_in' | 'system.net.fifo_out' | 'system.uptime' | 'system.io.busy_percent' | 'system.io.await_ms' | 'system.pressure.cpu.some' | 'system.pressure.memory.some' | 'system.pressure.io.some' | 'system.net.tcp.established' | 'system.net.tcp.time_wait' | 'system.files.used_percent' required

A host metric the agent reports. cpu_usage, memory_usage, disk_usage, load_average, network_in and network_out are the summaries the dashboard charts; the system.* metrics are the agent's raw values.

conditionMetricCondition required circular
thresholdnumber required

Compared with the metric's value as the agent reports it, in the unit the host's charts show (percent for cpu_usage, memory_usage and disk_usage)

duration_minutesinteger required

Minutes the condition must hold before the alert fires; 0 fires on the first breach

severity'critical' | 'high' | 'medium' | 'low' required

How urgent an alert or incident is. Escalation paths can branch on it.

critical <br/> Customers are affected right now.
high <br/> Serious, needs attention soon.
medium <br/> Should be looked at.
low <br/> Informational.

Example response

{
  "threshold": 90,
  "duration_minutes": 5,
  "hosts": [
    {
      "label": "web-1"
    }
  ],
  "projects": [
    {
      "name": "Production"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.