Preconfigure Grafana on boot

After running `docker-compose up`, open Grafana via
http://localhost:3000 and login with user admin & password admin. After
logging in, you will see a RabbitMQ Overview dashboard pre-loaded (/・0・)

Thanks @cirocosta! https://github.com/cirocosta/sample-grafana

cc @MarcialRosales

[finishes #164374321]
This commit is contained in:
Gerhard Lazu 2019-04-16 15:43:40 +01:00
parent 5329f9f836
commit 789f6c041e
5 changed files with 1320 additions and 526 deletions

View File

@ -71,3 +71,6 @@ services:
- "rabbitmq-prometheus"
volumes:
- rabbitmq-prometheus_grafana:/var/lib/grafana
- ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/rabbitmq.yaml
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/prometheus.yaml
- ./grafana/dashboards:/dashboards

View File

@ -0,0 +1,10 @@
apiVersion: 1
providers:
- name: 'rabbitmq'
orgId: 1
folder: ''
type: file
disableDeletion: true
options:
path: /dashboards

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
apiVersion: 1
datasources:
# <string, required> name of the datasource. Required
- name: Prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. direct or proxy. Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://prometheus:9090
# <string> database password, if used
# password:
# <string> database user, if used
# user:
# <string> database name, if used
# database:
# <bool> enable/disable basic auth
# basicAuth:
# <string> basic auth username
# basicAuthUser:
# <string> basic auth password
# basicAuthPassword:
# <bool> enable/disable with credentials headers
# withCredentials:
# <bool> mark as default datasource. Max one per org
isDefault: true
# <map> fields that will be converted to json and stored in json_data
# jsonData:
# graphiteVersion: "1.1"
# tlsAuth: true
# tlsAuthWithCACert: true
# httpHeaderName1: "Authorization"
# <string> json object of data that will be encrypted.
# secureJsonData:
# tlsCACert: "..."
# tlsClientCert: "..."
# tlsClientKey: "..."
# httpHeaderValue1: "Bearer xf5yhfkpsnmgo"
version: 1
# <bool> allow users to edit datasources from the UI.
editable: false

View File

@ -1,526 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "RabbitMQ Management Overview page - https://www.rabbitmq.com/management.html",
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 1,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 4,
"panels": [],
"title": "Nodes",
"type": "row"
},
{
"aliasColors": {},
"bars": false,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"description": "File descriptor count and limit, as reported by the operating system. The count includes network sockets and file handles.\n\nTo optimize disk access RabbitMQ uses as many free descriptors as are available, so the count may safely approach the limit. However, if most of the file descriptors are used by sockets then persister performance will be negatively impacted.\n\n* [Open File Handles Limit](https://www.rabbitmq.com/production-checklist.html#resource-limits-file-handle-limit)",
"fill": 1,
"gridPos": {
"h": 6,
"w": 5,
"x": 0,
"y": 1
},
"id": 2,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": false,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbitmq_node_fd_used",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{node}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "File descriptors",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"description": "The network sockets count and limit managed by RabbitMQ.\n\nWhen the limit is exhausted RabbitMQ will stop accepting new network connections.\n\n* [Networking and RabbitMQ](https://www.rabbitmq.com/networking.html)\n* [Open File Handles Limit](https://www.rabbitmq.com/production-checklist.html#resource-limits-file-handle-limit)",
"fill": 1,
"gridPos": {
"h": 6,
"w": 5,
"x": 5,
"y": 1
},
"id": 5,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": false,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbitmq_node_sockets_used",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{node}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Socket descriptors",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"description": "All work happens in an Erlang process - it's the basic unit of concurrency. Think of an Erlang process as a lightweight thread. A RabbitMQ queue is an Erlang process. Same for a channel, connection, vhost or message store.",
"fill": 1,
"gridPos": {
"h": 6,
"w": 4,
"x": 10,
"y": 1
},
"id": 6,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": false,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbitmq_node_proc_used",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{node}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Erlang processes",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"description": "Memory Resident Set Size used by the Erlang VM, as measured by the OS kernel.\n\n* [Reasoning About Memory Use](https://www.rabbitmq.com/memory-use.html)",
"fill": 1,
"gridPos": {
"h": 6,
"w": 5,
"x": 14,
"y": 1
},
"id": 7,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": false,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbitmq_node_mem_used",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{node}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Memory",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bits",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"description": "* [Disk Space](https://www.rabbitmq.com/production-checklist.html#resource-limits-disk-space)\n* [Persistence Configuration](https://www.rabbitmq.com/persistence-conf.html)\n* [Free Disk Space Alarms](https://www.rabbitmq.com/disk-alarms.html)\n* [Lazy Queues](https://www.rabbitmq.com/lazy-queues.html)",
"fill": 1,
"gridPos": {
"h": 6,
"w": 5,
"x": 19,
"y": 1
},
"id": 8,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": false,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbitmq_node_disk_free",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{node}}",
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "critical",
"fill": true,
"line": true,
"op": "lt",
"value": 52428800,
"yaxis": "left"
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Disk",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "10s",
"schemaVersion": 18,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-5m",
"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": "RabbitMQ-Overview",
"uid": "Kn5xm-gZk",
"version": 5
}