Skip to content

Commit

Permalink
docs: documentation for available metrics/stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Pardeep Bhatt committed Feb 25, 2023
1 parent 8774128 commit b18ccdc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions runatlantis.io/docs/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,45 @@ Currently Statsd and Prometheus is supported. See configuration below for detail
## Configuration

Metrics are configured through the [Server Side Config](server-side-repo-config.html#metrics).

## Available Metrics/Stats

There are plenty of metrics which are exposed by atlantis service. Let's say you have exposed metrics from a endpoint `/metrics` from your [Server Side Config](server-side-repo-config.html#metrics)
```
metrics:
prometheus:
endpoint: "/metrics"
```
then on making curl request to your atlantis server on path `/metrics` will list down all the metrics exposed from atlantis service.
```
curl localhost:4141/metrics
# HELP atlantis_cmd_autoplan_builder_execution_error atlantis_cmd_autoplan_builder_execution_error counter
# TYPE atlantis_cmd_autoplan_builder_execution_error counter
atlantis_cmd_autoplan_builder_execution_error 0
# HELP atlantis_cmd_autoplan_builder_execution_success atlantis_cmd_autoplan_builder_execution_success counter
# TYPE atlantis_cmd_autoplan_builder_execution_success counter
atlantis_cmd_autoplan_builder_execution_success 10
# HELP atlantis_cmd_autoplan_builder_execution_time atlantis_cmd_autoplan_builder_execution_time summary
# TYPE atlantis_cmd_autoplan_builder_execution_time summary
atlantis_cmd_autoplan_builder_execution_time{quantile="0.5"} NaN
atlantis_cmd_autoplan_builder_execution_time{quantile="0.75"} NaN
atlantis_cmd_autoplan_builder_execution_time{quantile="0.95"} NaN
atlantis_cmd_autoplan_builder_execution_time{quantile="0.99"} NaN
atlantis_cmd_autoplan_builder_execution_time{quantile="0.999"} NaN
atlantis_cmd_autoplan_builder_execution_time_sum 11.42403017
atlantis_cmd_autoplan_builder_execution_time_count 10
.....
.....
.....
```
Some of the important metrics which you would like to monitor are

| Metric Name | Metric Type | Purpose |
|----------------------------------------------|----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| atlantis_cmd_autoplan_execution_error | [counter](https://prometheus.io/docs/concepts/metric_types/#counter) | since starting of atlantis server, the number of times when [autoplan](autoplanning.html#autoplanning) on the MR’s has thrown error. |
| atlantis_cmd_comment_plan_execution_error | [counter](https://prometheus.io/docs/concepts/metric_types/#counter) | since starting of atlantis server, the number of times when on commenting `atlantis plan` on the MR’s has thrown error. |
| atlantis_cmd_autoplan_execution_success | [counter](https://prometheus.io/docs/concepts/metric_types/#counter) | since starting of atlantis server, the number of times when [autoplan](autoplanning.html#autoplanning) on the MR’s has run successfully. |
| atlantis_cmd_comment_apply_execution_error | [counter](https://prometheus.io/docs/concepts/metric_types/#counter) | since starting of atlantis server, the number of times when on commenting `atlantis apply` on the MR’s has thrown error. |
| atlantis_cmd_comment_apply_execution_success | [counter](https://prometheus.io/docs/concepts/metric_types/#counter) | since starting of atlantis server, the number of times when on commenting `atlantis apply` on the MR’s has run successfully. |

Since there are a plenty of metrics exposed by atlantis, so you can go through them all and çan monitor the one's which are well suited for you.

0 comments on commit b18ccdc

Please sign in to comment.