KPI real time information

All monitoring information regarding Key Performance Indicators(KPI) are available through the Centreon API. The kpi list is ordered by impact.

Using GET method and the URL below:

api.domain.tld/centreon/api/index.php?object=centreon_bam_realtime_kpi&action=list

Header:

key value
Content-Type application/json
centreon-auth-token the value of authToken you got on the authentication response

Parameters

You can pass a list of parameters in order to select the data you want.

Parameters values
kpi_id filter on kpi id
kpi_search filter pattern on kpi name
ba_search filter pattern on ba name
is_impacting filter on impacting kpi (false, true)
kpi_status filter on kpi status (ok, warning, critical, unknown) multiple statuses can be set separated by commas
ba_status filter on ba status (ok, warning, critical, unknown) multiple statuses can be set separated by commas
limit number of lines you want
number page number

Using GET method and the URL below:

api.domain.tld/centreon/api/index.php?object=centreon_bam_realtime_kpi&action=list&kpi_status=ok,warning&number=0&limit=2

Response

[
  {
      "id": "366",
      "activate": "1",
      "ba_id": "47",
      "ba_name": "DB-Oracle-Accounting",
      "ba_activate": "1",
      "type": "0",
      "kpi_host": "srv-oracle-accounting",
      "kpi_host_id": "149",
      "kpi_service": "Query -Stores-",
      "kpi_service_id": "1172",
      "kpi_ba": "",
      "kpi_ba_id": "",
      "kpi_meta": "",
      "kpi_meta_id": "",
      "kpi_boolean": "",
      "kpi_boolean_id": "",
      "last_state_change": "1517297343",
      "current_impact": "0",
      "in_downtime": "0",
      "acknowledged": "0",
      "warning_impact": "0",
      "critical_impact": "30",
      "unknown_impact": "10",
      "name": "srv-oracle-accounting / Query -Stores-",
      "type_label": "Service",
      "output": "Query <Stores> executed on 0.021 second",
      "current_status": "0",
      "current_status_label": "OK",
      "ba_current_status": "0",
      "ba_current_status_label": "OK"
  },
  {
      "id": "365",
      "activate": "1",
      "ba_id": "47",
      "ba_name": "DB-Oracle-Accounting",
      "ba_activate": "1",
      "type": "0",
      "kpi_host": "srv-oracle-accounting",
      "kpi_host_id": "149",
      "kpi_service": "Query -Stock-",
      "kpi_service_id": "1171",
      "kpi_ba": "",
      "kpi_ba_id": "",
      "kpi_meta": "",
      "kpi_meta_id": "",
      "kpi_boolean": "",
      "kpi_boolean_id": "",
      "last_state_change": "1511356592",
      "current_impact": "0",
      "in_downtime": "0",
      "acknowledged": "0",
      "warning_impact": "0",
      "critical_impact": "30",
      "unknown_impact": "10",
      "name": "srv-oracle-accounting / Query -Stock-",
      "type_label": "Service",
      "output": "Query <Stock> executed on 0.786 second",
      "current_status": "0",
      "current_status_label": "OK",
      "ba_current_status": "0",
      "ba_current_status_label": "OK"
  }
]

Notes

  • kpi_type : 0 = service, 1 = metaservice, 2 = BA, 3 = boolean rule
  • kpi_name : name of the kpi (<host> / <service> or <metaservice> or <ba_name> or <boolean_rule>)
  • kpi_current_status : 0 = ok, 1 = warning, 2 = critical, 3 = unknown
  • ba_current_status : 0 = ok, 1 = warning, 2 = critical, 3 = unknown
  • current_impact : imapct on linked BA in %
  • number : page number (first page is 0)
  • limit : page limit (default: 30)