mirror of
https://github.com/ansible/awx.git
synced 2026-05-05 16:37:37 -02:30
Make the prometheus config file ignored by git
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -38,7 +38,6 @@ awx/ui/build
|
|||||||
awx/ui/.env.local
|
awx/ui/.env.local
|
||||||
awx/ui/instrumented
|
awx/ui/instrumented
|
||||||
rsyslog.pid
|
rsyslog.pid
|
||||||
tools/prometheus
|
|
||||||
tools/docker-compose/ansible/awx_dump.sql
|
tools/docker-compose/ansible/awx_dump.sql
|
||||||
tools/docker-compose/Dockerfile
|
tools/docker-compose/Dockerfile
|
||||||
tools/docker-compose/_build
|
tools/docker-compose/_build
|
||||||
@@ -154,6 +153,9 @@ use_dev_supervisor.txt
|
|||||||
/sanity/
|
/sanity/
|
||||||
/awx_collection_build/
|
/awx_collection_build/
|
||||||
|
|
||||||
|
# Setup for metrics gathering
|
||||||
|
tools/prometheus/prometheus.yml
|
||||||
|
|
||||||
.idea/*
|
.idea/*
|
||||||
*.unison.tmp
|
*.unison.tmp
|
||||||
*.#
|
*.#
|
||||||
|
|||||||
@@ -467,7 +467,14 @@ Prometheus is a metrics collecting tool, and we support prometheus formatted dat
|
|||||||
|
|
||||||
Before you run anything, you should perform this basic setup:
|
Before you run anything, you should perform this basic setup:
|
||||||
|
|
||||||
1. Change the `username` and `password` in `tools/prometheus/prometheus.yml`. You can also change the scrape interval.
|
1. Copy the prometheus configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
cp tools/prometheus/prometheus.yml.example tools/prometheus/prometheus.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the `username` and `password` in that file to your AWX user. You can also change the scrape interval.
|
||||||
|
|
||||||
2. (optional) if you are in a clustered environment, you can change the target to `haproxy:8043` so that the incoming prometheus requests go through the load balancer. Leaving it set to `awx1` also works.
|
2. (optional) if you are in a clustered environment, you can change the target to `haproxy:8043` so that the incoming prometheus requests go through the load balancer. Leaving it set to `awx1` also works.
|
||||||
|
|
||||||
You can use this as part of the docker-compose target:
|
You can use this as part of the docker-compose target:
|
||||||
|
|||||||
18
tools/prometheus/prometheus.yml.example
Normal file
18
tools/prometheus/prometheus.yml.example
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
global:
|
||||||
|
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: 'awx'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['awx1:8043'] # or haproxy:8043 in cluster env
|
||||||
|
tls_config:
|
||||||
|
insecure_skip_verify: true
|
||||||
|
metrics_path: /api/v2/metrics
|
||||||
|
scrape_interval: 5s
|
||||||
|
scheme: https
|
||||||
|
params:
|
||||||
|
format: ['txt']
|
||||||
|
basic_auth:
|
||||||
|
username: admin # change this
|
||||||
|
password: password # change this
|
||||||
Reference in New Issue
Block a user