Compare commits
120 Commits
2c76251533
...
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 | |||
e3be1c620e | |||
5ce892d438 | |||
269367e67a | |||
80b874f6c7 | |||
88b16fae69 | |||
174b541cd5 | |||
b4c5bd0d54 | |||
58e265e165 | |||
b49d299578 |
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 :
|
||||
- installs prometheus server inside a Docker container
|
||||
- installs various prometheus exporter
|
||||
- Installs Prometheus server inside a docker container.
|
||||
- Installs various Prometheus exporter.
|
||||
- node
|
||||
- blackbox
|
||||
- apache
|
||||
@ -15,6 +15,12 @@ The present role :
|
||||
- mysql
|
||||
- postgres
|
||||
- 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.
|
||||
- https://docs.docker.com/config/daemon/prometheus/
|
||||
@ -24,6 +30,7 @@ The role has been successfully tested on :
|
||||
- Debian 9
|
||||
- Debian 10
|
||||
- Debian 11
|
||||
- Debian 12
|
||||
|
||||
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
|
||||
--------------
|
||||
|
||||
| Variable | Type | Choices | Default | Comment |
|
||||
|----------------------------------------------|---------|------------------------------------------------------------------------------------|-------------------------|-----------------|
|
||||
| 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 | | | |
|
||||
- [Variables](docs/variables.md)
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
@ -114,7 +94,7 @@ TODO
|
||||
License
|
||||
-------
|
||||
|
||||
GPLv3
|
||||
MIT
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
docker_compose_directory: "/opt/docker-compose"
|
||||
docker_compose_bin: "docker compose"
|
||||
|
||||
prometheus_docker_network: prometheus
|
||||
|
||||
@ -17,12 +18,18 @@ prometheus_repo_blackbox: prometheus
|
||||
prometheus_repo_memcached: prometheus
|
||||
prometheus_repo_mongodb: percona
|
||||
prometheus_repo_mysqld: prometheus
|
||||
prometheus_repo_nginx: tchivert
|
||||
prometheus_repo_node: prometheus
|
||||
prometheus_repo_opcache: tchivert
|
||||
prometheus_repo_phpfpm: Lusitaniae
|
||||
prometheus_repo_postgres: prometheus-community
|
||||
prometheus_repo_redis: oliver006
|
||||
prometheus_repo_varnish: jonnenauha
|
||||
prometheus_repo_redis: 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
|
||||
prometheus_nodes_ip:
|
||||
@ -38,6 +45,8 @@ prometheus_server_scrape_interval: 5
|
||||
prometheus_server_scrape_timeout: 5
|
||||
prometheus_server_version: "latest"
|
||||
|
||||
prometheus_use_victoriametrics: false
|
||||
|
||||
## exporter
|
||||
prometheus_exporter_packages: []
|
||||
|
||||
@ -61,6 +70,25 @@ prometheus_postgres_exporter_user: "postgres"
|
||||
prometheus_postgres_exporter_password: "changeme_"
|
||||
prometheus_postgres_exporter_port: 5432
|
||||
|
||||
prometheus_proxmox_venv_path: "/opt/venv/prometheus-pve-exporter"
|
||||
|
||||
prometheus_redis_exporter_addr: "redis://localhost:6379"
|
||||
prometheus_redis_exporter_user: ""
|
||||
prometheus_redis_exporter_password: ""
|
||||
|
||||
## grafana
|
||||
|
||||
grafana_auth_anonymous_enabled: false
|
||||
grafana_auth_anonymous_org_role: Viewer
|
||||
grafana_auth_anonymous_org_name: 'Main Org.'
|
||||
grafana_auth_disable_login_form: false
|
||||
grafana_editors_can_admin: false
|
||||
grafana_users_viewers_can_edit: false
|
||||
grafana_log_level: error
|
||||
grafana_router_logging: false
|
||||
grafana_disable_sanitize_html: true
|
||||
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 |
|
834
files/dashboards/apache.json
Normal file
834
files/dashboards/apache.json
Normal file
@ -0,0 +1,834 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 7,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"decimals": 1,
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"match": "null",
|
||||
"result": {
|
||||
"text": "N/A"
|
||||
}
|
||||
},
|
||||
"type": "special"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 8,
|
||||
"links": [],
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"colorMode": "none",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "avg(apache_uptime_seconds_total{instance=~\"$host\"})",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"title": "Uptime",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"decimals": 0,
|
||||
"fill": 7,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 20,
|
||||
"x": 4,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 5,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": true,
|
||||
"max": true,
|
||||
"min": true,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 3,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Apache Down",
|
||||
"color": "#BF1B00"
|
||||
},
|
||||
{
|
||||
"alias": "Apache Down",
|
||||
"transform": "negative-Y"
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "count(apache_up{instance=~\"$host\"} == 1)",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "Apache Up",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 240
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "scalar(count(apache_up{instance=~\"$host\"} == 0))",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "Apache Down",
|
||||
"range": true,
|
||||
"refId": "B",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Apache Up / Down",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": "1",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": false
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "deckbytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 3
|
||||
},
|
||||
"id": 3,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull",
|
||||
"max",
|
||||
"min"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.4.0-90231pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(apache_sent_kilobytes_total{instance=~\"$host\"}[$__rate_interval])",
|
||||
"format": "time_series",
|
||||
"hide": false,
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{instance}}",
|
||||
"range": true,
|
||||
"refId": "B",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"title": "Current total kbytes sent",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 3
|
||||
},
|
||||
"id": 1,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull",
|
||||
"max",
|
||||
"min"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.4.0-98030pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(apache_accesses_total{instance=~\"$host\"}[$__rate_interval])",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{instance}}",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"title": "Current total apache accesses",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
},
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull",
|
||||
"max",
|
||||
"min"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.4.0-90231pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(apache_scoreboard{instance=~\"$host\"}) by (state)",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ state }}",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"title": "Apache scoreboard statuses",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 23
|
||||
},
|
||||
"id": 7,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull",
|
||||
"max",
|
||||
"min"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.4.0-90231pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(apache_workers{instance=~\"$host\"}) by (state)\n",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ state }}",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"title": "Apache worker statuses",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"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",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 23
|
||||
},
|
||||
"id": 4,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull",
|
||||
"max",
|
||||
"min"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.4.0-90231pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "apache_cpuload{instance=~\"$host\"}",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "Load on {{instance}}",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 240
|
||||
}
|
||||
],
|
||||
"title": "Apache CPU load",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"apache"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": [
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv3"
|
||||
],
|
||||
"value": [
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv3"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Host",
|
||||
"multi": true,
|
||||
"name": "host",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(apache_up, instance)",
|
||||
"refId": "prometheus-host-Variable-Query"
|
||||
},
|
||||
"refresh": 2,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"tagValuesQuery": "",
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"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": "Apache",
|
||||
"uid": "Cl51dzxnz",
|
||||
"version": 15,
|
||||
"weekStart": ""
|
||||
}
|
2574
files/dashboards/cloudflare.json
Normal file
2574
files/dashboards/cloudflare.json
Normal file
File diff suppressed because it is too large
Load Diff
13
files/dashboards/dashboard.yaml
Normal file
13
files/dashboards/dashboard.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: 'Dashboards'
|
||||
orgId: 1
|
||||
folder: ''
|
||||
folderUid: ''
|
||||
type: file
|
||||
disableDeletion: false
|
||||
editable: true
|
||||
updateIntervalSeconds: 10
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards
|
1083
files/dashboards/docker.json
Normal file
1083
files/dashboards/docker.json
Normal file
File diff suppressed because it is too large
Load Diff
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": ""
|
||||
}
|
6455
files/dashboards/haproxy.json
Normal file
6455
files/dashboards/haproxy.json
Normal file
File diff suppressed because it is too large
Load Diff
2801
files/dashboards/kong.json
Normal file
2801
files/dashboards/kong.json
Normal file
File diff suppressed because it is too large
Load Diff
924
files/dashboards/memcached.json
Normal file
924
files/dashboards/memcached.json
Normal file
@ -0,0 +1,924 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"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": "Prometheus dashboard for memcached servers",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"gnetId": 37,
|
||||
"graphTooltip": 0,
|
||||
"id": 10,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum (memcached_commands_total{instance=~\"$host\", status=\"miss\"}) / sum (memcached_commands_total{instance=~\"$host\"}) ",
|
||||
"hide": false,
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "hit ratio",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "% Hit ratio",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "percentunit",
|
||||
"logBase": 1,
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"172.17.0.1:9150": "#0A437C"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum (memcached_current_connections{instance=~\"$host\"}) by (instance)",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{instance}}",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Connections",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"ratio": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum (memcached_commands_total{instance=~\"$host\", command=\"set\"}) / sum (memcached_commands_total{instance=~\"$host\", command=\"get\"})",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "ratio",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Get / Set ratio",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "percentunit",
|
||||
"logBase": 1,
|
||||
"max": 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": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum (memcached_commands_total{instance=~\"$host\"}) by (command)",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{command}}",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Commands",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"evicts": "#890F02",
|
||||
"memcached_items_evicted_total{instance=\"172.17.0.1:9150\",job=\"prometheus\"}": "#890F02",
|
||||
"reclaims": "#3F6833"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 8,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "reclaims",
|
||||
"yaxis": 2
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(memcached_items_evicted_total{instance=~\"$host\"})",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "evicts",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(memcached_items_reclaimed_total{instance=~\"$host\"})",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "reclaims",
|
||||
"range": true,
|
||||
"refId": "B",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "evicts / reclaims",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 14
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 6,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "{instance=\"172.17.0.1:9150\",job=\"prometheus\"}",
|
||||
"yaxis": 2
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(irate(memcached_read_bytes_total{instance=~\"$host\"}[5m]))",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "read from network",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "irate(memcached_written_bytes_total{instance=~\"$host\"}[10m])",
|
||||
"intervalFactor": 5,
|
||||
"legendFormat": "written to network",
|
||||
"range": true,
|
||||
"refId": "B",
|
||||
"step": 5,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Read / written bytes",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "bytes",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "bytes",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 14
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 7,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(memcached_current_bytes{instance=~\"$host\"}) / sum(memcached_limit_bytes{instance=~\"$host\"})",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "% used memory used",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Total memory usage",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "percentunit",
|
||||
"logBase": 1,
|
||||
"max": 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": "yPhvsDP7k"
|
||||
},
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 14
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 5,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum (memcached_current_items{instance=~\"$host\"})",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "items ",
|
||||
"range": true,
|
||||
"refId": "A",
|
||||
"step": 2,
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Items in cache",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"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": "1m",
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"memcached"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": [
|
||||
"sv1",
|
||||
"sv2"
|
||||
],
|
||||
"value": [
|
||||
"sv1",
|
||||
"sv2"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Host",
|
||||
"multi": true,
|
||||
"name": "host",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(memcached_up, instance)",
|
||||
"refId": "Prometheus-node-Variable-Query"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"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": "browser",
|
||||
"title": "Memcached",
|
||||
"uid": "ZbM_Lid4k",
|
||||
"version": 5,
|
||||
"weekStart": ""
|
||||
}
|
1504
files/dashboards/mongodb.json
Normal file
1504
files/dashboards/mongodb.json
Normal file
File diff suppressed because it is too large
Load Diff
5034
files/dashboards/mysqld.json
Normal file
5034
files/dashboards/mysqld.json
Normal file
File diff suppressed because it is too large
Load Diff
850
files/dashboards/network.json
Normal file
850
files/dashboards/network.json
Normal file
@ -0,0 +1,850 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 1,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
"value": 1000000
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80000000
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "binBps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 5,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"exemplar": false,
|
||||
"expr": "max(rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[1m]))",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Last download rate",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 0
|
||||
},
|
||||
"id": 20,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"exemplar": false,
|
||||
"expr": "sum(increase(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[$__range]))",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Total data downloaded",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
"value": 1000000
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80000000
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "binBps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"id": 11,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"exemplar": false,
|
||||
"expr": "max(rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[1m]))",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Last upload rate",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "yellow",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 0
|
||||
},
|
||||
"id": 24,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"exemplar": false,
|
||||
"expr": "sum(increase(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[$__range]))",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Total data uploaded",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "transmit (-) / receive (+)",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "bars",
|
||||
"fillOpacity": 100,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"links": [],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "light-red",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in下载"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "green",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_out上传"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "yellow",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_in下载"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "purple",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "purple",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out上传"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "blue",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byRegexp",
|
||||
"options": "/.*_transmit$/"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.transform",
|
||||
"value": "negative-Y"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 4
|
||||
},
|
||||
"id": 16,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull",
|
||||
"max",
|
||||
"sum"
|
||||
],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": false
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "increase(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[60m])",
|
||||
"interval": "60m",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "{{device}}_receive",
|
||||
"metric": "",
|
||||
"refId": "A",
|
||||
"step": 600,
|
||||
"target": ""
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "increase(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[60m])",
|
||||
"hide": false,
|
||||
"interval": "60m",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "{{device}}_transmit",
|
||||
"refId": "B",
|
||||
"step": 600
|
||||
}
|
||||
],
|
||||
"title": "Internet traffic per hour",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 11
|
||||
},
|
||||
"id": 7,
|
||||
"panels": [],
|
||||
"repeat": "device",
|
||||
"title": "Network traffic on $device",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds",
|
||||
"seriesBy": "max"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "opacity",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineStyle": {
|
||||
"fill": "solid"
|
||||
},
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
"value": 1000000
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80000000
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "binBps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 12
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[$__rate_interval])",
|
||||
"instant": false,
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{device}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Download $device",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds",
|
||||
"seriesBy": "max"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "opacity",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineStyle": {
|
||||
"fill": "solid"
|
||||
},
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
"value": 1000010
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80000000
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "binBps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 12
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[$__rate_interval])",
|
||||
"instant": false,
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{device}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Upload $device",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"system"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "sv1",
|
||||
"value": "sv1"
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "label_values(node_uname_info{job=\"$job\"}, instance)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Host",
|
||||
"multi": false,
|
||||
"name": "node",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(node_uname_info{job=\"$job\"}, instance)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "node",
|
||||
"value": "node"
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "label_values(node_uname_info, job)",
|
||||
"hide": 2,
|
||||
"includeAll": false,
|
||||
"label": "Job",
|
||||
"multi": false,
|
||||
"name": "job",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(node_uname_info, job)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "label_values(node_network_up{instance=\"$node\",job=\"$job\"}, device)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "Device",
|
||||
"multi": true,
|
||||
"name": "device",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(node_network_up{instance=\"$node\",job=\"$job\"}, device)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "/^(?!br|veth|lo|docker|fw|tap).*/",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-7d",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Network",
|
||||
"uid": "BoCr1WQnz",
|
||||
"version": 5,
|
||||
"weekStart": ""
|
||||
}
|
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": ""
|
||||
}
|
23839
files/dashboards/node-exporter.json
Normal file
23839
files/dashboards/node-exporter.json
Normal file
File diff suppressed because it is too large
Load Diff
785
files/dashboards/opcache.json
Normal file
785
files/dashboards/opcache.json
Normal file
@ -0,0 +1,785 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 14,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"0": {
|
||||
"color": "red",
|
||||
"index": 0,
|
||||
"text": "KO"
|
||||
},
|
||||
"1": {
|
||||
"color": "green",
|
||||
"index": 1,
|
||||
"text": "OK"
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "min(opcache_enabled{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Opcache enabled",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": true,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 10,
|
||||
"x": 4,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(opcache_memory_usage_used_memory{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "used memory",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Cache Size",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": true,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 10,
|
||||
"x": 14,
|
||||
"y": 0
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(opcache_statistics_hits{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "hits",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(opcache_statistics_misses{job=\"opcache\", instance=~\"$host\"})",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "misses",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"title": "Hits/Misses",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"0": {
|
||||
"color": "green",
|
||||
"index": 1,
|
||||
"text": "OK"
|
||||
},
|
||||
"1": {
|
||||
"color": "red",
|
||||
"index": 0,
|
||||
"text": "KO"
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 3
|
||||
},
|
||||
"id": 13,
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "min(opcache_cache_full{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Cache full",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 6
|
||||
},
|
||||
"id": 14,
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "avg(opcache_memory_usage_wasted_memory{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Memory wasted",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "red",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 40
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "avg(opcache_statistics_hit_rate{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Hit rate",
|
||||
"type": "gauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": true,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 10,
|
||||
"x": 4,
|
||||
"y": 9
|
||||
},
|
||||
"id": 12,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(opcache_statistics_num_cached_scripts{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "cached scripts",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Cached scripts",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": true,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "normal"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 10,
|
||||
"x": 14,
|
||||
"y": 9
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(opcache_statistics_num_cached_keys{job=\"opcache\", instance=~\"$host\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "cached keys",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Cached keys",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"php-fpm",
|
||||
"opcache"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": [
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv3"
|
||||
],
|
||||
"value": [
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv3"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "label_values(opcache_exporter_build_info{job=\"opcache\"}, instance)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Host",
|
||||
"multi": true,
|
||||
"name": "host",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(opcache_exporter_build_info{job=\"opcache\"}, instance)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 2,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Opcache",
|
||||
"uid": "suDqlaAnk",
|
||||
"version": 8,
|
||||
"weekStart": ""
|
||||
}
|
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
1055
files/dashboards/overview.json
Normal file
1055
files/dashboards/overview.json
Normal file
File diff suppressed because it is too large
Load Diff
958
files/dashboards/phpfpm.json
Normal file
958
files/dashboards/phpfpm.json
Normal file
@ -0,0 +1,958 @@
|
||||
{
|
||||
"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": "PHP-FPM aggregated data for multiple pools.",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"gnetId": 5714,
|
||||
"graphTooltip": 1,
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"0": {
|
||||
"color": "red",
|
||||
"index": 0,
|
||||
"text": "KO"
|
||||
},
|
||||
"1": {
|
||||
"color": "green",
|
||||
"index": 1,
|
||||
"text": "OK"
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 3,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 23,
|
||||
"links": [],
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.4.0-102000pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "min(php_fpm_up{instance=~\"^$host\", socket_path=~\"$pool\"})",
|
||||
"format": "time_series",
|
||||
"interval": "",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "{{socket_path}}",
|
||||
"metric": "php_fpm_start_time_seconds",
|
||||
"refId": "A",
|
||||
"step": 1
|
||||
}
|
||||
],
|
||||
"title": "Status",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percentunit"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 21,
|
||||
"x": 3,
|
||||
"y": 0
|
||||
},
|
||||
"id": 22,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum by (socket_path) (php_fpm_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"}) / sum by (socket_path) ( php_fpm_max_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"})",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "{{ socket_path }}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Pool Usage",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"description": "Total number of accepted connections",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 5
|
||||
},
|
||||
"id": 1,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum by (socket_path) (rate(php_fpm_accepted_connections_total{instance=~\"^$host\", socket_path=~\"$pool\"} [$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{socket_path}}",
|
||||
"refId": "A",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"title": "Accepted Connections Rate",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"description": "Number of requests that exceed request_slowlog_timeout",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"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",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 12
|
||||
},
|
||||
"id": 8,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum by (socket_path) (rate(php_fpm_slow_requests{instance=~\"^$host\", socket_path=~\"$pool\"} [$__rate_interval]))",
|
||||
"format": "time_series",
|
||||
"instant": false,
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ socket_path }} ",
|
||||
"refId": "A",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"title": "Slow Requests Rate",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 19
|
||||
},
|
||||
"id": 18,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum(php_fpm_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"}) by (socket_path )",
|
||||
"format": "time_series",
|
||||
"instant": false,
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ socket_path }} ",
|
||||
"metric": "php_fpm_active_processes",
|
||||
"refId": "B",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"title": "Active processes",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 27
|
||||
},
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum by (socket_path) (php_fpm_max_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"})",
|
||||
"format": "time_series",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ socket_path }} ",
|
||||
"refId": "A",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"title": "Max active processes",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 35
|
||||
},
|
||||
"id": 20,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum by (socket_path) (php_fpm_max_children_reached{instance=~\"^$host\", socket_path=~\"$pool\"})",
|
||||
"format": "time_series",
|
||||
"hide": false,
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ socket_path }} ",
|
||||
"metric": "php_fpm_max_children_reached",
|
||||
"refId": "D",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"title": "Max children reached",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 43
|
||||
},
|
||||
"id": 19,
|
||||
"links": [],
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true,
|
||||
"sortBy": "Mean",
|
||||
"sortDesc": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-beta2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"expr": "sum by (socket_path) (php_fpm_idle_processes{instance=~\"^$host\", socket_path=~\"$pool\"})",
|
||||
"format": "time_series",
|
||||
"interval": "",
|
||||
"intervalFactor": 2,
|
||||
"legendFormat": "{{ socket_path }} ",
|
||||
"metric": "php_fpm_idle_processes",
|
||||
"refId": "C",
|
||||
"step": 2
|
||||
}
|
||||
],
|
||||
"title": "Idle processes",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"php-fpm"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"allFormat": "glob",
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": [
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv2",
|
||||
"sv3"
|
||||
],
|
||||
"value": [
|
||||
"sv1",
|
||||
"sv2",
|
||||
"sv2",
|
||||
"sv3"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Host",
|
||||
"multi": true,
|
||||
"name": "host",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(php_fpm_accepted_connections_total, instance)",
|
||||
"refId": "prometheus-Host-Variable-Query"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"tagValuesQuery": "",
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "yPhvsDP7k"
|
||||
},
|
||||
"definition": "label_values(php_fpm_accepted_connections_total{instance=~\"$host\"}, socket_path)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "Pool",
|
||||
"multi": true,
|
||||
"name": "pool",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(php_fpm_accepted_connections_total{instance=~\"$host\"}, socket_path)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"tagValuesQuery": "",
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"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": "browser",
|
||||
"title": "PHP-FPM",
|
||||
"uid": "D6TvmAZik",
|
||||
"version": 7,
|
||||
"weekStart": ""
|
||||
}
|
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
2056
files/dashboards/plateform-overview.json
Normal file
2056
files/dashboards/plateform-overview.json
Normal file
File diff suppressed because it is too large
Load Diff
1143
files/dashboards/postgresql.json
Normal file
1143
files/dashboards/postgresql.json
Normal file
File diff suppressed because it is too large
Load Diff
1352
files/dashboards/proxmox.json
Normal file
1352
files/dashboards/proxmox.json
Normal file
File diff suppressed because it is too large
Load Diff
8389
files/dashboards/rabbitmq.json
Normal file
8389
files/dashboards/rabbitmq.json
Normal file
File diff suppressed because it is too large
Load Diff
1429
files/dashboards/redis.json
Normal file
1429
files/dashboards/redis.json
Normal file
File diff suppressed because it is too large
Load Diff
1737
files/dashboards/varnish.json
Normal file
1737
files/dashboards/varnish.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,97 +1,112 @@
|
||||
---
|
||||
- name: 'prometheus | server | restart container'
|
||||
docker_container:
|
||||
name: prometheus
|
||||
restart: yes
|
||||
tags: ['prometheus']
|
||||
- name: 'grafana-prometheus-restart'
|
||||
systemd:
|
||||
name: docker-compose@grafana-prometheus.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['grafana-prometheus']
|
||||
|
||||
- name: 'prometheus | node exporter | restart service'
|
||||
- name: 'node-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-node-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | mysqld exporter | restart service'
|
||||
- name: 'mysqld-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-mysqld-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | mongodb exporter | restart service'
|
||||
- name: 'mongodb-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-mongodb-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | postgres exporter restart service'
|
||||
- name: 'postgres-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-postgres-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | phpfpm exporter | restart service'
|
||||
- name: 'phpfpm-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-phpfpm-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | opcache exporter | restart service'
|
||||
- name: 'opcache-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-opcache-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | apache exporter | restart service'
|
||||
- name: 'apache-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-apache-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | varnish exporter | restart service'
|
||||
- name: 'varnish-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-varnish-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | blackbox exporter | restart service'
|
||||
- name: 'blackbox-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-blackbox-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | redis exporter | restart service'
|
||||
- name: 'redis-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-redis-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | memcached exporter | restart service'
|
||||
- name: 'memcached-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-memcached-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | cloudflare exporter | restart service'
|
||||
- name: 'cloudflare-exporter-restart'
|
||||
systemd:
|
||||
name: docker-compose@cloudflare.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: ['prometheus']
|
||||
|
||||
- name: 'prometheus | proxmox exporter | restart service'
|
||||
- name: 'proxmox-exporter-restart'
|
||||
systemd:
|
||||
name: prometheus-proxmox-exporter.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
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
|
||||
description: Install and configure Prometheus and exporters
|
||||
company: brainsys
|
||||
license: GPLv3
|
||||
license: MIT
|
||||
min_ansible_version: 2.8
|
||||
issue_tracker_url: https://github.com/ludal13/ansible-role-prometheus/issues
|
||||
github_branch: master
|
||||
issue_tracker_url: https://git.brainsys.io/ansible-roles/prometheus/issues
|
||||
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
|
||||
with_items:
|
||||
- docker
|
||||
- docker-compose
|
||||
- docker-compose-plugin
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- name: '{{ exporter }} exporter | create docker-compose directory'
|
||||
@ -26,7 +26,7 @@
|
||||
group: root
|
||||
mode: 0644
|
||||
notify:
|
||||
- 'prometheus | {{ exporter }} exporter | restart service'
|
||||
- '{{ exporter }}-exporter-restart'
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- name: '{{ exporter }} exporter | systemd | install unit file'
|
||||
@ -37,7 +37,7 @@
|
||||
group: root
|
||||
mode: 0600
|
||||
notify:
|
||||
- 'prometheus | {{ exporter }} exporter | restart service'
|
||||
- '{{ exporter }}-exporter-restart'
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- name: '{{ exporter }} exporter | systemd | enable service'
|
@ -4,51 +4,23 @@
|
||||
- set_fact:
|
||||
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'
|
||||
file:
|
||||
state: directory
|
||||
path: /tmp/prometheus_exporter/{{ exporter }}
|
||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- 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//"
|
||||
args:
|
||||
warn: false
|
||||
register: prometheus_exporter_latest_version
|
||||
run_once: true
|
||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- name: '{{ exporter }} exporter | download'
|
||||
- name: '{{ exporter }} exporter | download from origin'
|
||||
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"
|
||||
dest: /tmp/prometheus_exporter/{{ exporter }}/
|
||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- name: '{{ exporter }} exporter | unarchive'
|
||||
@ -56,7 +28,7 @@
|
||||
remote_src: yes
|
||||
src: /tmp/prometheus_exporter/{{ exporter }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz
|
||||
dest: /tmp/prometheus_exporter/{{ exporter }}/
|
||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
|
||||
- name: '{{ exporter }} exporter | move to /usr/local/bin'
|
||||
@ -68,32 +40,11 @@
|
||||
group: root
|
||||
mode: 0755
|
||||
notify:
|
||||
- 'prometheus | {{ exporter }} exporter | restart service'
|
||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
- '{{ exporter }}-exporter-restart'
|
||||
tags: [ 'prometheus_{{ exporter }}' ]
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
|
||||
- name: '{{ exporter }} exporter | cleanup temp path'
|
||||
file:
|
||||
state: absent
|
||||
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:
|
||||
- 'prometheus | {{ exporter }} exporter | restart service'
|
||||
when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
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']
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_blackbox_exporter']
|
||||
|
||||
- name: 'blackbox exporter | configuration'
|
||||
@ -11,5 +11,5 @@
|
||||
mode: 0600
|
||||
register: prometheus_blackbox_exporter_configuration
|
||||
notify:
|
||||
- 'prometheus | blackbox exporter | restart service'
|
||||
- 'blackbox-exporter-restart'
|
||||
tags: ['prometheus_blackbox_exporter']
|
@ -3,7 +3,8 @@
|
||||
assert:
|
||||
that:
|
||||
- cloudflare_api_key is defined
|
||||
- cloudflare_api_email is defined
|
||||
tags: ['prometheus_cloudflare']
|
||||
|
||||
- include_tasks: _docker.yml
|
||||
- include_tasks: ../docker.yml
|
||||
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']
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_mongodb_exporter']
|
||||
|
||||
- name: 'mongodb exporter < v0.2 | move to /usr/local/bin'
|
||||
@ -11,7 +11,7 @@
|
||||
group: root
|
||||
mode: 0755
|
||||
notify:
|
||||
- 'prometheus | mongodb exporter | restart service'
|
||||
- 'mongodb-exporter-restart'
|
||||
when:
|
||||
- prometheus_mongodb_exporter_latest_version.stdout < '0.2'
|
||||
tags: ['prometheus_mongodb_exporter']
|
||||
@ -24,5 +24,5 @@
|
||||
group: root
|
||||
mode: 0600
|
||||
notify:
|
||||
- 'prometheus | mongodb exporter | restart service'
|
||||
- 'mongodb-exporter-restart'
|
||||
tags: ['prometheus_mongodb_exporter']
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_mysqld_exporter']
|
||||
|
||||
- name: 'mysqld exporter | configuration'
|
||||
@ -13,5 +13,5 @@
|
||||
- prometheus_mysqld_exporter_user is defined
|
||||
register: prometheus_mysqld_exporter_configuration
|
||||
notify:
|
||||
- 'prometheus | mysqld exporter | restart service'
|
||||
- 'mysqld-exporter-restart'
|
||||
tags: ['prometheus_mysqld_exporter']
|
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']
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_opcache_exporter']
|
||||
|
||||
- name: 'opcache exporter | configuration'
|
||||
@ -11,5 +11,5 @@
|
||||
mode: 0600
|
||||
register: prometheus_opcache_exporter_configuration
|
||||
notify:
|
||||
- 'prometheus | opcache exporter | restart service'
|
||||
- 'opcache-exporter-restart'
|
||||
tags: ['prometheus_opcache_exporter']
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_phpfpm_exporter']
|
||||
|
||||
- name: 'phpfpm exporter | install startup script'
|
||||
@ -10,5 +10,5 @@
|
||||
group: root
|
||||
mode: 0600
|
||||
notify:
|
||||
- 'prometheus | phpfpm exporter | restart service'
|
||||
- 'phpfpm-exporter-restart'
|
||||
tags: ['prometheus_phpfpm_exporter']
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_postgres_exporter']
|
||||
|
||||
- name: 'postgres exporter | configuration'
|
||||
@ -11,5 +11,5 @@
|
||||
mode: 0600
|
||||
register: prometheus_postgres_exporter_configuration
|
||||
notify:
|
||||
- 'prometheus | postgres exporter | restart service'
|
||||
- 'postgres-exporter-restart'
|
||||
tags: ['prometheus_postgres_exporter']
|
@ -7,11 +7,22 @@
|
||||
- prometheus_proxmox_exporter_node is defined
|
||||
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:
|
||||
name:
|
||||
- prometheus-pve-exporter
|
||||
executable: pip3
|
||||
virtualenv: "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||
tags: ['prometheus_proxmox']
|
||||
|
||||
- name: 'proxmox exporter | configuration'
|
||||
@ -23,7 +34,7 @@
|
||||
mode: 0600
|
||||
register: prometheus_proxmox_exporter_configuration
|
||||
notify:
|
||||
- 'prometheus | proxmox exporter | restart service'
|
||||
- 'proxmox-exporter-restart'
|
||||
tags: ['prometheus_proxmox']
|
||||
|
||||
- name: 'proxmox exporter | systemd | copy unit file'
|
||||
@ -34,7 +45,7 @@
|
||||
group: root
|
||||
mode: 0600
|
||||
notify:
|
||||
- 'prometheus | proxmox exporter | restart service'
|
||||
- 'proxmox-exporter-restart'
|
||||
#when: not stat_result.stat.exists or exporter_upgrade == "yes"
|
||||
tags: ['prometheus_proxmox']
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_redis_exporter']
|
||||
|
||||
- name: 'redis exporter | configuration'
|
||||
@ -11,5 +11,5 @@
|
||||
mode: 0600
|
||||
register: prometheus_redis_exporter_configuration
|
||||
notify:
|
||||
- 'prometheus | redis exporter | restart service'
|
||||
- 'redis-exporter-restart'
|
||||
tags: ['prometheus_redis_exporter']
|
@ -1,3 +1,3 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
- include_tasks: ../common.yml
|
||||
tags: ['prometheus_varnish_exporter']
|
@ -7,19 +7,28 @@
|
||||
|
||||
## prometheus server install
|
||||
- name: 'server install'
|
||||
include_tasks: 'server/prometheus.yml'
|
||||
include_tasks: "server/{{ item }}"
|
||||
loop:
|
||||
- grafana-prometheus.yml
|
||||
- grafana-provisioning.yml
|
||||
when:
|
||||
- prometheus_server_enable == "true"
|
||||
tags:
|
||||
- prometheus
|
||||
- prometheus_server
|
||||
- grafana
|
||||
- grafana_server
|
||||
- grafana_prometheus
|
||||
|
||||
## include exporter install
|
||||
- name: 'exporters install'
|
||||
vars:
|
||||
exporter: "{{ item }}"
|
||||
include_tasks: "exporter/{{ item }}.yml"
|
||||
include_tasks: "exporter/services/{{ item }}.yml"
|
||||
tags:
|
||||
- prometheus_node_exporter
|
||||
- prometheus_mysqld_exporter
|
||||
- prometheus_postgresql_exporter
|
||||
- prometheus_postgres_exporter
|
||||
- prometheus_mongodb_exporter
|
||||
- prometheus_apache_exporter
|
||||
- prometheus_haproxy_exporter
|
||||
@ -30,5 +39,6 @@
|
||||
- prometheus_opcache_exporter
|
||||
- prometheus_blackbox_exporter
|
||||
- prometheus_kong_exporter
|
||||
- prometheus_nginx_exporter
|
||||
with_items:
|
||||
- "{{ prometheus_exporter_packages }}"
|
||||
|
75
tasks/server/grafana-prometheus.yml
Normal file
75
tasks/server/grafana-prometheus.yml
Normal file
@ -0,0 +1,75 @@
|
||||
---
|
||||
- name: 'prometheus | server | assert | check mandatory vars are defined'
|
||||
assert:
|
||||
that:
|
||||
- "prometheus_server_monitor is defined"
|
||||
|
||||
- name: 'prometheus | server | create prometheus directory to /etc'
|
||||
file:
|
||||
path: /etc/prometheus
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: 'prometheus | server | copy config prometheus yml'
|
||||
template:
|
||||
src: conf/prometheus.yml.j2
|
||||
dest: /etc/prometheus/prometheus.yml
|
||||
owner: root
|
||||
group: root
|
||||
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:
|
||||
- 'grafana-prometheus-restart'
|
||||
|
||||
- name: "grafana-prometheus | create docker-compose directory"
|
||||
file:
|
||||
path: /opt/docker-compose/grafana-prometheus
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: "grafana-prometheus | copy docker-compose file"
|
||||
template:
|
||||
src: compose/grafana-prometheus.yml.j2
|
||||
dest: /opt/docker-compose/grafana-prometheus/docker-compose.yml
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | create grafana.ini file"
|
||||
template:
|
||||
src: conf/grafana.ini.j2
|
||||
dest: /opt/docker-compose/grafana-prometheus/grafana.ini
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
notify: "grafana-prometheus-restart"
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
|
||||
- name: "grafana-prometheus | install unit file to systemd"
|
||||
vars:
|
||||
exporter: "grafana-prometheus"
|
||||
template:
|
||||
src: systemd/docker-compose.service.j2
|
||||
dest: /etc/systemd/system/docker-compose@grafana-prometheus.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
|
||||
- name: "grafana-prometheus | enable service"
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
name: docker-compose@grafana-prometheus
|
||||
enabled: true
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
314
tasks/server/grafana-provisioning.yml
Normal file
314
tasks/server/grafana-provisioning.yml
Normal file
@ -0,0 +1,314 @@
|
||||
- name: "grafana-prometheus | import grafana provisioned datasources"
|
||||
synchronize:
|
||||
src: "{{ grafana_provisioned_datasources_path }}"
|
||||
dest: /opt/docker-compose/grafana-prometheus/
|
||||
when: grafana_provisioned_datasources_path is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana provisioned dashboards"
|
||||
synchronize:
|
||||
src: "{{ grafana_provisioned_dashboards_path }}"
|
||||
dest: /opt/docker-compose/grafana-prometheus/
|
||||
when: grafana_provisioned_datasources_path is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | create grafana provisioning directories"
|
||||
file:
|
||||
path: "/opt/docker-compose/grafana-prometheus/{{ item }}"
|
||||
state: directory
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0755'
|
||||
loop:
|
||||
- datasources
|
||||
- dashboards
|
||||
when: grafana_provisioned_datasources_path is not defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana provisioned datasources conf"
|
||||
template:
|
||||
src: conf/datasources.yaml.j2
|
||||
dest: /opt/docker-compose/grafana-prometheus/datasources/datasources.yaml
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
#when: grafana_provisioned_datasources_path is not defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana provisioned dashboards conf"
|
||||
copy:
|
||||
src: dashboards/dashboard.yaml
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/dashboard.yaml
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: grafana_provisioned_dashboards_path is not defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana apache dashboard"
|
||||
copy:
|
||||
src: dashboards/apache.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/apache.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_apache_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana cloudflare dashboard"
|
||||
copy:
|
||||
src: dashboards/cloudflare.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/cloudflare.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_cloudflare_exporter_targets is defined
|
||||
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_docker_exporter_targets is defined
|
||||
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"
|
||||
copy:
|
||||
src: dashboards/haproxy.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/haproxy.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_haproxy_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana memcached dashboard"
|
||||
copy:
|
||||
src: dashboards/memcached.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/memcached.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_memcached_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana mysqld dashboard"
|
||||
copy:
|
||||
src: dashboards/mysqld.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/mysqld.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_mysqld_exporter_targets is defined
|
||||
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"
|
||||
copy:
|
||||
src: dashboards/network.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/network.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_node_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana node-exporter dashboard"
|
||||
copy:
|
||||
src: dashboards/node-exporter.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/node-exporter.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_node_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana opcache dashboard"
|
||||
copy:
|
||||
src: dashboards/opcache.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/opcache.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_opcache_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana overview dashboard"
|
||||
copy:
|
||||
src: dashboards/overview.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 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"
|
||||
|
||||
- name: "grafana-prometheus | import grafana plateform-overview dashboard"
|
||||
copy:
|
||||
src: dashboards/plateform-overview.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 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"
|
||||
|
||||
- name: "grafana-prometheus | import grafana phpfpm dashboard"
|
||||
copy:
|
||||
src: dashboards/phpfpm.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/phpfpm.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_phpfpm_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana proxmox dashboard"
|
||||
copy:
|
||||
src: dashboards/proxmox.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/proxmox.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_proxmox_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana redis dashboard"
|
||||
copy:
|
||||
src: dashboards/redis.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/redis.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_redis_exporter_targets is defined
|
||||
notify: "grafana-prometheus-restart"
|
||||
|
||||
- name: "grafana-prometheus | import grafana varnish dashboard"
|
||||
copy:
|
||||
src: dashboards/varnish.json
|
||||
dest: /opt/docker-compose/grafana-prometheus/dashboards/varnish.json
|
||||
owner: '1000'
|
||||
group: '1000'
|
||||
mode: '0750'
|
||||
when: prometheus_varnish_exporter_targets is defined
|
||||
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"
|
@ -1,64 +0,0 @@
|
||||
---
|
||||
- name: 'prometheus | server | assert | check mandatory vars are defined'
|
||||
assert:
|
||||
that:
|
||||
- "prometheus_server_monitor is defined"
|
||||
tags: ['prometheus_server']
|
||||
|
||||
- name: 'prometheus | server | create docker network'
|
||||
docker_network:
|
||||
name: '{{ prometheus_docker_network }}'
|
||||
tags: ['prometheus_server']
|
||||
|
||||
- name: 'prometheus | server | create docker volume data'
|
||||
docker_volume:
|
||||
name: prometheus_data
|
||||
register: register_docker_volume_prometheus__prometheus_data
|
||||
tags: ['prometheus_server']
|
||||
|
||||
- name: 'prometheus | server | create prometheus directory to /etc'
|
||||
file:
|
||||
path: /etc/prometheus
|
||||
state: directory
|
||||
mode: '0755'
|
||||
tags: ['prometheus_server']
|
||||
|
||||
- name: 'prometheus | server | copy config prometheus yml'
|
||||
template:
|
||||
src: conf/prometheus.yml.j2
|
||||
dest: /etc/prometheus/prometheus.yml
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
tags: ['prometheus_server']
|
||||
notify:
|
||||
- 'prometheus | server | restart container'
|
||||
|
||||
- name: 'prometheus | server | deploy container'
|
||||
docker_container:
|
||||
name: prometheus
|
||||
hostname: '{{ inventory_hostname }}'
|
||||
image: prom/prometheus:{{ prometheus_server_version }}
|
||||
volumes:
|
||||
- /etc/prometheus/:/etc/prometheus/
|
||||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--storage.tsdb.retention.time={{ prometheus_retention_time }}'
|
||||
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
||||
- '--web.console.templates=/usr/share/prometheus/consoles'
|
||||
- '--web.enable-admin-api'
|
||||
networks:
|
||||
- name: '{{ prometheus_docker_network }}'
|
||||
ports:
|
||||
- "9090:9090"
|
||||
log_driver: syslog
|
||||
log_options:
|
||||
tag: docker_prometheus
|
||||
restart_policy: 'unless-stopped'
|
||||
pull: '{{ prometheus_docker_pull }}'
|
||||
etc_hosts: '{{ prometheus_nodes_ip }}'
|
||||
tags: ['prometheus_server']
|
||||
notify:
|
||||
- 'prometheus | server | restart container'
|
@ -11,7 +11,12 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CF_API_TOKEN={{ cloudflare_api_key }}
|
||||
- CF_API_EMAIL={{ cloudflare_api_email }}
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: {{ cloudflare_exporter_watchtower_enable | default('true') }}
|
||||
ports:
|
||||
- 8082:8080
|
||||
networks:
|
||||
- {{ prometheus_docker_network }}
|
||||
dns:
|
||||
- "{{ prometheus_cloudflare_dns }}"
|
||||
|
173
templates/compose/grafana-prometheus.yml.j2
Normal file
173
templates/compose/grafana-prometheus.yml.j2
Normal file
@ -0,0 +1,173 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
grafana:
|
||||
{% if grafana_traefik_enable is defined %}
|
||||
traefik:
|
||||
external: true
|
||||
{% endif %}
|
||||
|
||||
volumes:
|
||||
{% if prometheus_use_victoriametrics == false %}
|
||||
prometheus-data:
|
||||
{% else %}
|
||||
victoria-metrics-data:
|
||||
{% endif %}
|
||||
grafana-data:
|
||||
|
||||
services:
|
||||
grafana:
|
||||
image: grafana/grafana:{{ grafana_version | default('latest') }}
|
||||
container_name: grafana
|
||||
user: "1000:1000"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
- ./grafana.ini:/etc/grafana/grafana.ini
|
||||
- ./dashboards:/etc/grafana/provisioning/dashboards/
|
||||
- ./datasources:/etc/grafana/provisioning/datasources/
|
||||
environment:
|
||||
GF_AUTH_ANONYMOUS_ENABLED: "{{ grafana_auth_anonymous_enabled|string|lower }}"
|
||||
GF_AUTH_ANONYMOUS_ORG_ROLE: "{{ grafana_auth_anonymous_org_role }}"
|
||||
GF_AUTH_ANONYMOUS_ORG_NAME: "{{ grafana_auth_anonymous_org_name }}"
|
||||
GF_AUTH_DISABLE_LOGIN_FORM: "{{ grafana_auth_disable_login_form|string|lower }}"
|
||||
GF_AUTH_EDITORS_CAN_ADMIN: "{{ grafana_editors_can_admin|string|lower }}"
|
||||
{% if grafana_admin_password is defined %}
|
||||
GF_SECURITY_ADMIN_PASSWORD: "{{ grafana_admin_password }}"
|
||||
{% endif %}
|
||||
GF_USERS_VIEWERS_CAN_EDIT: "{{ grafana_users_viewers_can_edit|string|lower }}"
|
||||
{% if grafana_admin_password is defined %}
|
||||
GF_ROOT_URL: "{{ grafana_domain }}"
|
||||
{% endif %}
|
||||
GF_LOG_LEVEL: "{{ grafana_log_level|string }}"
|
||||
GF_ROUTER_LOGGING: "{{ grafana_router_logging|string|lower }}"
|
||||
GF_PANELS_DISABLE_SANITIZE_HTML: "{{ grafana_disable_sanitize_html|string|lower }}"
|
||||
{% if grafana_install_plugins is defined %}
|
||||
GF_INSTALL_PLUGINS: "{{ grafana_install_plugins|string|lower }}"
|
||||
{% endif %}
|
||||
{% if grafana_smtp_enabled is defined %}
|
||||
GF_SMTP_ENABLED: "{{ grafana_smtp_enabled|string|lower }}"
|
||||
GF_SMTP_HOST: "{{ grafana_smtp_host|string }}"
|
||||
GF_SMTP_FROM_ADDRESS: "{{ grafana_smtp_from_address|string }}"
|
||||
GF_SMTP_FROM_NAME: "{{ grafana_smtp_from_name|string }}"
|
||||
GF_SMTP_SKIP_VERIFY: "{{ grafana_smtp_skip_verify|string|lower }}"
|
||||
{% else %}
|
||||
GF_SMTP_ENABLED: "false"
|
||||
{% endif %}
|
||||
networks:
|
||||
- grafana
|
||||
{% if grafana_traefik_enable is defined %}
|
||||
- traefik
|
||||
{% endif %}
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: {{ grafana_watchtower_enable | default('true') }}
|
||||
{% if grafana_traefik_enable is defined %}
|
||||
traefik.enable: true
|
||||
traefik.docker.network: traefik
|
||||
traefik.http.routers.grafana.rule: Host(`{{ grafana_domain|default(omit) }}`)
|
||||
traefik.http.routers.grafana.tls: true
|
||||
traefik.http.routers.grafana.tls.certresolver: letsencrypt
|
||||
traefik.http.routers.grafana.entrypoints: "{{ grafana_traefik_entrypoint }}"
|
||||
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 %}
|
||||
ports:
|
||||
- "{{ grafana_port | default(3000) }}:3000"
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_use_victoriametrics == false %}
|
||||
prometheus:
|
||||
container_name: prometheus
|
||||
image: prom/prometheus:{{ grafana_prometheus_version | default('latest') }}
|
||||
volumes:
|
||||
- /etc/prometheus/:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--storage.tsdb.retention.time={{ prometheus_retention_time }}'
|
||||
- '--web.enable-lifecycle'
|
||||
networks:
|
||||
- grafana
|
||||
{% 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: 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 %}
|
||||
ports:
|
||||
- "{{ prometheus_port | default(9090) }}:9090"
|
||||
{% endif %}
|
||||
{% if prometheus_nodes_ip is defined %}
|
||||
extra_hosts:
|
||||
{% for key, value in prometheus_nodes_ip.items() %}
|
||||
- "{{ key }}:{{ value }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
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 %}
|
13
templates/conf/datasources.yaml.j2
Normal file
13
templates/conf/datasources.yaml.j2
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
uid: yPhvsDP7k
|
||||
type: prometheus
|
||||
access: proxy
|
||||
{% if prometheus_use_victoriametrics == false %}
|
||||
url: http://prometheus:9090
|
||||
{% else %}
|
||||
url: http://victoriametrics:8428
|
||||
{% endif %}
|
||||
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 %}
|
@ -46,8 +46,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9100'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_mysqld_exporter_targets is defined %}
|
||||
# mysql exporter #
|
||||
- job_name: mysql
|
||||
@ -74,8 +74,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9104'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_mongodb_exporter_targets is defined %}
|
||||
# mongoDB exporter #
|
||||
- job_name: mongodb
|
||||
@ -97,8 +97,13 @@ scrape_configs:
|
||||
- {{ target }}:9216
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% 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
|
||||
@ -120,8 +125,13 @@ scrape_configs:
|
||||
- {{ target }}:9187
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% 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
|
||||
@ -137,8 +147,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9253'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_opcache_exporter_targets is defined %}
|
||||
# opcache exporter #
|
||||
- job_name: opcache
|
||||
@ -154,8 +164,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9101'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_apache_exporter_targets is defined %}
|
||||
# apache exporter #
|
||||
- job_name: apache
|
||||
@ -171,8 +181,25 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9117'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% 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
|
||||
@ -188,8 +215,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):8404'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_varnish_exporter_targets is defined %}
|
||||
# Varnish exporter #
|
||||
- job_name: varnish
|
||||
@ -205,8 +232,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9131'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_blackbox_exporter is defined %}
|
||||
# blackbox #
|
||||
{% if prometheus_blackbox_exporter_http is defined %}
|
||||
@ -250,8 +277,8 @@ scrape_configs:
|
||||
- target_label: __address__
|
||||
replacement: {{ prometheus_blackbox_exporter_host }}:9115
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_redis_multi_instances_exporter_targets is defined %}
|
||||
# Redis exporter #
|
||||
- job_name: 'redis_exporter_targets'
|
||||
@ -270,8 +297,8 @@ scrape_configs:
|
||||
target_label: __address__
|
||||
regex: 'redis://(.*):63..'
|
||||
replacement: '${1}:9121'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_redis_exporter_targets is defined %}
|
||||
# Redis exporter #
|
||||
- job_name: redis
|
||||
@ -287,8 +314,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9121'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_proxysql_exporter_targets is defined %}
|
||||
# ProxySQL exporter #
|
||||
- job_name: proxysql
|
||||
@ -304,8 +331,8 @@ scrape_configs:
|
||||
regex: '(.*):6070'
|
||||
replacement: '${1}'
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_kong_exporter_targets is defined %}
|
||||
# Kong exporter #
|
||||
- job_name: kong
|
||||
@ -320,8 +347,8 @@ scrape_configs:
|
||||
{% for target in prometheus_kong_exporter_targets %}
|
||||
- {{ target }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_memcached_exporter_targets is defined %}
|
||||
# Memcached exporter #
|
||||
- job_name: memcached
|
||||
@ -337,8 +364,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9150'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_docker_exporter_targets is defined %}
|
||||
# Docker exporter #
|
||||
- job_name: docker
|
||||
@ -354,8 +381,8 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):9323'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if prometheus_cadvisor_exporter_targets is defined %}
|
||||
# cadvisor #
|
||||
- job_name: cadvisor
|
||||
@ -371,7 +398,6 @@ scrape_configs:
|
||||
regex: '(.*):8080'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_cloudflare_exporter_targets is defined %}
|
||||
# cloudflare #
|
||||
- job_name: cloudflare
|
||||
@ -386,15 +412,15 @@ scrape_configs:
|
||||
target_label: instance
|
||||
regex: '(.*):8082'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_pve_exporter_targets is defined %}
|
||||
{% endif %}
|
||||
{% if prometheus_proxmox_exporter_targets is defined %}
|
||||
# proxmox #
|
||||
- job_name: pve
|
||||
scrape_interval: 30s
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for target in prometheus_pve_exporter_targets %}
|
||||
{% for target in prometheus_proxmox_exporter_targets %}
|
||||
- {{ target }}:9221
|
||||
{% endfor %}
|
||||
metrics_path: /pve
|
||||
@ -403,4 +429,95 @@ scrape_configs:
|
||||
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 %}
|
||||
|
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
|
||||
RemainAfterExit=true
|
||||
WorkingDirectory=/opt/docker-compose/{{ exporter }}
|
||||
ExecStart=/usr/bin/docker-compose up -d
|
||||
ExecStop=/usr/bin/docker-compose down
|
||||
ExecStart=/usr/bin/{{ docker_compose_bin }} up -d
|
||||
ExecStop=/usr/bin/{{ docker_compose_bin }} down
|
||||
|
||||
[Install]
|
||||
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]
|
||||
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
|
||||
|
||||
[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]
|
||||
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]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user