APIO Analytics - Metrics
APIO core exposes metrics in the Prometheus format on core process on port 9090
. These metrics can be used to monitor the APIO core software.
INFO
The metrics are exposed on port 9090 with no authentication required. Be sure to protect this port from unauthorized access.
Activation
The metrics are automatically enabled by adding a specific license.
Sample
Legacy metrics
curl http://<host>:9090/metrics
# HELP apio_active_instances_total The total number of active instances
# TYPE apio_active_instances_total gauge
apio_active_instances_total 12671
# HELP apio_instances_errors The number of instances in error
# TYPE apio_instances_errors gauge
apio_instances_errors 2
# HELP apio_instances_per_workflow The number of instances per workflow
# TYPE apio_instances_per_workflow gauge
apio_instances_per_workflow{workflow="debug_116"} 11429
apio_instances_per_workflow{workflow="debug_246"} 11
apio_instances_per_workflow{workflow="demo-sip777"} 2
apio_instances_per_workflow{workflow="nden_cb01"} 3
apio_instances_per_workflow{workflow="pxm_get_numbers"} 2
apio_instances_per_workflow{workflow="reporting_add_report"} 5
apio_instances_per_workflow{workflow="reporting_customer_reports"} 2
apio_instances_per_workflow{workflow="reporting_get_customer"} 1
apio_instances_per_workflow{workflow="reporting_get_report"} 47
apio_instances_per_workflow{workflow="reporting_list_report_history"} 2
apio_instances_per_workflow{workflow="reporting_run"} 1
apio_instances_per_workflow{workflow="user_services"} 7
# HELP apio_reponse_time_avg The average response time over the last minute
# TYPE apio_reponse_time_avg gauge
apio_reponse_time_avg 0
# HELP apio_reponse_time_max The maximum response time over the last minute
# TYPE apio_reponse_time_max gauge
apio_reponse_time_max 0
# HELP apio_requests_http_status The number of HTTP status codes
# TYPE apio_requests_http_status gauge
apio_requests_http_status{status="200"} 229
apio_requests_http_status{status="222"} 1
apio_requests_http_status{status="400"} 2
apio_requests_http_status{status="401"} 15
apio_requests_http_status{status="403"} 16
apio_requests_http_status{status="404"} 11
# HELP apio_requests_total The number of requests
# TYPE apio_requests_total gauge
apio_requests_total 294
# HELP apio_users_total The total number of users
# TYPE apio_users_total gauge
apio_users_total 15
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
New per-process metrics
Thiskind of metric contain additional metadata:
- the hostname where the process is running
- a unique uuid identifying the running process
INFO
Per process metrics requires that redis database is configured in Settings -> Configuration -> Cache
apio_requests_total_v2
This metric counts the number of requests received.
Sample output:
# HELP apio_requests_total_v2 The number of requests
# TYPE apio_requests_total_v2 counter
apio_requests_total_v2{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F"} 10
apio_requests_total_v2{hostname="some_host",uuid="00A7FB3B-9B4A-4B58-B3A0-9339362FA62F"} 4
apio_requests_total_v2{hostname="some_other_host",uuid="3BA79666-C142-4B46-8295-1175C5EB99B7"} 3
apio_requests_total_v2{hostname="some_other_host",uuid="487090B3-8D1F-4BDF-94DB-124FE60D50CE"} 7
apio_instances_errors_v2
This metric counts the number of failed instances.
Sample output:
# HELP apio_instances_errors_v2 The number of failed instances
# TYPE apio_instances_errors_v2 counter
apio_instances_errors_v2{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F"} 1
apio_instances_errors_v2{hostname="some_host",uuid="00A7FB3B-9B4A-4B58-B3A0-9339362FA62F"} 2
apio_instances_errors_v2{hostname="some_other_host",uuid="3BA79666-C142-4B46-8295-1175C5EB99B7"} 0
apio_instances_errors_v2{hostname="some_other_host",uuid="487090B3-8D1F-4BDF-94DB-124FE60D50CE"} 0
apio_instances_requests_failed
This metric counts the number of failed requests.
Sample output:
# HELP apio_instances_requests_failed The number of failed requests
# TYPE apio_instances_requests_failed counter
apio_instances_requests_failed{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F"} 0
apio_instances_requests_failed{hostname="some_host",uuid="00A7FB3B-9B4A-4B58-B3A0-9339362FA62F"} 0
apio_instances_requests_failed{hostname="some_other_host",uuid="3BA79666-C142-4B46-8295-1175C5EB99B7"} 0
apio_instances_requests_failed{hostname="some_other_host",uuid="487090B3-8D1F-4BDF-94DB-124FE60D50CE"} 0
apio_active_session_holders
This metric counts the number of currently active sessions per session holder.
Sample output:
# HELP apio_active_session_holders The number of active session holders
# TYPE apio_active_session_holders gauge
apio_active_session_holders{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", session_holder="some_gw"} 1
apio_active_session_holders{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", session_holder="another_gw"} 1
apio_session_holder_errors
This metric counts the number of errors per session holder.
Sample output:
# HELP apio_session_holder_errors The number of errors per session holder
# TYPE apio_session_holder_errors counter
apio_session_holder_errors{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", session_holder="some_gw"} 1
apio_session_holder_errors{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", session_holder="another_gw"} 1
apio_failed_logins
This metric counts the number of failed logins per backend.
Sample output:
# HELP apio_failed_logins The number of failed logins
# TYPE apio_failed_logins counter
apio_failed_logins{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", backend="local"} 1
apio_failed_logins{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", backend="some_sso_name"} 1
apio_total_logins
This metric counts the number of total logins per backend.
Sample output:
# HELP apio_total_logins The number of total logins
# TYPE apio_total_logins counter
apio_total_logins{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", backend="local"} 10
apio_total_logins{hostname="some_host",uuid="9BD86F70-250C-451C-B5F3-A2CE26E9D34F", backend="some_sso_name"} 1
apio_session_holder_latency
This metric reports the quantile latency for the session holder specified in metadata session_holder.
Sample output:
# HELP apio_session_holder_latency The latency of session holder
# TYPE apio_session_holder_latency summary
apio_session_holder_latency{hostname="some_host",session_holder="some_gw",uuid="ce203b46-233b-451a-ad0d-533f71f9009f",quantile="0.5"} 0.002936574
apio_session_holder_latency{hostname="some_host",session_holder="some_gw",uuid="ce203b46-233b-451a-ad0d-533f71f9009f",quantile="0.9"} 0.028208587
apio_session_holder_latency{hostname="some_host",session_holder="some_gw",uuid="ce203b46-233b-451a-ad0d-533f71f9009f",quantile="0.99"} 0.028208587
apio_workflow_duration
This metric reports the quantile duration for the workflow specified in metadata workflow_id.
Sample output:
# HELP apio_workflow_duration The latency of session holder
# TYPE apio_workflow_duration summary
apio_workflow_duration{hostname="some_host",workflow_id="123",uuid="ce203b46-233b-451a-ad0d-533f71f9009f",quantile="0.5"} 0.002936574
apio_workflow_duration{hostname="some_host",workflow_id="123",uuid="ce203b46-233b-451a-ad0d-533f71f9009f",quantile="0.9"} 0.028208587
apio_workflow_duration{hostname="some_host",workflow_id="123",uuid="ce203b46-233b-451a-ad0d-533f71f9009f",quantile="0.99"} 0.028208587