Compare commits
111 Commits
e3be1c620e
...
main
Author | SHA1 | Date | |
---|---|---|---|
57e6341eac | |||
2c0f69c7d4 | |||
cc60702464 | |||
00808cdd68 | |||
603575ef4f | |||
d292f6dca1 | |||
3276795293 | |||
09347dfb4b | |||
4903dc467d | |||
0799a41a01 | |||
07f55dae29 | |||
999ebbffed | |||
e966b8abc2 | |||
ff4e3b5e68 | |||
e5d1adeded | |||
b0e49711cb | |||
e46839c397 | |||
52b7b73a25 | |||
834b1a6d5e | |||
ad01295f6c | |||
2a0b7d44ca | |||
8e5f14cf5f | |||
35d29a4015 | |||
33c19ea94b | |||
1874526af4 | |||
61e5bc823e | |||
42435a5c99 | |||
84f57d8981 | |||
b51ced33ed | |||
400e3ff58d | |||
aca249b5c2 | |||
0f47fe5a81 | |||
ec65c1cb51 | |||
0c746269f2 | |||
b4877c7c89 | |||
91d0d6678b | |||
f3d5dbd1d5 | |||
ce8c70c6d0 | |||
cd0826db20 | |||
02525ae35c | |||
87ee04484f | |||
feabcbf064 | |||
424a85c88f | |||
023ae33b7b | |||
64568b0572 | |||
09440d04e1 | |||
8241b93f28 | |||
e8da995134 | |||
50cb783bf6 | |||
90fed8362c | |||
46eddfbb2b | |||
adb3ab0dee | |||
d6bcd45c75 | |||
b79a14fc0b | |||
1f2e56cf3b | |||
7ced29fc93 | |||
1844fc030e | |||
68b7951ffc | |||
5314dffef9 | |||
799736eaa1 | |||
1a2bd471aa | |||
0e68a71c82 | |||
9ff75d2962 | |||
f60ecf13d4 | |||
9542fdfa89 | |||
4007a024f6 | |||
ddd0827e20 | |||
8fbef5ae83 | |||
4587baa193 | |||
e43954bdd6 | |||
a6c5dab19b | |||
e016b87640 | |||
1eff4b7e51 | |||
8bc8db8334 | |||
5b98397bbd | |||
78decc8f50 | |||
f733ab6d2c | |||
4581660f14 | |||
d8afed3b98 | |||
902af9c58d | |||
681b7b2d72 | |||
9b7c8f547f | |||
c610673f68 | |||
b4f4aea3df | |||
baf353fca7 | |||
59092ab9ff | |||
1a0c5a3a04 | |||
9077335c0f | |||
ba9f48e1f9 | |||
a4c84e0543 | |||
661df56f38 | |||
fb191f27d6 | |||
159bb4137e | |||
b05a8b8822 | |||
d517e4356f | |||
c4d943196e | |||
fa64c3275d | |||
48d997e883 | |||
d163d219ba | |||
e56f6d23f3 | |||
781d860046 | |||
22b2f0e07a | |||
063c138c9a | |||
a456647a6f | |||
7094cb13ee | |||
f655a0fc6e | |||
326cf07256 | |||
aeb3a218d1 | |||
729456e034 | |||
81ca386d67 | |||
27f7ca40ea |
9
LICENSE
Normal file
9
LICENSE
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 ansible-roles
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
42
README.md
42
README.md
@ -2,8 +2,8 @@ prometheus
|
|||||||
==========
|
==========
|
||||||
|
|
||||||
The present role :
|
The present role :
|
||||||
- installs prometheus server inside a Docker container
|
- Installs Prometheus server inside a docker container.
|
||||||
- installs various prometheus exporter
|
- Installs various Prometheus exporter.
|
||||||
- node
|
- node
|
||||||
- blackbox
|
- blackbox
|
||||||
- apache
|
- apache
|
||||||
@ -15,6 +15,12 @@ The present role :
|
|||||||
- mysql
|
- mysql
|
||||||
- postgres
|
- postgres
|
||||||
- mongodb
|
- mongodb
|
||||||
|
- elasticsearch
|
||||||
|
- nginx
|
||||||
|
- opensearch (via plugin for opensearch https://github.com/aiven/prometheus-exporter-plugin-for-opensearch)
|
||||||
|
- rabbitmq
|
||||||
|
- Deploys Grafana with a dashboard for each exporter configured.
|
||||||
|
- Supports deploying VictoriaMetrics as the Prometheus backend.
|
||||||
|
|
||||||
Please note that Docker and Haproxy their own embedded exporters.
|
Please note that Docker and Haproxy their own embedded exporters.
|
||||||
- https://docs.docker.com/config/daemon/prometheus/
|
- https://docs.docker.com/config/daemon/prometheus/
|
||||||
@ -24,6 +30,7 @@ The role has been successfully tested on :
|
|||||||
- Debian 9
|
- Debian 9
|
||||||
- Debian 10
|
- Debian 10
|
||||||
- Debian 11
|
- Debian 11
|
||||||
|
- Debian 12
|
||||||
|
|
||||||
Forced upgrade of installed exporters can be done by setting the extra parameters "exporter_upgrade" to "yes".
|
Forced upgrade of installed exporters can be done by setting the extra parameters "exporter_upgrade" to "yes".
|
||||||
|
|
||||||
@ -34,34 +41,7 @@ ansible-playbook playbook/myhost.yml -t prometheus -e "exporter_upgrade=yes"
|
|||||||
Role variables
|
Role variables
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
| Variable | Type | Choices | Default | Comment |
|
- [Variables](docs/variables.md)
|
||||||
|----------------------------------------------|---------|------------------------------------------------------------------------------------|-------------------------|-----------------|
|
|
||||||
| prometheus_server_enable | string | true / false | | |
|
|
||||||
| prometheus_server_version | string | | latest | |
|
|
||||||
| prometheus_server_monitor | string | | | |
|
|
||||||
| prometheus_server_global_scrape_interval | string | | 15 | |
|
|
||||||
| prometheus_server_global_evaluation_interval | string | | 15 | |
|
|
||||||
| prometheus_server_job_name | string | | prometheus | |
|
|
||||||
| prometheus_server_scrape_interval | string | | 5 | |
|
|
||||||
| prometheus_server_scrape_timeout | string | | 5 | |
|
|
||||||
| prometheus_exporter_packages | list | node / mysqld / postgresql / mongodb / phpfpm / apache / haproxy / varnish / redis | | |
|
|
||||||
| prometheus_node_exporter_targets | list | | | |
|
|
||||||
| prometheus_mysqld_exporter_targets | list | | | |
|
|
||||||
| prometheus_mongodb_exporter_targets | list | | | |
|
|
||||||
| prometheus_postgres_exporter_targets | list | | | |
|
|
||||||
| prometheus_redis_exporter_targets | list | | | |
|
|
||||||
| prometheus_proxysql_exporter_targets | list | | | [Enable exporter](https://proxysql.com/documentation/prometheus-exporter/) |
|
|
||||||
| prometheus_mysqld_exporter_user | string | | | |
|
|
||||||
| prometheus_mysqld_exporter_password | string | | | |
|
|
||||||
| prometheus_mongodb_exporter_host | string | | localhost | |
|
|
||||||
| prometheus_mongodb_exporter_port | string | | 27017 | |
|
|
||||||
| prometheus_mongodb_exporter_user | string | | | |
|
|
||||||
| prometheus_mongodb_exporter_pass | string | | | |
|
|
||||||
| prometheus_opcache_exporter_fcgi_uri | string | | unix:///var/run/www.sock| |
|
|
||||||
| prometheus_server_version | string | | latest | |
|
|
||||||
| prometheus_redis_exporter_addr | string | | redis://localhost:6379 | |
|
|
||||||
| prometheus_redis_exporter_user | string | | | |
|
|
||||||
| prometheus_redis_exporter_password | string | | | |
|
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
@ -114,7 +94,7 @@ TODO
|
|||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
GPLv3
|
MIT
|
||||||
|
|
||||||
Author Information
|
Author Information
|
||||||
------------------
|
------------------
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
docker_compose_directory: "/opt/docker-compose"
|
docker_compose_directory: "/opt/docker-compose"
|
||||||
|
docker_compose_bin: "docker compose"
|
||||||
|
|
||||||
prometheus_docker_network: prometheus
|
prometheus_docker_network: prometheus
|
||||||
|
|
||||||
@ -17,13 +18,19 @@ prometheus_repo_blackbox: prometheus
|
|||||||
prometheus_repo_memcached: prometheus
|
prometheus_repo_memcached: prometheus
|
||||||
prometheus_repo_mongodb: percona
|
prometheus_repo_mongodb: percona
|
||||||
prometheus_repo_mysqld: prometheus
|
prometheus_repo_mysqld: prometheus
|
||||||
|
prometheus_repo_nginx: tchivert
|
||||||
prometheus_repo_node: prometheus
|
prometheus_repo_node: prometheus
|
||||||
prometheus_repo_opcache: tchivert
|
prometheus_repo_opcache: tchivert
|
||||||
prometheus_repo_phpfpm: Lusitaniae
|
prometheus_repo_phpfpm: Lusitaniae
|
||||||
prometheus_repo_postgres: prometheus-community
|
prometheus_repo_postgres: prometheus-community
|
||||||
prometheus_repo_redis: oliver006
|
prometheus_repo_redis: tchivert
|
||||||
prometheus_repo_varnish: tchivert
|
prometheus_repo_varnish: tchivert
|
||||||
|
|
||||||
|
prometheus_exporters_repo: "https://git.rznet.fr/tchivert/prometheus_exporters"
|
||||||
|
prometheus_exporters_release: "latest"
|
||||||
|
prometheus_exporters_sources: "repo"
|
||||||
|
# prometheus_exporters_sources: "origin"
|
||||||
|
|
||||||
## server
|
## server
|
||||||
prometheus_nodes_ip:
|
prometheus_nodes_ip:
|
||||||
localhost: "127.0.0.1"
|
localhost: "127.0.0.1"
|
||||||
@ -38,6 +45,8 @@ prometheus_server_scrape_interval: 5
|
|||||||
prometheus_server_scrape_timeout: 5
|
prometheus_server_scrape_timeout: 5
|
||||||
prometheus_server_version: "latest"
|
prometheus_server_version: "latest"
|
||||||
|
|
||||||
|
prometheus_use_victoriametrics: false
|
||||||
|
|
||||||
## exporter
|
## exporter
|
||||||
prometheus_exporter_packages: []
|
prometheus_exporter_packages: []
|
||||||
|
|
||||||
@ -61,6 +70,8 @@ prometheus_postgres_exporter_user: "postgres"
|
|||||||
prometheus_postgres_exporter_password: "changeme_"
|
prometheus_postgres_exporter_password: "changeme_"
|
||||||
prometheus_postgres_exporter_port: 5432
|
prometheus_postgres_exporter_port: 5432
|
||||||
|
|
||||||
|
prometheus_proxmox_venv_path: "/opt/venv/prometheus-pve-exporter"
|
||||||
|
|
||||||
prometheus_redis_exporter_addr: "redis://localhost:6379"
|
prometheus_redis_exporter_addr: "redis://localhost:6379"
|
||||||
prometheus_redis_exporter_user: ""
|
prometheus_redis_exporter_user: ""
|
||||||
prometheus_redis_exporter_password: ""
|
prometheus_redis_exporter_password: ""
|
||||||
@ -68,7 +79,7 @@ prometheus_redis_exporter_password: ""
|
|||||||
## grafana
|
## grafana
|
||||||
|
|
||||||
grafana_auth_anonymous_enabled: false
|
grafana_auth_anonymous_enabled: false
|
||||||
grafana_auth_anonymous_org_role: Editor # Viewer
|
grafana_auth_anonymous_org_role: Viewer
|
||||||
grafana_auth_anonymous_org_name: 'Main Org.'
|
grafana_auth_anonymous_org_name: 'Main Org.'
|
||||||
grafana_auth_disable_login_form: false
|
grafana_auth_disable_login_form: false
|
||||||
grafana_editors_can_admin: false
|
grafana_editors_can_admin: false
|
||||||
@ -77,3 +88,7 @@ grafana_log_level: error
|
|||||||
grafana_router_logging: false
|
grafana_router_logging: false
|
||||||
grafana_disable_sanitize_html: true
|
grafana_disable_sanitize_html: true
|
||||||
grafana_traefik_entrypoint: 'websecure'
|
grafana_traefik_entrypoint: 'websecure'
|
||||||
|
|
||||||
|
# cloudflare
|
||||||
|
|
||||||
|
prometheus_cloudflare_dns: "1.1.1.1"
|
||||||
|
86
docs/variables.md
Normal file
86
docs/variables.md
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
# Variables
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
| Variable Name | Description | Type | Default Value |
|
||||||
|
|---|---|---|---|
|
||||||
|
| docker_compose_directory | The directory where Docker Compose files are stored | String | "/opt/docker-compose" |
|
||||||
|
| docker_compose_bin | The Docker Compose binary to use | String | "docker compose" |
|
||||||
|
|
||||||
|
## Prometheus
|
||||||
|
|
||||||
|
| Variable Name | Description | Type | Default Value |
|
||||||
|
|---|---|---|---|
|
||||||
|
| prometheus_docker_network | The name of the Docker network for Prometheus containers | String | "prometheus" |
|
||||||
|
| prometheus_docker_pull | Whether to pull the Prometheus Docker image | String | "no" |
|
||||||
|
| prometheus_os | The operating system for Prometheus | String | "linux" |
|
||||||
|
| prometheus_arch | The architecture for Prometheus | String | "amd64" |
|
||||||
|
| prometheus_repo | The repository URL for Prometheus | String | "" |
|
||||||
|
| prometheus_nodes_ip | The IP addresses of Prometheus nodes | Dictionary | localhost: "127.0.0.1" |
|
||||||
|
| prometheus_retention_time | The retention time for Prometheus data | String | "15d" |
|
||||||
|
| prometheus_server_enable | Whether to enable the Prometheus server | Boolean | false |
|
||||||
|
| prometheus_use_victoriametrics | Use VictoriaMetrics as prometheus backend | Boolean | false |
|
||||||
|
| prometheus_server_global_evaluation_interval | The global evaluation interval for Prometheus server | Integer | 15 |
|
||||||
|
| prometheus_server_global_scrape_interval | The global scrape interval for Prometheus server | Integer | 15 |
|
||||||
|
| prometheus_server_job_name | The job name for Prometheus server | String | "prometheus" |
|
||||||
|
| prometheus_server_scrape_interval | The scrape interval for Prometheus server | Integer | 5 |
|
||||||
|
| prometheus_server_scrape_timeout | The scrape timeout for Prometheus server | Integer | 5 |
|
||||||
|
| prometheus_server_version | The version of Prometheus server to install | String | "latest" |
|
||||||
|
| prometheus_watchtower_enable | Whether to enable watchtower on this container | Boolean | true |
|
||||||
|
|
||||||
|
## Prometheus Exporters
|
||||||
|
|
||||||
|
| Variable Name | Description | Type | Default Value |
|
||||||
|
|---|---|---|---|
|
||||||
|
| exporter_upgrade | Whether to upgrade the exporter | String | "" |
|
||||||
|
| prometheus_exporters_repo | The repository URL for Prometheus exporters | String | "https://git.rznet.fr/tchivert/prometheus_exporters" |
|
||||||
|
| prometheus_exporters_release | The release version of Prometheus exporters | String | "latest" |
|
||||||
|
| prometheus_exporters_sources | The source of Prometheus exporters (repo or origin) | String | "repo" |
|
||||||
|
| prometheus_repo_apache | Apache exporter repository | String | Lusitaniae |
|
||||||
|
| prometheus_repo_blackbox | Blackbox exporter repository | String | prometheus |
|
||||||
|
| prometheus_repo_memcached | Memcached exporter repository | String | prometheus |
|
||||||
|
| prometheus_repo_mongodb | MongoDB exporter repository | String | percona |
|
||||||
|
| prometheus_repo_mysqld | MySQLd exporter repository | String | prometheus |
|
||||||
|
| prometheus_repo_nginx | Nginx exporter repository | String | tchivert |
|
||||||
|
| prometheus_repo_node | Node exporter repository | String | prometheus |
|
||||||
|
| prometheus_repo_opcache | Opcache exporter repository | String | tchivert |
|
||||||
|
| prometheus_repo_phpfpm | PHP-FPM exporter repository | String | Lusitaniae |
|
||||||
|
| prometheus_repo_postgres | Postgres exporter repository | String | prometheus-community |
|
||||||
|
| prometheus_repo_redis | Redis exporter repository | String | tchivert |
|
||||||
|
| prometheus_repo_varnish | Varnish exporter repository | String | tchivert |
|
||||||
|
| prometheus_exporter_packages | The list of exporter packages to install | List | [] |
|
||||||
|
| prometheus_apache_port | The port for Apache exporter | Integer | 8080 |
|
||||||
|
| prometheus_blackbox_exporter_host | The host for Blackbox exporter | String | localhost |
|
||||||
|
| prometheus_mongodb_exporter_database | The database for MongoDB exporter | String | "admin" |
|
||||||
|
| prometheus_mongodb_exporter_host | The host for MongoDB exporter | String | "localhost" |
|
||||||
|
| prometheus_mongodb_exporter_port | The port for MongoDB exporter | Integer | 27017 |
|
||||||
|
| prometheus_opcache_exporter_fcgi_uri | The FCGI URI for Opcache exporter | String | "unix:///var/run/www.sock" |
|
||||||
|
| prometheus_phpfpm_sockets_directory | The directory for PHP-FPM sockets | String | "/run/php/" |
|
||||||
|
| prometheus_postgres_exporter_systemd_user | The systemd user for Postgres exporter | String | "postgres" |
|
||||||
|
| prometheus_postgres_exporter_host | The host for Postgres exporter | String | "/var/run/postgresql/" |
|
||||||
|
| prometheus_postgres_exporter_sslmode | The SSL mode for Postgres exporter | String | "disable" |
|
||||||
|
| prometheus_postgres_exporter_user | The user for Postgres exporter | String | "postgres" |
|
||||||
|
| prometheus_postgres_exporter_password | The password for Postgres exporter | String | "changeme_" |
|
||||||
|
| prometheus_postgres_exporter_port | The port for Postgres exporter | Integer | 5432 |
|
||||||
|
| prometheus_proxmox_exporter_user | Username used to contact Proxmox API | String | "" |
|
||||||
|
| prometheus_proxmox_exporter_password | Password for previous username | String | "" |
|
||||||
|
| prometheus_proxmox_exporter_node | Proxmox node to metrics from | String | "" |
|
||||||
|
| prometheus_redis_exporter_addr | The address for Redis exporter | String | "redis://localhost:6379" |
|
||||||
|
| prometheus_redis_exporter_user | The user for Redis exporter | String | "" |
|
||||||
|
| prometheus_redis_exporter_password | The password for Redis exporter | String | "" |
|
||||||
|
|
||||||
|
## Grafana
|
||||||
|
|
||||||
|
| Variable Name | Description | Type | Default Value |
|
||||||
|
|---|---|---|---|
|
||||||
|
| grafana_auth_anonymous_enabled | Whether anonymous authentication is enabled in Grafana | Boolean | false |
|
||||||
|
| grafana_auth_anonymous_org_role | The role for anonymous users in Grafana | String | Editor |
|
||||||
|
| grafana_auth_anonymous_org_name | The name of the organization for anonymous users in Grafana | String | 'Main Org.' |
|
||||||
|
| grafana_auth_disable_login_form | Whether to disable the login form in Grafana | Boolean | false |
|
||||||
|
| grafana_editors_can_admin | Whether editors can administer Grafana | Boolean | false |
|
||||||
|
| grafana_users_viewers_can_edit | Whether viewers can edit in Grafana | Boolean | false |
|
||||||
|
| grafana_log_level | The log level for Grafana | String | error |
|
||||||
|
| grafana_router_logging | Whether to enable router logging in Grafana | Boolean | false |
|
||||||
|
| grafana_disable_sanitize_html | Whether to disable HTML sanitization in Grafana | Boolean | true |
|
||||||
|
| grafana_traefik_entrypoint | The Traefik entrypoint for Grafana | String | 'websecure' |
|
||||||
|
| grafana_watchtower_enable | Whether to enable watchtower on this container | Boolean | true |
|
@ -761,14 +761,14 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdfront01",
|
"sv1",
|
||||||
"emzprdfront02",
|
"sv2",
|
||||||
"emzprdfront03"
|
"sv3"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdfront01",
|
"sv1",
|
||||||
"emzprdfront02",
|
"sv2",
|
||||||
"emzprdfront03"
|
"sv3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
4751
files/dashboards/elasticsearch.json
Normal file
4751
files/dashboards/elasticsearch.json
Normal file
File diff suppressed because it is too large
Load Diff
869
files/dashboards/gitlab.json
Normal file
869
files/dashboards/gitlab.json
Normal file
@ -0,0 +1,869 @@
|
|||||||
|
{
|
||||||
|
"__inputs": [
|
||||||
|
{
|
||||||
|
"name": "DS_PROMETHEUS",
|
||||||
|
"label": "Prometheus",
|
||||||
|
"description": "",
|
||||||
|
"type": "datasource",
|
||||||
|
"pluginId": "prometheus",
|
||||||
|
"pluginName": "Prometheus"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__elements": {},
|
||||||
|
"__requires": [
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "gauge",
|
||||||
|
"name": "Gauge",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "grafana",
|
||||||
|
"id": "grafana",
|
||||||
|
"name": "Grafana",
|
||||||
|
"version": "9.4.3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "graph",
|
||||||
|
"name": "Graph (old)",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "datasource",
|
||||||
|
"id": "prometheus",
|
||||||
|
"name": "Prometheus",
|
||||||
|
"version": "1.0.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": {
|
||||||
|
"type": "datasource",
|
||||||
|
"uid": "grafana"
|
||||||
|
},
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"target": {
|
||||||
|
"limit": 100,
|
||||||
|
"matchAny": false,
|
||||||
|
"tags": [],
|
||||||
|
"type": "dashboard"
|
||||||
|
},
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"description": "GitLab Omnibus Dashboard (>= 10.3)",
|
||||||
|
"editable": true,
|
||||||
|
"fiscalYearStartMonth": 0,
|
||||||
|
"gnetId": 5774,
|
||||||
|
"graphTooltip": 0,
|
||||||
|
"id": null,
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"icon": "external link",
|
||||||
|
"tags": [],
|
||||||
|
"title": "GitLab Docs",
|
||||||
|
"tooltip": "",
|
||||||
|
"type": "link",
|
||||||
|
"url": "https://docs.gitlab.com/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"liveNow": false,
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"match": "null",
|
||||||
|
"result": {
|
||||||
|
"text": "N/A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "special"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#d44a3a",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "rgba(237, 129, 40, 0.89)",
|
||||||
|
"value": 0.95
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 0.99
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percentunit"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 4,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 9,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"mean"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showThresholdLabels": false,
|
||||||
|
"showThresholdMarkers": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "avg(pg_up)",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Postgres Up",
|
||||||
|
"type": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"match": "null",
|
||||||
|
"result": {
|
||||||
|
"text": "N/A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "special"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#d44a3a",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "rgba(237, 129, 40, 0.89)",
|
||||||
|
"value": 0.95
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 0.99
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percentunit"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 4,
|
||||||
|
"x": 4,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 7,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"mean"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showThresholdLabels": false,
|
||||||
|
"showThresholdMarkers": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "avg(up{job=\"gitlab-sidekiq\"})",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Sidekiq Up",
|
||||||
|
"type": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"match": "null",
|
||||||
|
"result": {
|
||||||
|
"text": "N/A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "special"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#d44a3a",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "rgba(237, 129, 40, 0.89)",
|
||||||
|
"value": 0.95
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 0.99
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percentunit"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 4,
|
||||||
|
"x": 8,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 8,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"mean"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showThresholdLabels": false,
|
||||||
|
"showThresholdMarkers": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "avg(up{job=\"gitlab-workhorse\"})",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Workhorse Up",
|
||||||
|
"type": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"match": "null",
|
||||||
|
"result": {
|
||||||
|
"text": "N/A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "special"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#d44a3a",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "rgba(237, 129, 40, 0.89)",
|
||||||
|
"value": 0.95
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 0.99
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percentunit"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 4,
|
||||||
|
"x": 12,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 5,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"mean"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showThresholdLabels": false,
|
||||||
|
"showThresholdMarkers": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "redis_up{instance=\"$node:9121\"}",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Redis Up",
|
||||||
|
"type": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"match": "null",
|
||||||
|
"result": {
|
||||||
|
"text": "N/A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "special"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#d44a3a",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "rgba(237, 129, 40, 0.89)",
|
||||||
|
"value": 0.95
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 0.99
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percentunit"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 4,
|
||||||
|
"x": 16,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 10,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"mean"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showThresholdLabels": false,
|
||||||
|
"showThresholdMarkers": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "avg(up{job=\"gitaly\"})",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Gitaly Up",
|
||||||
|
"type": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"decimals": 1,
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"match": "null",
|
||||||
|
"result": {
|
||||||
|
"text": "N/A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "special"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#d44a3a",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "rgba(237, 129, 40, 0.89)",
|
||||||
|
"value": 0.1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 0.2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percentunit"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 4,
|
||||||
|
"x": 20,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 4,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showThresholdLabels": false,
|
||||||
|
"showThresholdMarkers": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "sum(node_filesystem_avail{fstype!~\"tmpfs\"}) / sum(node_filesystem_size{fstype!~\"tmpfs\"})",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "sum(node_filesystem_avail_bytes{fstype!~\"tmpfs\"}) / sum(node_filesystem_size_bytes{fstype!~\"tmpfs\"})",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "B"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Node DIsk Free",
|
||||||
|
"type": "gauge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 4
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 12,
|
||||||
|
"legend": {
|
||||||
|
"alignAsTable": true,
|
||||||
|
"avg": true,
|
||||||
|
"current": true,
|
||||||
|
"max": true,
|
||||||
|
"min": false,
|
||||||
|
"rightSide": true,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": true
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"pointradius": 5,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "sum(sidekiq_queue_size)",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "Jobs",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeRegions": [],
|
||||||
|
"title": "Sidekiq Queue",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"logBase": 1,
|
||||||
|
"min": "0",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 4
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 13,
|
||||||
|
"legend": {
|
||||||
|
"alignAsTable": true,
|
||||||
|
"avg": true,
|
||||||
|
"current": true,
|
||||||
|
"max": true,
|
||||||
|
"min": false,
|
||||||
|
"rightSide": true,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": true
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "9.4.3",
|
||||||
|
"pointradius": 5,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "avg(histogram_quantile(0.95, rate(gitlab_workhorse_request_duration_seconds_bucket[5m])))",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "Average",
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "max(histogram_quantile(0.95, rate(gitlab_workhorse_request_duration_seconds_bucket[5m])))",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "Max",
|
||||||
|
"refId": "B"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "avg(histogram_quantile(0.95, rate(gitlab_workhorse_http_request_duration_seconds_bucket[5m])))",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "Average",
|
||||||
|
"refId": "C"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "max(histogram_quantile(0.95, rate(gitlab_workhorse_http_request_duration_seconds_bucket[5m])))",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "Max",
|
||||||
|
"refId": "D"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeRegions": [],
|
||||||
|
"title": "Workhorse Latency",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "s",
|
||||||
|
"logBase": 1,
|
||||||
|
"min": "0",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refresh": "5m",
|
||||||
|
"revision": 1,
|
||||||
|
"schemaVersion": 38,
|
||||||
|
"style": "dark",
|
||||||
|
"tags": [
|
||||||
|
"GitLab"
|
||||||
|
],
|
||||||
|
"templating": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"current": {},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"definition": "label_values(up{job=\"node\"}, instance)",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": false,
|
||||||
|
"multi": false,
|
||||||
|
"name": "node",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"query": "label_values(up{job=\"node\"}, instance)",
|
||||||
|
"refId": "StandardVariableQuery"
|
||||||
|
},
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "(.*gitlab.*).*$",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"tagValuesQuery": "",
|
||||||
|
"tagsQuery": "",
|
||||||
|
"type": "query",
|
||||||
|
"useTags": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-3h",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {
|
||||||
|
"refresh_intervals": [
|
||||||
|
"5s",
|
||||||
|
"10s",
|
||||||
|
"30s",
|
||||||
|
"1m",
|
||||||
|
"5m",
|
||||||
|
"15m",
|
||||||
|
"30m",
|
||||||
|
"1h",
|
||||||
|
"2h",
|
||||||
|
"1d"
|
||||||
|
],
|
||||||
|
"time_options": [
|
||||||
|
"5m",
|
||||||
|
"15m",
|
||||||
|
"1h",
|
||||||
|
"6h",
|
||||||
|
"12h",
|
||||||
|
"24h",
|
||||||
|
"2d",
|
||||||
|
"7d",
|
||||||
|
"30d"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"timezone": "",
|
||||||
|
"title": "GitLab Omnibus",
|
||||||
|
"uid": "w4AZS7f4k",
|
||||||
|
"version": 5,
|
||||||
|
"weekStart": ""
|
||||||
|
}
|
@ -6199,12 +6199,12 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdrpc01",
|
"sv1",
|
||||||
"emzprdrpc02"
|
"sv2"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdrpc01",
|
"sv1",
|
||||||
"emzprdrpc02"
|
"sv2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
2801
files/dashboards/kong.json
Normal file
2801
files/dashboards/kong.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -856,12 +856,12 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdcache01",
|
"sv1",
|
||||||
"emzprdcache02"
|
"sv2"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdcache01",
|
"sv1",
|
||||||
"emzprdcache02"
|
"sv2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
1504
files/dashboards/mongodb.json
Normal file
1504
files/dashboards/mongodb.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -757,8 +757,8 @@
|
|||||||
{
|
{
|
||||||
"current": {
|
"current": {
|
||||||
"selected": false,
|
"selected": false,
|
||||||
"text": "emzhc01",
|
"text": "sv1",
|
||||||
"value": "emzhc01"
|
"value": "sv1"
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
|
544
files/dashboards/nfs.json
Normal file
544
files/dashboards/nfs.json
Normal file
@ -0,0 +1,544 @@
|
|||||||
|
{
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": {
|
||||||
|
"type": "grafana",
|
||||||
|
"uid": "-- Grafana --"
|
||||||
|
},
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"description": "NFS Prometheus Dashboard",
|
||||||
|
"editable": true,
|
||||||
|
"fiscalYearStartMonth": 0,
|
||||||
|
"graphTooltip": 0,
|
||||||
|
"id": 13,
|
||||||
|
"links": [],
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"description": "Request rate per 5m",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisBorderShow": false,
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"barWidthFactor": 0.6,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 20,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"insertNulls": false,
|
||||||
|
"lineInterpolation": "smooth",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 243,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"mean",
|
||||||
|
"lastNotNull",
|
||||||
|
"max",
|
||||||
|
"min"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true,
|
||||||
|
"sortBy": "Mean",
|
||||||
|
"sortDesc": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"hideZeros": false,
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "11.6.0",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"disableTextWrap": false,
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum by (instance) (rate(node_nfs_requests_total{instance=~\"$node\"}[5m]))",
|
||||||
|
"format": "time_series",
|
||||||
|
"fullMetaSearch": false,
|
||||||
|
"hide": false,
|
||||||
|
"includeNullMetadata": true,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}}",
|
||||||
|
"range": true,
|
||||||
|
"refId": "C",
|
||||||
|
"step": 240,
|
||||||
|
"useBackend": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "NFS Requests by instance",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"description": "Request rate per 5m",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisBorderShow": false,
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "Connections",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"barWidthFactor": 0.6,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 20,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"insertNulls": false,
|
||||||
|
"lineInterpolation": "smooth",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 10
|
||||||
|
},
|
||||||
|
"id": 267,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"mean",
|
||||||
|
"lastNotNull",
|
||||||
|
"max",
|
||||||
|
"min"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true,
|
||||||
|
"sortBy": "Mean",
|
||||||
|
"sortDesc": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"hideZeros": false,
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "11.6.0",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"disableTextWrap": false,
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum by (method) (rate(node_nfs_requests_total{instance=~\"$node\"}[5m]))",
|
||||||
|
"format": "time_series",
|
||||||
|
"fullMetaSearch": false,
|
||||||
|
"hide": false,
|
||||||
|
"includeNullMetadata": true,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{method}}",
|
||||||
|
"range": true,
|
||||||
|
"refId": "C",
|
||||||
|
"step": 240,
|
||||||
|
"useBackend": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "NFS Requests by method",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"fixedColor": "blue",
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisBorderShow": false,
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"barWidthFactor": 0.6,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 0,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"insertNulls": false,
|
||||||
|
"lineInterpolation": "smooth",
|
||||||
|
"lineStyle": {
|
||||||
|
"fill": "solid"
|
||||||
|
},
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percent"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"id": 268,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true,
|
||||||
|
"sortBy": "Last *",
|
||||||
|
"sortDesc": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"hideZeros": false,
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "11.6.0",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"disableTextWrap": false,
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "avg(100 - (node_filesystem_avail_bytes{instance=~\"$node\", fstype=\"$type\"} * 100 / node_filesystem_size_bytes{instance=~\"$node\", fstype=\"$type\"})) by (mountpoint)",
|
||||||
|
"format": "time_series",
|
||||||
|
"fullMetaSearch": false,
|
||||||
|
"hide": false,
|
||||||
|
"includeNullMetadata": true,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{device}}",
|
||||||
|
"range": true,
|
||||||
|
"refId": "C",
|
||||||
|
"step": 240,
|
||||||
|
"useBackend": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "NFS Mounts Usage",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"fixedColor": "blue",
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisBorderShow": false,
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"barWidthFactor": 0.6,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 0,
|
||||||
|
"gradientMode": "hue",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"insertNulls": false,
|
||||||
|
"lineInterpolation": "smooth",
|
||||||
|
"lineStyle": {
|
||||||
|
"fill": "solid"
|
||||||
|
},
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"id": 269,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true,
|
||||||
|
"sortBy": "Last *",
|
||||||
|
"sortDesc": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"hideZeros": false,
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "11.6.0",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"disableTextWrap": false,
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "avg(node_filesystem_device_error{instance=~\"$node\", fstype=\"$type\"}) by (mountpoint)",
|
||||||
|
"format": "time_series",
|
||||||
|
"fullMetaSearch": false,
|
||||||
|
"hide": false,
|
||||||
|
"includeNullMetadata": true,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{device}}",
|
||||||
|
"range": true,
|
||||||
|
"refId": "C",
|
||||||
|
"step": 240,
|
||||||
|
"useBackend": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "NFS Mounts Errors",
|
||||||
|
"type": "timeseries"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preload": false,
|
||||||
|
"refresh": "5m",
|
||||||
|
"schemaVersion": 41,
|
||||||
|
"tags": [],
|
||||||
|
"templating": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"current": {
|
||||||
|
"text": "All",
|
||||||
|
"value": "$__all"
|
||||||
|
},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"definition": "label_values(node_boot_time_seconds,instance)",
|
||||||
|
"includeAll": true,
|
||||||
|
"label": "Host:",
|
||||||
|
"name": "node",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"qryType": 1,
|
||||||
|
"query": "label_values(node_boot_time_seconds,instance)",
|
||||||
|
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||||
|
},
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"sort": 1,
|
||||||
|
"type": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"current": {
|
||||||
|
"text": "All",
|
||||||
|
"value": "$__all"
|
||||||
|
},
|
||||||
|
"definition": "label_values(node_filesystem_avail_bytes{instance=~\"$node\"},fstype)",
|
||||||
|
"includeAll": true,
|
||||||
|
"label": "Type",
|
||||||
|
"name": "type",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"qryType": 1,
|
||||||
|
"query": "label_values(node_filesystem_avail_bytes{instance=~\"$node\"},fstype)",
|
||||||
|
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||||
|
},
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "/^nfs4?.*/",
|
||||||
|
"type": "query"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-24h",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {},
|
||||||
|
"timezone": "browser",
|
||||||
|
"title": "NFS",
|
||||||
|
"uid": "cc0d5bef-8b9d-47df-8be7-cf75c3efeece",
|
||||||
|
"version": 3
|
||||||
|
}
|
609
files/dashboards/nginx.json
Normal file
609
files/dashboards/nginx.json
Normal file
@ -0,0 +1,609 @@
|
|||||||
|
{
|
||||||
|
"__inputs": [
|
||||||
|
{
|
||||||
|
"name": "DS_PROMETHEUS",
|
||||||
|
"label": "Prometheus",
|
||||||
|
"description": "",
|
||||||
|
"type": "datasource",
|
||||||
|
"pluginId": "prometheus",
|
||||||
|
"pluginName": "Prometheus"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__elements": {},
|
||||||
|
"__requires": [
|
||||||
|
{
|
||||||
|
"type": "grafana",
|
||||||
|
"id": "grafana",
|
||||||
|
"name": "Grafana",
|
||||||
|
"version": "10.0.2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "graph",
|
||||||
|
"name": "Graph (old)",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "datasource",
|
||||||
|
"id": "prometheus",
|
||||||
|
"name": "Prometheus",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "stat",
|
||||||
|
"name": "Stat",
|
||||||
|
"version": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": {
|
||||||
|
"type": "datasource",
|
||||||
|
"uid": "grafana"
|
||||||
|
},
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"description": "Official dashboard for NGINX Prometheus exporter",
|
||||||
|
"editable": true,
|
||||||
|
"fiscalYearStartMonth": 0,
|
||||||
|
"graphTooltip": 0,
|
||||||
|
"id": null,
|
||||||
|
"links": [],
|
||||||
|
"liveNow": false,
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"collapsed": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 1,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 4,
|
||||||
|
"panels": [],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Status",
|
||||||
|
"type": "row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"0": {
|
||||||
|
"text": "Down"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"text": "Up"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "value"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "#E02F44",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#FF9830",
|
||||||
|
"value": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#299c46",
|
||||||
|
"value": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "none"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 3,
|
||||||
|
"w": 6,
|
||||||
|
"x": 0,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
"id": 8,
|
||||||
|
"links": [],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options": {
|
||||||
|
"colorMode": "background",
|
||||||
|
"graphMode": "none",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"textMode": "auto"
|
||||||
|
},
|
||||||
|
"pluginVersion": "10.0.2",
|
||||||
|
"repeat": "instance",
|
||||||
|
"repeatDirection": "h",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "nginx_up{instance=~\"$instance\"}",
|
||||||
|
"format": "time_series",
|
||||||
|
"instant": false,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "NGINX Status for $instance",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collapsed": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 1,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 7
|
||||||
|
},
|
||||||
|
"id": 6,
|
||||||
|
"panels": [],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "yPhvsDP7k"
|
||||||
|
},
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Metrics",
|
||||||
|
"type": "row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 8
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 10,
|
||||||
|
"legend": {
|
||||||
|
"alignAsTable": false,
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"hideEmpty": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"rightSide": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "10.0.2",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "irate(nginx_connections_accepted{instance=~\"$instance\"}[5m])",
|
||||||
|
"format": "time_series",
|
||||||
|
"instant": false,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} accepted",
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "irate(nginx_connections_handled{instance=~\"$instance\"}[5m])",
|
||||||
|
"format": "time_series",
|
||||||
|
"instant": false,
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} handled",
|
||||||
|
"refId": "B"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeRegions": [],
|
||||||
|
"title": "Processed connections",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"decimals": 1,
|
||||||
|
"format": "short",
|
||||||
|
"label": "Connections (rate)",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": "",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"decimals": 0,
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 8
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 12,
|
||||||
|
"legend": {
|
||||||
|
"alignAsTable": false,
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"rightSide": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "10.0.2",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "nginx_connections_active{instance=~\"$instance\"}",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} active",
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "nginx_connections_reading{instance=~\"$instance\"}",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} reading",
|
||||||
|
"refId": "B"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "nginx_connections_waiting{instance=~\"$instance\"}",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} waiting",
|
||||||
|
"refId": "C"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "nginx_connections_writing{instance=~\"$instance\"}",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} writing",
|
||||||
|
"refId": "D"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeRegions": [],
|
||||||
|
"title": "Active Connections",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"decimals": 0,
|
||||||
|
"format": "short",
|
||||||
|
"label": "Connections",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 18
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 15,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"links": [],
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "10.0.2",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"expr": "irate(nginx_http_requests_total{instance=~\"$instance\"}[5m])",
|
||||||
|
"format": "time_series",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "{{instance}} total requests",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeRegions": [],
|
||||||
|
"title": "Total requests",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"mode": "time",
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"logBase": 1,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refresh": "5s",
|
||||||
|
"schemaVersion": 38,
|
||||||
|
"style": "dark",
|
||||||
|
"tags": [
|
||||||
|
"nginx",
|
||||||
|
"prometheus",
|
||||||
|
"nginx prometheus exporter"
|
||||||
|
],
|
||||||
|
"templating": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"current": {
|
||||||
|
"selected": false,
|
||||||
|
"text": "Prometheus",
|
||||||
|
"value": "Prometheus"
|
||||||
|
},
|
||||||
|
"hide": 2,
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "datasource",
|
||||||
|
"multi": false,
|
||||||
|
"name": "DS_PROMETHEUS",
|
||||||
|
"options": [],
|
||||||
|
"query": "prometheus",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"type": "datasource"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"current": {},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${DS_PROMETHEUS}"
|
||||||
|
},
|
||||||
|
"definition": "label_values(nginx_up, instance)",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": true,
|
||||||
|
"label": "Host",
|
||||||
|
"multi": true,
|
||||||
|
"name": "instance",
|
||||||
|
"options": [],
|
||||||
|
"query": "label_values(nginx_up, instance)",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"tagValuesQuery": "",
|
||||||
|
"tagsQuery": "",
|
||||||
|
"type": "query",
|
||||||
|
"useTags": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-15m",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {
|
||||||
|
"refresh_intervals": [
|
||||||
|
"5s",
|
||||||
|
"10s",
|
||||||
|
"30s",
|
||||||
|
"1m",
|
||||||
|
"5m",
|
||||||
|
"15m",
|
||||||
|
"30m",
|
||||||
|
"1h",
|
||||||
|
"2h",
|
||||||
|
"1d"
|
||||||
|
],
|
||||||
|
"time_options": [
|
||||||
|
"5m",
|
||||||
|
"15m",
|
||||||
|
"1h",
|
||||||
|
"6h",
|
||||||
|
"12h",
|
||||||
|
"24h",
|
||||||
|
"2d",
|
||||||
|
"7d",
|
||||||
|
"30d"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"timezone": "",
|
||||||
|
"title": "NGINX",
|
||||||
|
"uid": "MsjffzSZz",
|
||||||
|
"version": 3,
|
||||||
|
"weekStart": ""
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -735,18 +735,18 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdback01",
|
"sv1",
|
||||||
"emzprdback02",
|
"sv2",
|
||||||
"emzprdfront01",
|
"sv1",
|
||||||
"emzprdfront02",
|
"sv2",
|
||||||
"emzprdfront03"
|
"sv3"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdback01",
|
"sv1",
|
||||||
"emzprdback02",
|
"sv2",
|
||||||
"emzprdfront01",
|
"sv1",
|
||||||
"emzprdfront02",
|
"sv2",
|
||||||
"emzprdfront03"
|
"sv3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
2654
files/dashboards/opensearch.json
Normal file
2654
files/dashboards/opensearch.json
Normal file
File diff suppressed because it is too large
Load Diff
1164
files/dashboards/overview-cf.json
Normal file
1164
files/dashboards/overview-cf.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -853,16 +853,16 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdback01",
|
"sv1",
|
||||||
"emzprdback02",
|
"sv2",
|
||||||
"emzprdfront02",
|
"sv2",
|
||||||
"emzprdfront03"
|
"sv3"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdback01",
|
"sv1",
|
||||||
"emzprdback02",
|
"sv2",
|
||||||
"emzprdfront02",
|
"sv2",
|
||||||
"emzprdfront03"
|
"sv3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
2074
files/dashboards/plateform-overview-cf.json
Normal file
2074
files/dashboards/plateform-overview-cf.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@
|
|||||||
"editable": true,
|
"editable": true,
|
||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": 5,
|
"id": 4,
|
||||||
"links": [],
|
"links": [],
|
||||||
"liveNow": false,
|
"liveNow": false,
|
||||||
"panels": [
|
"panels": [
|
||||||
@ -77,7 +77,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -151,7 +151,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -226,7 +226,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -311,7 +311,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -378,7 +378,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -445,7 +445,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -512,7 +512,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -579,7 +579,7 @@
|
|||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
},
|
},
|
||||||
"pluginVersion": "9.4.0-102000pre",
|
"pluginVersion": "10.1.0-124838pre",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -635,6 +635,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "smooth",
|
"lineInterpolation": "smooth",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -782,6 +783,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "linear",
|
"lineInterpolation": "linear",
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"fill": "solid"
|
"fill": "solid"
|
||||||
@ -914,6 +916,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "linear",
|
"lineInterpolation": "linear",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -1387,6 +1390,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "smooth",
|
"lineInterpolation": "smooth",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -1497,6 +1501,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "smooth",
|
"lineInterpolation": "smooth",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -1537,13 +1542,9 @@
|
|||||||
"id": 14,
|
"id": 14,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [
|
"calcs": [],
|
||||||
"lastNotNull",
|
"displayMode": "list",
|
||||||
"max",
|
"placement": "bottom",
|
||||||
"mean"
|
|
||||||
],
|
|
||||||
"displayMode": "table",
|
|
||||||
"placement": "right",
|
|
||||||
"showLegend": true,
|
"showLegend": true,
|
||||||
"sortBy": "Mean",
|
"sortBy": "Mean",
|
||||||
"sortDesc": true
|
"sortDesc": true
|
||||||
@ -1595,6 +1596,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "smooth",
|
"lineInterpolation": "smooth",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -1683,7 +1685,7 @@
|
|||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
"axisPlacement": "auto",
|
"axisPlacement": "auto",
|
||||||
"barAlignment": 0,
|
"barAlignment": 0,
|
||||||
"drawStyle": "line",
|
"drawStyle": "bars",
|
||||||
"fillOpacity": 30,
|
"fillOpacity": 30,
|
||||||
"gradientMode": "hue",
|
"gradientMode": "hue",
|
||||||
"hideFrom": {
|
"hideFrom": {
|
||||||
@ -1691,6 +1693,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "smooth",
|
"lineInterpolation": "smooth",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -1735,18 +1738,15 @@
|
|||||||
"id": 28,
|
"id": 28,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [
|
"calcs": [],
|
||||||
"mean",
|
"displayMode": "list",
|
||||||
"lastNotNull",
|
"placement": "bottom",
|
||||||
"max",
|
"showLegend": false,
|
||||||
"min"
|
"sortBy": "Mean",
|
||||||
],
|
"sortDesc": true
|
||||||
"displayMode": "table",
|
|
||||||
"placement": "right",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "multi",
|
"mode": "single",
|
||||||
"sort": "none"
|
"sort": "none"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1758,28 +1758,15 @@
|
|||||||
"uid": "yPhvsDP7k"
|
"uid": "yPhvsDP7k"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rate(cloudflare_zone_requests_total{}[$__interval]))",
|
"expr": "sum by (socket_path) (rate(php_fpm_slow_requests{instance=~\"$production\"} [$__rate_interval]))",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"intervalFactor": 10,
|
"intervalFactor": 10,
|
||||||
"legendFormat": "total",
|
"legendFormat": "{{ socket_path }} ",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "yPhvsDP7k"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "sum(rate(cloudflare_zone_requests_cached{}[$__interval]))",
|
|
||||||
"interval": "",
|
|
||||||
"intervalFactor": 10,
|
|
||||||
"legendFormat": "cached",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Cloudflare Requests / second",
|
"title": "PHP-FPM Slow Requests Rate",
|
||||||
"transparent": true,
|
"transparent": true,
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
},
|
},
|
||||||
@ -1808,6 +1795,7 @@
|
|||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"viz": false
|
"viz": false
|
||||||
},
|
},
|
||||||
|
"insertNulls": false,
|
||||||
"lineInterpolation": "smooth",
|
"lineInterpolation": "smooth",
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
"pointSize": 5,
|
"pointSize": 5,
|
||||||
@ -1920,14 +1908,12 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzhyp03",
|
"sv1",
|
||||||
"emzhyp04",
|
"sv2"
|
||||||
"emzhyp05"
|
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzhyp03",
|
"sv1",
|
||||||
"emzhyp04",
|
"sv2"
|
||||||
"emzhyp05"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -1955,14 +1941,10 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"/VMs",
|
|
||||||
"/VMs_SSD",
|
|
||||||
"/home",
|
"/home",
|
||||||
"/var/log"
|
"/var/log"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"/VMs",
|
|
||||||
"/VMs_SSD",
|
|
||||||
"/home",
|
"/home",
|
||||||
"/var/log"
|
"/var/log"
|
||||||
]
|
]
|
||||||
@ -1971,7 +1953,7 @@
|
|||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
"uid": "yPhvsDP7k"
|
"uid": "yPhvsDP7k"
|
||||||
},
|
},
|
||||||
"definition": "label_values(node_filesystem_avail_bytes{instance=~\"$host\",fstype!=\"nfs\"}, mountpoint)",
|
"definition": "label_values(node_filesystem_avail_bytes{instance=~\"$host\"}, mountpoint)",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": false,
|
"includeAll": false,
|
||||||
"label": "Mountpoints",
|
"label": "Mountpoints",
|
||||||
@ -1979,7 +1961,7 @@
|
|||||||
"name": "mountpoints",
|
"name": "mountpoints",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": {
|
"query": {
|
||||||
"query": "label_values(node_filesystem_avail_bytes{instance=~\"$host\",fstype!=\"nfs\"}, mountpoint)",
|
"query": "label_values(node_filesystem_avail_bytes{instance=~\"$host\"}, mountpoint)",
|
||||||
"refId": "StandardVariableQuery"
|
"refId": "StandardVariableQuery"
|
||||||
},
|
},
|
||||||
"refresh": 1,
|
"refresh": 1,
|
||||||
@ -2069,6 +2051,6 @@
|
|||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Plateform Overview",
|
"title": "Plateform Overview",
|
||||||
"uid": "pyphZNNVz",
|
"uid": "pyphZNNVz",
|
||||||
"version": 18,
|
"version": 1,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
||||||
|
1143
files/dashboards/postgresql.json
Normal file
1143
files/dashboards/postgresql.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1260,8 +1260,8 @@
|
|||||||
{
|
{
|
||||||
"current": {
|
"current": {
|
||||||
"selected": false,
|
"selected": false,
|
||||||
"text": "emzhyp03",
|
"text": "sv3",
|
||||||
"value": "emzhyp03"
|
"value": "sv3"
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
@ -1289,8 +1289,8 @@
|
|||||||
{
|
{
|
||||||
"current": {
|
"current": {
|
||||||
"selected": false,
|
"selected": false,
|
||||||
"text": "emzhyp05",
|
"text": "sv5",
|
||||||
"value": "emzhyp05"
|
"value": "sv5"
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
|
8389
files/dashboards/rabbitmq.json
Normal file
8389
files/dashboards/rabbitmq.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1358,12 +1358,12 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdcache01",
|
"sv1",
|
||||||
"emzprdcache02"
|
"sv2"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdcache01",
|
"sv1",
|
||||||
"emzprdcache02"
|
"sv2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
@ -364,7 +364,7 @@
|
|||||||
"calcs": [
|
"calcs": [
|
||||||
"lastNotNull"
|
"lastNotNull"
|
||||||
],
|
],
|
||||||
"fields": "/^min\\(varnish_main_uptime\\{instance=~\"\\(emzprdrpc01\\|emzprdrpc02\\)\"\\}\\)$/",
|
"fields": "/^min\\(varnish_main_uptime\\{instance=~\"\\(sv1\\|sv2\\)\"\\}\\)$/",
|
||||||
"values": false
|
"values": false
|
||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "auto"
|
||||||
@ -1664,12 +1664,12 @@
|
|||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": [
|
"text": [
|
||||||
"emzprdrpc01",
|
"sv1",
|
||||||
"emzprdrpc02"
|
"sv2"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"emzprdrpc01",
|
"sv1",
|
||||||
"emzprdrpc02"
|
"sv2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
|
@ -96,3 +96,17 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
enabled: yes
|
enabled: yes
|
||||||
tags: ['prometheus']
|
tags: ['prometheus']
|
||||||
|
|
||||||
|
- name: 'nginx-exporter-restart'
|
||||||
|
systemd:
|
||||||
|
name: prometheus-nginx-exporter.service
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
tags: ['prometheus']
|
||||||
|
|
||||||
|
- name: 'elasticsearch-exporter-restart'
|
||||||
|
systemd:
|
||||||
|
name: prometheus-elasticsearch-exporter.service
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
tags: ['prometheus']
|
||||||
|
@ -3,7 +3,7 @@ galaxy_info:
|
|||||||
author: Ludovic Cartier
|
author: Ludovic Cartier
|
||||||
description: Install and configure Prometheus and exporters
|
description: Install and configure Prometheus and exporters
|
||||||
company: brainsys
|
company: brainsys
|
||||||
license: GPLv3
|
license: MIT
|
||||||
min_ansible_version: 2.8
|
min_ansible_version: 2.8
|
||||||
issue_tracker_url: https://github.com/ludal13/ansible-role-prometheus/issues
|
issue_tracker_url: https://git.brainsys.io/ansible-roles/prometheus/issues
|
||||||
github_branch: master
|
github_branch: main
|
||||||
|
12
tasks/exporter/cleanup.yml
Normal file
12
tasks/exporter/cleanup.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: '{{ exporter }} exporter | stop old version'
|
||||||
|
systemd:
|
||||||
|
name: prometheus-{{ exporter }}-exporter.service
|
||||||
|
state: stopped
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
|
- name: '{{ exporter }} exporter | remove old version'
|
||||||
|
file:
|
||||||
|
path: /usr/local/bin/prometheus-{{ exporter }}-exporter
|
||||||
|
state: absent
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
47
tasks/exporter/common.yml
Normal file
47
tasks/exporter/common.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
- name: '{{ exporter }} exporter | check if exporter is already installed'
|
||||||
|
stat:
|
||||||
|
path: /usr/local/bin/prometheus-{{ exporter }}-exporter
|
||||||
|
register: stat_result
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
|
- name: '{{ exporter }} exporter | remove old exporter version'
|
||||||
|
include_tasks: "cleanup.yml"
|
||||||
|
when: stat_result.stat.exists and exporter_upgrade == "yes"
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
|
- name: '{{ exporter }} exporter | install from origin'
|
||||||
|
include_tasks: "origin.yml"
|
||||||
|
when: >
|
||||||
|
(not stat_result.stat.exists or exporter_upgrade == "yes") and
|
||||||
|
prometheus_exporters_sources == "origin"
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
|
- name: '{{ exporter }} exporter | install from repo'
|
||||||
|
include_tasks: "repo.yml"
|
||||||
|
when: >
|
||||||
|
(not stat_result.stat.exists or exporter_upgrade == "yes") and
|
||||||
|
prometheus_exporters_sources == "repo"
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
|
- name: '{{ exporter }} exporter | systemd | copy unit file'
|
||||||
|
template:
|
||||||
|
src: systemd/prometheus-{{ exporter }}-exporter.service.j2
|
||||||
|
dest: /etc/systemd/system/prometheus-{{ exporter }}-exporter.service
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0600
|
||||||
|
notify:
|
||||||
|
- '{{ exporter }}-exporter-restart'
|
||||||
|
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
|
- name: '{{ exporter }} exporter | systemd | enable service'
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
enabled: yes
|
||||||
|
name: prometheus-{{ exporter }}-exporter.service
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
|
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
@ -8,7 +8,7 @@
|
|||||||
failed_when: result.rc != 0 and result.rc != 127
|
failed_when: result.rc != 0 and result.rc != 127
|
||||||
with_items:
|
with_items:
|
||||||
- docker
|
- docker
|
||||||
- docker-compose
|
- docker-compose-plugin
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | create docker-compose directory'
|
- name: '{{ exporter }} exporter | create docker-compose directory'
|
@ -4,50 +4,23 @@
|
|||||||
- set_fact:
|
- set_fact:
|
||||||
prometheus_repo: "{{ lookup('vars', 'prometheus_repo_' ~ exporter) }}"
|
prometheus_repo: "{{ lookup('vars', 'prometheus_repo_' ~ exporter) }}"
|
||||||
|
|
||||||
#- name: debug
|
|
||||||
# debug:
|
|
||||||
# msg: "Repo: {{ prometheus_repo }}"
|
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | check if exporter is already install'
|
|
||||||
stat:
|
|
||||||
path: /usr/local/bin/prometheus-{{ exporter }}-exporter
|
|
||||||
register: stat_result
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | stop old version'
|
|
||||||
systemd:
|
|
||||||
name: prometheus-{{ exporter }}-exporter.service
|
|
||||||
state: stopped
|
|
||||||
when: exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | remove old version'
|
|
||||||
file:
|
|
||||||
path: /usr/local/bin/prometheus-{{ exporter }}-exporter
|
|
||||||
state: absent
|
|
||||||
when: exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | create temp path'
|
- name: '{{ exporter }} exporter | create temp path'
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: /tmp/prometheus_exporter/{{ exporter }}
|
path: /tmp/prometheus_exporter/{{ exporter }}
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | get latest release from GitHub'
|
- name: '{{ exporter }} exporter | get latest release from GitHub'
|
||||||
shell: curl --silent "https://api.github.com/repos/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/latest" | jq -r .tag_name | sed "s/v//"
|
shell: curl --silent "https://api.github.com/repos/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/latest" | jq -r .tag_name | sed "s/v//"
|
||||||
register: prometheus_exporter_latest_version
|
register: prometheus_exporter_latest_version
|
||||||
run_once: true
|
run_once: true
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | download'
|
- name: '{{ exporter }} exporter | download from origin'
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://github.com/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/download/v{{ prometheus_exporter_latest_version.stdout }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz"
|
url: "https://github.com/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/download/v{{ prometheus_exporter_latest_version.stdout }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz"
|
||||||
dest: /tmp/prometheus_exporter/{{ exporter }}/
|
dest: /tmp/prometheus_exporter/{{ exporter }}/
|
||||||
ignore_errors: '{{ ansible_check_mode }}'
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | unarchive'
|
- name: '{{ exporter }} exporter | unarchive'
|
||||||
@ -55,7 +28,6 @@
|
|||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: /tmp/prometheus_exporter/{{ exporter }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz
|
src: /tmp/prometheus_exporter/{{ exporter }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz
|
||||||
dest: /tmp/prometheus_exporter/{{ exporter }}/
|
dest: /tmp/prometheus_exporter/{{ exporter }}/
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
ignore_errors: '{{ ansible_check_mode }}'
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
|
|
||||||
@ -69,7 +41,6 @@
|
|||||||
mode: 0755
|
mode: 0755
|
||||||
notify:
|
notify:
|
||||||
- '{{ exporter }}-exporter-restart'
|
- '{{ exporter }}-exporter-restart'
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
tags: [ 'prometheus_{{ exporter }}' ]
|
||||||
ignore_errors: '{{ ansible_check_mode }}'
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
|
|
||||||
@ -77,25 +48,3 @@
|
|||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /tmp/prometheus_exporter/{{ exporter }}
|
path: /tmp/prometheus_exporter/{{ exporter }}
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | systemd | copy unit file'
|
|
||||||
template:
|
|
||||||
src: systemd/prometheus-{{ exporter }}-exporter.service.j2
|
|
||||||
dest: /etc/systemd/system/prometheus-{{ exporter }}-exporter.service
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0600
|
|
||||||
notify:
|
|
||||||
- '{{ exporter }}-exporter-restart'
|
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
ignore_errors: '{{ ansible_check_mode }}'
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
|
||||||
|
|
||||||
- name: '{{ exporter }} exporter | systemd | enable service'
|
|
||||||
systemd:
|
|
||||||
daemon_reload: yes
|
|
||||||
enabled: yes
|
|
||||||
name: prometheus-{{ exporter }}-exporter.service
|
|
||||||
ignore_errors: '{{ ansible_check_mode }}'
|
|
||||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
|
||||||
tags: [ 'prometheus_{{ exporter }}' ]
|
|
10
tasks/exporter/repo.yml
Normal file
10
tasks/exporter/repo.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- name: '{{ exporter }} exporter | download from repo'
|
||||||
|
get_url:
|
||||||
|
url: "{{prometheus_exporters_repo}}/releases/download/{{prometheus_exporters_release}}/{{exporter}}_exporter"
|
||||||
|
dest: /usr/local/bin/prometheus-{{ exporter }}-exporter
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
|
tags: [ 'prometheus_{{ exporter }}' ]
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_apache_exporter']
|
tags: ['prometheus_apache_exporter']
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_blackbox_exporter']
|
tags: ['prometheus_blackbox_exporter']
|
||||||
|
|
||||||
- name: 'blackbox exporter | configuration'
|
- name: 'blackbox exporter | configuration'
|
@ -3,7 +3,8 @@
|
|||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- cloudflare_api_key is defined
|
- cloudflare_api_key is defined
|
||||||
|
- cloudflare_api_email is defined
|
||||||
tags: ['prometheus_cloudflare']
|
tags: ['prometheus_cloudflare']
|
||||||
|
|
||||||
- include_tasks: _docker.yml
|
- include_tasks: ../docker.yml
|
||||||
tags: ['prometheus_cloudflare']
|
tags: ['prometheus_cloudflare']
|
3
tasks/exporter/services/elasticsearch.yml
Normal file
3
tasks/exporter/services/elasticsearch.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: ../common.yml
|
||||||
|
tags: ['prometheus_elasticsearch_exporter']
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_memcached_exporter']
|
tags: ['prometheus_memcached_exporter']
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_mongodb_exporter']
|
tags: ['prometheus_mongodb_exporter']
|
||||||
|
|
||||||
- name: 'mongodb exporter < v0.2 | move to /usr/local/bin'
|
- name: 'mongodb exporter < v0.2 | move to /usr/local/bin'
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_mysqld_exporter']
|
tags: ['prometheus_mysqld_exporter']
|
||||||
|
|
||||||
- name: 'mysqld exporter | configuration'
|
- name: 'mysqld exporter | configuration'
|
3
tasks/exporter/services/nginx.yml
Normal file
3
tasks/exporter/services/nginx.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: ../common.yml
|
||||||
|
tags: ['prometheus_nginx_exporter']
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_node_exporter']
|
tags: ['prometheus_node_exporter']
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_opcache_exporter']
|
tags: ['prometheus_opcache_exporter']
|
||||||
|
|
||||||
- name: 'opcache exporter | configuration'
|
- name: 'opcache exporter | configuration'
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_phpfpm_exporter']
|
tags: ['prometheus_phpfpm_exporter']
|
||||||
|
|
||||||
- name: 'phpfpm exporter | install startup script'
|
- name: 'phpfpm exporter | install startup script'
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_postgres_exporter']
|
tags: ['prometheus_postgres_exporter']
|
||||||
|
|
||||||
- name: 'postgres exporter | configuration'
|
- name: 'postgres exporter | configuration'
|
@ -7,11 +7,22 @@
|
|||||||
- prometheus_proxmox_exporter_node is defined
|
- prometheus_proxmox_exporter_node is defined
|
||||||
tags: ['prometheus_proxmox']
|
tags: ['prometheus_proxmox']
|
||||||
|
|
||||||
- name: 'proxmox exporter | install package through pip3'
|
- name: 'proxmox exporter | create dedicated venv path'
|
||||||
|
file:
|
||||||
|
path: "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||||
|
state: directory
|
||||||
|
tags: ['prometheus_proxmox']
|
||||||
|
|
||||||
|
- name: 'proxmox exporter | create dedicated venv'
|
||||||
|
command:
|
||||||
|
cmd: python3 -m venv "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||||
|
tags: ['prometheus_proxmox']
|
||||||
|
|
||||||
|
- name: 'proxmox exporter | install package into a dedicated venv'
|
||||||
pip:
|
pip:
|
||||||
name:
|
name:
|
||||||
- prometheus-pve-exporter
|
- prometheus-pve-exporter
|
||||||
executable: pip3
|
virtualenv: "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||||
tags: ['prometheus_proxmox']
|
tags: ['prometheus_proxmox']
|
||||||
|
|
||||||
- name: 'proxmox exporter | configuration'
|
- name: 'proxmox exporter | configuration'
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_redis_exporter']
|
tags: ['prometheus_redis_exporter']
|
||||||
|
|
||||||
- name: 'redis exporter | configuration'
|
- name: 'redis exporter | configuration'
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: _common.yml
|
- include_tasks: ../common.yml
|
||||||
tags: ['prometheus_varnish_exporter']
|
tags: ['prometheus_varnish_exporter']
|
@ -24,11 +24,11 @@
|
|||||||
- name: 'exporters install'
|
- name: 'exporters install'
|
||||||
vars:
|
vars:
|
||||||
exporter: "{{ item }}"
|
exporter: "{{ item }}"
|
||||||
include_tasks: "exporter/{{ item }}.yml"
|
include_tasks: "exporter/services/{{ item }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- prometheus_node_exporter
|
- prometheus_node_exporter
|
||||||
- prometheus_mysqld_exporter
|
- prometheus_mysqld_exporter
|
||||||
- prometheus_postgresql_exporter
|
- prometheus_postgres_exporter
|
||||||
- prometheus_mongodb_exporter
|
- prometheus_mongodb_exporter
|
||||||
- prometheus_apache_exporter
|
- prometheus_apache_exporter
|
||||||
- prometheus_haproxy_exporter
|
- prometheus_haproxy_exporter
|
||||||
@ -39,5 +39,6 @@
|
|||||||
- prometheus_opcache_exporter
|
- prometheus_opcache_exporter
|
||||||
- prometheus_blackbox_exporter
|
- prometheus_blackbox_exporter
|
||||||
- prometheus_kong_exporter
|
- prometheus_kong_exporter
|
||||||
|
- prometheus_nginx_exporter
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ prometheus_exporter_packages }}"
|
- "{{ prometheus_exporter_packages }}"
|
||||||
|
@ -17,6 +17,18 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
when: prometheus_use_victoriametrics == false
|
||||||
|
notify:
|
||||||
|
- 'grafana-prometheus-restart'
|
||||||
|
|
||||||
|
- name: 'prometheus | server | copy config vmagent.yml'
|
||||||
|
template:
|
||||||
|
src: conf/vmagent.yml.j2
|
||||||
|
dest: /etc/prometheus/vmagent.yml
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
when: prometheus_use_victoriametrics == true
|
||||||
notify:
|
notify:
|
||||||
- 'grafana-prometheus-restart'
|
- 'grafana-prometheus-restart'
|
||||||
|
|
||||||
@ -36,12 +48,12 @@
|
|||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | create grafana.ini file"
|
- name: "grafana-prometheus | create grafana.ini file"
|
||||||
file:
|
template:
|
||||||
path: /opt/docker-compose/grafana-prometheus/grafana.ini
|
src: conf/grafana.ini.j2
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/grafana.ini
|
||||||
owner: '1000'
|
owner: '1000'
|
||||||
group: '1000'
|
group: '1000'
|
||||||
mode: '0750'
|
mode: '0750'
|
||||||
state: touch
|
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
ignore_errors: '{{ ansible_check_mode }}'
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | import grafana provisioned datasources conf"
|
- name: "grafana-prometheus | import grafana provisioned datasources conf"
|
||||||
copy:
|
template:
|
||||||
src: dashboards/datasources.yaml
|
src: conf/datasources.yaml.j2
|
||||||
dest: /opt/docker-compose/grafana-prometheus/datasources/datasources.yaml
|
dest: /opt/docker-compose/grafana-prometheus/datasources/datasources.yaml
|
||||||
owner: '1000'
|
owner: '1000'
|
||||||
group: '1000'
|
group: '1000'
|
||||||
mode: '0750'
|
mode: '0750'
|
||||||
when: grafana_provisioned_datasources_path is not defined
|
#when: grafana_provisioned_datasources_path is not defined
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | import grafana provisioned dashboards conf"
|
- name: "grafana-prometheus | import grafana provisioned dashboards conf"
|
||||||
@ -75,6 +75,26 @@
|
|||||||
when: prometheus_docker_exporter_targets is defined
|
when: prometheus_docker_exporter_targets is defined
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana docker dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/docker.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/docker.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_cadvisor_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana opensearch dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/opensearch.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/opensearch.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_opensearch_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | import grafana haproxy dashboard"
|
- name: "grafana-prometheus | import grafana haproxy dashboard"
|
||||||
copy:
|
copy:
|
||||||
src: dashboards/haproxy.json
|
src: dashboards/haproxy.json
|
||||||
@ -105,6 +125,16 @@
|
|||||||
when: prometheus_mysqld_exporter_targets is defined
|
when: prometheus_mysqld_exporter_targets is defined
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana mongodb dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/mongodb.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/mongodb.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_mongodb_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | import grafana network dashboard"
|
- name: "grafana-prometheus | import grafana network dashboard"
|
||||||
copy:
|
copy:
|
||||||
src: dashboards/network.json
|
src: dashboards/network.json
|
||||||
@ -142,7 +172,21 @@
|
|||||||
owner: '1000'
|
owner: '1000'
|
||||||
group: '1000'
|
group: '1000'
|
||||||
mode: '0750'
|
mode: '0750'
|
||||||
when: prometheus_node_exporter_targets is defined
|
when: >
|
||||||
|
prometheus_node_exporter_targets is defined and
|
||||||
|
prometheus_cloudflare_exporter_targets is not defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana overview-cf dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/overview-cf.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: >
|
||||||
|
prometheus_node_exporter_targets is defined and
|
||||||
|
prometheus_cloudflare_exporter_targets is defined
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | import grafana plateform-overview dashboard"
|
- name: "grafana-prometheus | import grafana plateform-overview dashboard"
|
||||||
@ -152,7 +196,21 @@
|
|||||||
owner: '1000'
|
owner: '1000'
|
||||||
group: '1000'
|
group: '1000'
|
||||||
mode: '0750'
|
mode: '0750'
|
||||||
when: prometheus_node_exporter_targets is defined
|
when: >
|
||||||
|
prometheus_node_exporter_targets is defined and
|
||||||
|
prometheus_cloudflare_exporter_targets is not defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana plateform-overview-cf dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/plateform-overview-cf.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: >
|
||||||
|
prometheus_node_exporter_targets is defined and
|
||||||
|
prometheus_cloudflare_exporter_targets is defined
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
- name: "grafana-prometheus | import grafana phpfpm dashboard"
|
- name: "grafana-prometheus | import grafana phpfpm dashboard"
|
||||||
@ -194,3 +252,63 @@
|
|||||||
mode: '0750'
|
mode: '0750'
|
||||||
when: prometheus_varnish_exporter_targets is defined
|
when: prometheus_varnish_exporter_targets is defined
|
||||||
notify: "grafana-prometheus-restart"
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana gitlab dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/gitlab.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/gitlab.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_gitlab_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana postgresql dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/postgresql.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/postgresql.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_postgres_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana kong dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/kong.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/kong.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_kong_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana nginx dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/nginx.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/nginx.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_nginx_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana elasticsearch dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/elasticsearch.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/elasticsearch.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_elasticsearch_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
||||||
|
|
||||||
|
- name: "grafana-prometheus | import grafana rabbitmq dashboard"
|
||||||
|
copy:
|
||||||
|
src: dashboards/rabbitmq.json
|
||||||
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/rabbitmq.json
|
||||||
|
owner: '1000'
|
||||||
|
group: '1000'
|
||||||
|
mode: '0750'
|
||||||
|
when: prometheus_rabbitmq_exporter_targets is defined
|
||||||
|
notify: "grafana-prometheus-restart"
|
@ -11,7 +11,12 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- CF_API_TOKEN={{ cloudflare_api_key }}
|
- CF_API_TOKEN={{ cloudflare_api_key }}
|
||||||
|
- CF_API_EMAIL={{ cloudflare_api_email }}
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: {{ cloudflare_exporter_watchtower_enable | default('true') }}
|
||||||
ports:
|
ports:
|
||||||
- 8082:8080
|
- 8082:8080
|
||||||
networks:
|
networks:
|
||||||
- {{ prometheus_docker_network }}
|
- {{ prometheus_docker_network }}
|
||||||
|
dns:
|
||||||
|
- "{{ prometheus_cloudflare_dns }}"
|
||||||
|
@ -2,14 +2,17 @@ version: "3"
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
grafana:
|
grafana:
|
||||||
name: grafana
|
|
||||||
{% if grafana_traefik_enable is defined %}
|
{% if grafana_traefik_enable is defined %}
|
||||||
traefik:
|
traefik:
|
||||||
external: true
|
external: true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
{% if prometheus_use_victoriametrics == false %}
|
||||||
prometheus-data:
|
prometheus-data:
|
||||||
|
{% else %}
|
||||||
|
victoria-metrics-data:
|
||||||
|
{% endif %}
|
||||||
grafana-data:
|
grafana-data:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@ -55,7 +58,10 @@ services:
|
|||||||
- grafana
|
- grafana
|
||||||
{% if grafana_traefik_enable is defined %}
|
{% if grafana_traefik_enable is defined %}
|
||||||
- traefik
|
- traefik
|
||||||
|
{% endif %}
|
||||||
labels:
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: {{ grafana_watchtower_enable | default('true') }}
|
||||||
|
{% if grafana_traefik_enable is defined %}
|
||||||
traefik.enable: true
|
traefik.enable: true
|
||||||
traefik.docker.network: traefik
|
traefik.docker.network: traefik
|
||||||
traefik.http.routers.grafana.rule: Host(`{{ grafana_domain|default(omit) }}`)
|
traefik.http.routers.grafana.rule: Host(`{{ grafana_domain|default(omit) }}`)
|
||||||
@ -63,11 +69,16 @@ services:
|
|||||||
traefik.http.routers.grafana.tls.certresolver: letsencrypt
|
traefik.http.routers.grafana.tls.certresolver: letsencrypt
|
||||||
traefik.http.routers.grafana.entrypoints: "{{ grafana_traefik_entrypoint }}"
|
traefik.http.routers.grafana.entrypoints: "{{ grafana_traefik_entrypoint }}"
|
||||||
traefik.http.services.grafana.loadbalancer.server.port: 3000
|
traefik.http.services.grafana.loadbalancer.server.port: 3000
|
||||||
|
{% if grafana_traefik_ipwhitelist is defined %}
|
||||||
|
traefik.http.middlewares.grafana-clientips.ipwhitelist.sourcerange: {{ grafana_traefik_ipwhitelist }}
|
||||||
|
traefik.http.routers.grafana.middlewares: "grafana-clientips@docker"
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
ports:
|
ports:
|
||||||
- "{{ grafana_port | default(3000) }}:3000"
|
- "{{ grafana_port | default(3000) }}:3000"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if prometheus_use_victoriametrics == false %}
|
||||||
prometheus:
|
prometheus:
|
||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
image: prom/prometheus:{{ grafana_prometheus_version | default('latest') }}
|
image: prom/prometheus:{{ grafana_prometheus_version | default('latest') }}
|
||||||
@ -83,14 +94,21 @@ services:
|
|||||||
- grafana
|
- grafana
|
||||||
{% if prometheus_traefik_enable is defined %}
|
{% if prometheus_traefik_enable is defined %}
|
||||||
- traefik
|
- traefik
|
||||||
|
{% endif %}
|
||||||
labels:
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: {{ prometheus_watchtower_enable | default('true') }}
|
||||||
|
{% if prometheus_traefik_enable is defined %}
|
||||||
traefik.enable: true
|
traefik.enable: true
|
||||||
traefik.docker.network: traefik
|
traefik.docker.network: traefik
|
||||||
traefik.http.routers.prometheus.rule: Host(`{{ prometheus_domain|default(omit) }}`)
|
traefik.http.routers.prometheus.rule: Host(`{{ prometheus_domain|default(omit) }}`)
|
||||||
traefik.http.routers.prometheus.tls: true
|
traefik.http.routers.prometheus.tls: true
|
||||||
traefik.http.routers.prometheus.tls.certresolver: letsencrypt
|
traefik.http.routers.prometheus.tls.certresolver: letsencrypt
|
||||||
traefik.http.routers.prometheus.entrypoints: websecure
|
traefik.http.routers.prometheus.entrypoints: "{{ grafana_traefik_entrypoint }}"
|
||||||
traefik.http.services.prometheus.loadbalancer.server.port: 9090
|
traefik.http.services.prometheus.loadbalancer.server.port: 9090
|
||||||
|
{% if prometheus_traefik_ipwhitelist is defined %}
|
||||||
|
traefik.http.middlewares.prometheus-clientips.ipwhitelist.sourcerange: {{ prometheus_traefik_ipwhitelist }}
|
||||||
|
traefik.http.routers.prometheus.middlewares: "prometheus-clientips@docker"
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
ports:
|
ports:
|
||||||
- "{{ prometheus_port | default(9090) }}:9090"
|
- "{{ prometheus_port | default(9090) }}:9090"
|
||||||
@ -102,3 +120,54 @@ services:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
{% else %}
|
||||||
|
victoriametrics:
|
||||||
|
image: victoriametrics/victoria-metrics
|
||||||
|
container_name: victoriametrics
|
||||||
|
restart: always
|
||||||
|
command:
|
||||||
|
- '-storageDataPath=/victoria-metrics-data'
|
||||||
|
- '-retentionPeriod={{ prometheus_retention_time }}'
|
||||||
|
volumes:
|
||||||
|
- victoria-metrics-data:/victoria-metrics-data
|
||||||
|
{% if prometheus_traefik_enable is defined %}
|
||||||
|
- traefik
|
||||||
|
{% endif %}
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: {{ prometheus_watchtower_enable | default('true') }}
|
||||||
|
{% if prometheus_traefik_enable is defined %}
|
||||||
|
traefik.enable: true
|
||||||
|
traefik.docker.network: traefik
|
||||||
|
traefik.http.routers.prometheus.rule: Host(`{{ prometheus_domain|default(omit) }}`)
|
||||||
|
traefik.http.routers.prometheus.tls: true
|
||||||
|
traefik.http.routers.prometheus.tls.certresolver: letsencrypt
|
||||||
|
traefik.http.routers.prometheus.entrypoints: "{{ grafana_traefik_entrypoint }}"
|
||||||
|
traefik.http.services.prometheus.loadbalancer.server.port: 8428
|
||||||
|
{% else %}
|
||||||
|
ports:
|
||||||
|
- "{{ prometheus_port | default(8428) }}:8428"
|
||||||
|
{% endif %}
|
||||||
|
networks:
|
||||||
|
- grafana
|
||||||
|
|
||||||
|
vmagent:
|
||||||
|
image: victoriametrics/vmagent
|
||||||
|
container_name: vmagent
|
||||||
|
restart: always
|
||||||
|
command:
|
||||||
|
- '-promscrape.config=/etc/vmagent/vmagent.yml'
|
||||||
|
- '-remoteWrite.url=http://victoriametrics:8428/api/v1/write'
|
||||||
|
- '-loggerLevel=ERROR'
|
||||||
|
volumes:
|
||||||
|
- /etc/prometheus:/etc/vmagent
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: {{ prometheus_watchtower_enable | default('true') }}
|
||||||
|
networks:
|
||||||
|
- grafana
|
||||||
|
{% if prometheus_nodes_ip is defined %}
|
||||||
|
extra_hosts:
|
||||||
|
{% for key, value in prometheus_nodes_ip.items() %}
|
||||||
|
- "{{ key }}:{{ value }}"
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
@ -5,5 +5,9 @@ datasources:
|
|||||||
uid: yPhvsDP7k
|
uid: yPhvsDP7k
|
||||||
type: prometheus
|
type: prometheus
|
||||||
access: proxy
|
access: proxy
|
||||||
|
{% if prometheus_use_victoriametrics == false %}
|
||||||
url: http://prometheus:9090
|
url: http://prometheus:9090
|
||||||
|
{% else %}
|
||||||
|
url: http://victoriametrics:8428
|
||||||
|
{% endif %}
|
||||||
isDefault: true
|
isDefault: true
|
10
templates/conf/grafana.ini.j2
Normal file
10
templates/conf/grafana.ini.j2
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[server]
|
||||||
|
domain = {{ grafana_domain }}
|
||||||
|
root_url = %(protocol)s://%(domain)s
|
||||||
|
|
||||||
|
[dashboards]
|
||||||
|
{% if prometheus_cloudflare_exporter_targets is defined %}
|
||||||
|
default_home_dashboard_path = /etc/grafana/provisioning/dashboards/overview.json
|
||||||
|
{% else %}
|
||||||
|
default_home_dashboard_path = /etc/grafana/provisioning/dashboards/overview.json
|
||||||
|
{% endif %}
|
@ -97,6 +97,11 @@ scrape_configs:
|
|||||||
- {{ target }}:9216
|
- {{ target }}:9216
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9216'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prometheus_postgres_exporter_targets is defined %}
|
{% if prometheus_postgres_exporter_targets is defined %}
|
||||||
@ -120,6 +125,11 @@ scrape_configs:
|
|||||||
- {{ target }}:9187
|
- {{ target }}:9187
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9187'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prometheus_phpfpm_exporter_targets is defined %}
|
{% if prometheus_phpfpm_exporter_targets is defined %}
|
||||||
@ -172,6 +182,23 @@ scrape_configs:
|
|||||||
regex: '(.*):9117'
|
regex: '(.*):9117'
|
||||||
replacement: '${1}'
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_nginx_exporter_targets is defined %}
|
||||||
|
# nginx exporter #
|
||||||
|
- job_name: nginx
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_nginx_exporter_targets %}
|
||||||
|
- {{ target }}:9113
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9113'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prometheus_haproxy_exporter_targets is defined %}
|
{% if prometheus_haproxy_exporter_targets is defined %}
|
||||||
# haproxy exporter #
|
# haproxy exporter #
|
||||||
@ -370,7 +397,6 @@ scrape_configs:
|
|||||||
target_label: instance
|
target_label: instance
|
||||||
regex: '(.*):8080'
|
regex: '(.*):8080'
|
||||||
replacement: '${1}'
|
replacement: '${1}'
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prometheus_cloudflare_exporter_targets is defined %}
|
{% if prometheus_cloudflare_exporter_targets is defined %}
|
||||||
# cloudflare #
|
# cloudflare #
|
||||||
@ -388,13 +414,13 @@ scrape_configs:
|
|||||||
replacement: '${1}'
|
replacement: '${1}'
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prometheus_pve_exporter_targets is defined %}
|
{% if prometheus_proxmox_exporter_targets is defined %}
|
||||||
# proxmox #
|
# proxmox #
|
||||||
- job_name: pve
|
- job_name: pve
|
||||||
scrape_interval: 30s
|
scrape_interval: 30s
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
{% for target in prometheus_pve_exporter_targets %}
|
{% for target in prometheus_proxmox_exporter_targets %}
|
||||||
- {{ target }}:9221
|
- {{ target }}:9221
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
metrics_path: /pve
|
metrics_path: /pve
|
||||||
@ -403,4 +429,95 @@ scrape_configs:
|
|||||||
target_label: instance
|
target_label: instance
|
||||||
regex: '(.*):9221'
|
regex: '(.*):9221'
|
||||||
replacement: '${1}'
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_opensearch_exporter_targets is defined %}
|
||||||
|
# opensearch #
|
||||||
|
- job_name: opensearch
|
||||||
|
scrape_interval: 30s
|
||||||
|
metrics_path: "/_prometheus/metrics"
|
||||||
|
scheme: https
|
||||||
|
tls_config:
|
||||||
|
insecure_skip_verify: true
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_opensearch_exporter_targets %}
|
||||||
|
- {{ target }}:9200
|
||||||
|
{% endfor %}
|
||||||
|
basic_auth:
|
||||||
|
username: {{ opensearch_user }}
|
||||||
|
password: {{ opensearch_pass }}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9200'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_gitlab_exporter_targets is defined %}
|
||||||
|
# gitlab #
|
||||||
|
- job_name: gitlab-nginx
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:8060
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-node
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9101
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-redis
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9121
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-postgres
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9187
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-workhorse
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9229
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-rails
|
||||||
|
metrics_path: "/-/metrics"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:8880
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-sidekiq
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:8082
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab_exporter_database
|
||||||
|
metrics_path: "/database"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9168
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab_exporter_sidekiq
|
||||||
|
metrics_path: "/sidekiq"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9168
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitaly
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9236
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
544
templates/conf/vmagent.yml.j2
Normal file
544
templates/conf/vmagent.yml.j2
Normal file
@ -0,0 +1,544 @@
|
|||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
global:
|
||||||
|
scrape_interval: {{ prometheus_server_global_scrape_interval }}s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
|
||||||
|
|
||||||
|
{% if prometheus_server_rules is defined %}
|
||||||
|
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
|
||||||
|
rule_files:
|
||||||
|
- 'rules.yml'
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# A scrape configuration containing exactly one endpoint to scrape:
|
||||||
|
# Here it's Prometheus itself.
|
||||||
|
scrape_configs:
|
||||||
|
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
||||||
|
- job_name: 'vmagent'
|
||||||
|
|
||||||
|
# Override the global default and scrape targets from this job every 5 seconds.
|
||||||
|
scrape_interval: {{ prometheus_server_scrape_interval }}s
|
||||||
|
scrape_timeout: {{ prometheus_server_scrape_timeout }}s
|
||||||
|
|
||||||
|
# metrics_path defaults to '/metrics'
|
||||||
|
# scheme defaults to 'http'.
|
||||||
|
|
||||||
|
static_configs:
|
||||||
|
- targets: ['victoriametrics:8428']
|
||||||
|
|
||||||
|
{% if prometheus_node_exporter_targets is defined %}
|
||||||
|
# node exporter #
|
||||||
|
- job_name: node
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_node_exporter_targets %}
|
||||||
|
- {{ target }}:9100
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9100'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_mysqld_exporter_targets is defined %}
|
||||||
|
# mysql exporter #
|
||||||
|
- job_name: mysql
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
{% if prometheus_mysqld_exporter_custom is defined %}
|
||||||
|
{% for target in prometheus_mysqld_exporter_custom.values() %}
|
||||||
|
- targets: ['{{ target.node_name }}:9104']
|
||||||
|
labels:
|
||||||
|
environment: '{{ target.environment }}'
|
||||||
|
node_name: '{{ target.node_name }}'
|
||||||
|
service_name: '{{ target.service_name }}'
|
||||||
|
cluster: '{{ target.cluster }}'
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_mysqld_exporter_targets %}
|
||||||
|
- {{ target }}:9104
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9104'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_mongodb_exporter_targets is defined %}
|
||||||
|
# mongoDB exporter #
|
||||||
|
- job_name: mongodb
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
{% if prometheus_mongodb_exporter_custom is defined %}
|
||||||
|
{% for target in prometheus_mongodb_exporter_custom.values() %}
|
||||||
|
- targets: ['{{ target.node_name }}:9216']
|
||||||
|
labels:
|
||||||
|
environment: '{{ target.environment }}'
|
||||||
|
node_name: '{{ target.node_name }}'
|
||||||
|
service_name: '{{ target.service_name }}'
|
||||||
|
cluster: '{{ target.cluster }}'
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_mongodb_exporter_targets %}
|
||||||
|
- {{ target }}:9216
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9216'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_postgres_exporter_targets is defined %}
|
||||||
|
# postgresql exporter #
|
||||||
|
- job_name: postgresql
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
{% if prometheus_postgres_exporter_custom is defined %}
|
||||||
|
{% for target in prometheus_postgres_exporter_custom.values() %}
|
||||||
|
- targets: ['{{ target.node_name }}:9187']
|
||||||
|
labels:
|
||||||
|
environment: '{{ target.environment }}'
|
||||||
|
node_name: '{{ target.node_name }}'
|
||||||
|
service_name: '{{ target.service_name }}'
|
||||||
|
cluster: '{{ target.cluster }}'
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_postgres_exporter_targets %}
|
||||||
|
- {{ target }}:9187
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9187'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_phpfpm_exporter_targets is defined %}
|
||||||
|
# PHP-FPM exporter #
|
||||||
|
- job_name: phpfpm
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_phpfpm_exporter_targets %}
|
||||||
|
- {{ target }}:9253
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9253'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_opcache_exporter_targets is defined %}
|
||||||
|
# opcache exporter #
|
||||||
|
- job_name: opcache
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_opcache_exporter_targets %}
|
||||||
|
- {{ target }}:9101
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9101'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_apache_exporter_targets is defined %}
|
||||||
|
# apache exporter #
|
||||||
|
- job_name: apache
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_apache_exporter_targets %}
|
||||||
|
- {{ target }}:9117
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9117'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_nginx_exporter_targets is defined %}
|
||||||
|
# nginx exporter #
|
||||||
|
- job_name: nginx
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_nginx_exporter_targets %}
|
||||||
|
- {{ target }}:9113
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9113'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_haproxy_exporter_targets is defined %}
|
||||||
|
# haproxy exporter #
|
||||||
|
- job_name: haproxy
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_haproxy_exporter_targets %}
|
||||||
|
- {{ target }}:8404
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):8404'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_varnish_exporter_targets is defined %}
|
||||||
|
# Varnish exporter #
|
||||||
|
- job_name: varnish
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_varnish_exporter_targets %}
|
||||||
|
- {{ target }}:9131
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9131'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_blackbox_exporter is defined %}
|
||||||
|
# blackbox #
|
||||||
|
{% if prometheus_blackbox_exporter_http is defined %}
|
||||||
|
## http check ##
|
||||||
|
- job_name: blackbox - url
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /probe
|
||||||
|
params:
|
||||||
|
module: [http_2xx]
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_blackbox_exporter_http %}
|
||||||
|
- {{target }}
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [__address__]
|
||||||
|
target_label: __param_target
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: instance
|
||||||
|
- target_label: __address__
|
||||||
|
replacement: {{ prometheus_blackbox_exporter_host }}:9115
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_blackbox_exporter_ping is defined %}
|
||||||
|
## ping ##
|
||||||
|
- job_name: blackbox - ping
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
params:
|
||||||
|
module: [icmp]
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_blackbox_exporter_ping %}
|
||||||
|
- {{ target }}
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [__address__]
|
||||||
|
target_label: __param_target
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: instance
|
||||||
|
- target_label: __address__
|
||||||
|
replacement: {{ prometheus_blackbox_exporter_host }}:9115
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_redis_multi_instances_exporter_targets is defined %}
|
||||||
|
# Redis exporter #
|
||||||
|
- job_name: 'redis_exporter_targets'
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_redis_multi_instances_exporter_targets %}
|
||||||
|
- {{ target }}
|
||||||
|
{% endfor %}
|
||||||
|
metrics_path: /scrape
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [__address__]
|
||||||
|
target_label: __param_target
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: instance
|
||||||
|
- source_labels: [instance]
|
||||||
|
target_label: __address__
|
||||||
|
regex: 'redis://(.*):63..'
|
||||||
|
replacement: '${1}:9121'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_redis_exporter_targets is defined %}
|
||||||
|
# Redis exporter #
|
||||||
|
- job_name: redis
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_redis_exporter_targets %}
|
||||||
|
- {{ target }}:9121
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9121'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_proxysql_exporter_targets is defined %}
|
||||||
|
# ProxySQL exporter #
|
||||||
|
- job_name: proxysql
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_proxysql_exporter_targets %}
|
||||||
|
- {{ target }}:6070
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):6070'
|
||||||
|
replacement: '${1}'
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_kong_exporter_targets is defined %}
|
||||||
|
# Kong exporter #
|
||||||
|
- job_name: kong
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
honor_labels: false
|
||||||
|
honor_timestamps: true
|
||||||
|
sample_limit: 0
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_kong_exporter_targets %}
|
||||||
|
- {{ target }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_memcached_exporter_targets is defined %}
|
||||||
|
# Memcached exporter #
|
||||||
|
- job_name: memcached
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_memcached_exporter_targets %}
|
||||||
|
- {{ target }}:9150
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9150'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_docker_exporter_targets is defined %}
|
||||||
|
# Docker exporter #
|
||||||
|
- job_name: docker
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_docker_exporter_targets %}
|
||||||
|
- {{ target }}:9323
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9323'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_cadvisor_exporter_targets is defined %}
|
||||||
|
# cadvisor #
|
||||||
|
- job_name: cadvisor
|
||||||
|
scrape_interval: 30s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_cadvisor_exporter_targets %}
|
||||||
|
- {{ target }}:8080
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):8080'
|
||||||
|
replacement: '${1}'
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_cloudflare_exporter_targets is defined %}
|
||||||
|
# cloudflare #
|
||||||
|
- job_name: cloudflare
|
||||||
|
scrape_interval: 30s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_cloudflare_exporter_targets %}
|
||||||
|
- {{ target }}:8082
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):8082'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_proxmox_exporter_targets is defined %}
|
||||||
|
# proxmox #
|
||||||
|
- job_name: pve
|
||||||
|
scrape_interval: 30s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_proxmox_exporter_targets %}
|
||||||
|
- {{ target }}:9221
|
||||||
|
{% endfor %}
|
||||||
|
metrics_path: /pve
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9221'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_opensearch_exporter_targets is defined %}
|
||||||
|
# opensearch #
|
||||||
|
- job_name: opensearch
|
||||||
|
scrape_interval: 30s
|
||||||
|
metrics_path: "/_prometheus/metrics"
|
||||||
|
scheme: https
|
||||||
|
tls_config:
|
||||||
|
insecure_skip_verify: true
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_opensearch_exporter_targets %}
|
||||||
|
- {{ target }}:9200
|
||||||
|
{% endfor %}
|
||||||
|
basic_auth:
|
||||||
|
username: {{ opensearch_user }}
|
||||||
|
password: {{ opensearch_pass }}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9200'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_gitlab_exporter_targets is defined %}
|
||||||
|
# gitlab #
|
||||||
|
- job_name: gitlab-nginx
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:8060
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-node
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9101
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-redis
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9121
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-postgres
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9187
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-workhorse
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9229
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-rails
|
||||||
|
metrics_path: "/-/metrics"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:8880
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab-sidekiq
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:8082
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab_exporter_database
|
||||||
|
metrics_path: "/database"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9168
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitlab_exporter_sidekiq
|
||||||
|
metrics_path: "/sidekiq"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9168
|
||||||
|
{% endfor %}
|
||||||
|
- job_name: gitaly
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_gitlab_exporter_targets %}
|
||||||
|
- {{ target }}:9236
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_elasticsearch_exporter_targets is defined %}
|
||||||
|
# Elasticsearch #
|
||||||
|
- job_name: elasticsearch
|
||||||
|
scrape_interval: 30s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_elasticsearch_exporter_targets %}
|
||||||
|
- {{ target }}:9114
|
||||||
|
{% endfor %}
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):9114'
|
||||||
|
replacement: '${1}'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_rabbitmq_exporter_targets is defined %}
|
||||||
|
# Rabbitmq #
|
||||||
|
- job_name: rabbitmq
|
||||||
|
scrape_interval: 15s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_rabbitmq_exporter_targets %}
|
||||||
|
- {{ target }}:15692
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
@ -7,8 +7,8 @@ After=docker.service
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
WorkingDirectory=/opt/docker-compose/{{ exporter }}
|
WorkingDirectory=/opt/docker-compose/{{ exporter }}
|
||||||
ExecStart=/usr/bin/docker-compose up -d
|
ExecStart=/usr/bin/{{ docker_compose_bin }} up -d
|
||||||
ExecStop=/usr/bin/docker-compose down
|
ExecStop=/usr/bin/{{ docker_compose_bin }} down
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Prometheus Elasticsearch Exporter
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/local/bin/prometheus-elasticsearch-exporter {% if prometheus_elasticsearch_user is defined %}--es.uri="http://{{ prometheus_elasticsearch_user }}:{{ prometheus_elasticsearch_password }}@localhost:9200"{% endif %}
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -4,7 +4,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/local/bin/prometheus-mongodb-exporter --compatible-mode
|
ExecStart=/usr/local/bin/prometheus-mongodb-exporter --compatible-mode --collect-all
|
||||||
EnvironmentFile=/etc/default/prometheus-mongodb-exporter
|
EnvironmentFile=/etc/default/prometheus-mongodb-exporter
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
12
templates/systemd/prometheus-nginx-exporter.service.j2
Normal file
12
templates/systemd/prometheus-nginx-exporter.service.j2
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Prometheus Nginx Exporter
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/local/bin/prometheus-nginx-exporter \
|
||||||
|
-nginx.scrape-uri {{ prometheus_nginx_scrape_uri | default("http://localhost/stub_status") }} \
|
||||||
|
-web.listen-address=0.0.0.0:9113
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -5,7 +5,6 @@ Wants=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
ExecStart=/usr/local/bin/pve_exporter /etc/default/prometheus-proxmox-exporter {{ prometheus_proxmox_exporter_port | default('9221') }} {{ prometheus_proxmox_exporter_node }}
|
ExecStart="{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"/bin/pve_exporter --config.file /etc/default/prometheus-proxmox-exporter --web.listen-address {{ prometheus_proxmox_exporter_node }}:{{ prometheus_proxmox_exporter_port | default('9221') }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Reference in New Issue
Block a user