forked from Normation/rudder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #18781: Replace stats API by a prometheus endpoint
- Loading branch information
Showing
22 changed files
with
521 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl http://localhost:3030/metrics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# SPDX-License-Identifier: CC-BY-SA-2.0 | ||
# SPDX-FileCopyrightText: 2013-2020 Normation SAS | ||
get: | ||
summary: Get metrics | ||
description: Get metrics in prometheus format. You need to configure prometheus to scrape `http://localhost:3030/metrics` on the relay. | ||
operationId: getMetrics | ||
responses: | ||
"200": | ||
description: Prometheus metrics | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
format: Prometheus metrics | ||
example: | | ||
# HELP rudder_relayd_inventories_total Agent inventories | ||
# TYPE rudder_relayd_inventories_total counter | ||
rudder_relayd_inventories_total{status="forward_error"} 0 | ||
rudder_relayd_inventories_total{status="forward_ok"} 0 | ||
# HELP rudder_relayd_managed_nodes_total Managed Nodes | ||
# TYPE rudder_relayd_managed_nodes_total gauge | ||
rudder_relayd_managed_nodes_total 0 | ||
# HELP rudder_relayd_reports_processing_duration_seconds Reports processing | ||
# TYPE rudder_relayd_reports_processing_duration_seconds histogram | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.005"} 1 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.01"} 1 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.025"} 2 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.05"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.1"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.25"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="0.5"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="1"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="2.5"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="5"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="10"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_bucket{le="+Inf"} 3 | ||
rudder_relayd_reports_processing_duration_seconds_sum 0.043532457999999996 | ||
rudder_relayd_reports_processing_duration_seconds_count 3 | ||
# HELP rudder_relayd_reports_total Agent run reports | ||
# TYPE rudder_relayd_reports_total counter | ||
rudder_relayd_reports_total{status="error"} 1 | ||
rudder_relayd_reports_total{status="forward_error"} 0 | ||
rudder_relayd_reports_total{status="forward_ok"} 0 | ||
rudder_relayd_reports_total{status="invalid"} 1 | ||
rudder_relayd_reports_total{status="ok"} 2 | ||
# HELP rudder_relayd_sub_nodes_total Nodes behind this policy server | ||
# TYPE rudder_relayd_sub_nodes_total gauge | ||
rudder_relayd_sub_nodes_total 0 | ||
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. | ||
# TYPE process_cpu_seconds_total counter | ||
process_cpu_seconds_total 0.12 | ||
# HELP process_max_fds Maximum number of open file descriptors. | ||
# TYPE process_max_fds gauge | ||
process_max_fds 1024 | ||
# HELP process_open_fds Number of open file descriptors. | ||
# TYPE process_open_fds gauge | ||
process_open_fds 27 | ||
# HELP process_resident_memory_bytes Resident memory size in bytes. | ||
# TYPE process_resident_memory_bytes gauge | ||
process_resident_memory_bytes 29184000 | ||
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. | ||
# TYPE process_start_time_seconds gauge | ||
process_start_time_seconds 1609155927.83 | ||
# HELP process_virtual_memory_bytes Virtual memory size in bytes. | ||
# TYPE process_virtual_memory_bytes gauge | ||
process_virtual_memory_bytes 1491361792 | ||
tags: | ||
- System | ||
x-code-samples: | ||
- lang: curl | ||
source: | ||
$ref: ../code_samples/curl/metrics.sh |
Oops, something went wrong.