Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(metrics): available metrics, metrics enablement #3171

Merged
merged 7 commits into from
Mar 1, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Assuming metrics are exposed from the endpoint `/metrics` from the [metrics](server-side-repo-config.html#metrics) server side config e.g.
```yaml
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
metrics:
prometheus:
endpoint: "/metrics"
```
To see all the metrics exposed from atlantis service, make a GET request to the `/metrics` endpoint.
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
```bash
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
.....
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
.....
.....
```
Some of the important metrics which you would like to monitor are
Pardeep009 marked this conversation as resolved.
Show resolved Hide resolved

| 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. |
Pardeep009 marked this conversation as resolved.
Show resolved Hide resolved
| 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. |

nitrocode marked this conversation as resolved.
Show resolved Hide resolved
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.
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
nitrocode marked this conversation as resolved.
Show resolved Hide resolved