Skip to content

Instantly share code, notes, and snippets.

@wolfoo2931
Last active February 28, 2018 12:31
Show Gist options
  • Save wolfoo2931/fca968ce5e59093bb170809623364bd1 to your computer and use it in GitHub Desktop.
Save wolfoo2931/fca968ce5e59093bb170809623364bd1 to your computer and use it in GitHub Desktop.
- type: replace
path: /instance_groups/name=prometheus/jobs/-
value:
name: graphite_exporter
release: prometheus
properties:
graphite_exporter:
graphite:
mapping_strict_match: true
mapping_config: |
*.rabbitmq.*.node.dc1.*.node.*
name="rabbit_${4}"
guid="$1"
node="$2"
domain="$3"
*.rabbitmq.*.node.dc1.*.node.*.rate
name="rabbit_${4}_rate"
guid="$1"
node="$2"
domain="$3"
*.rabbitmq.*.node.dc1.*.queue.*.*
name="rabbit_queue_${5}"
queue="$4"
guid="$1"
node="$2"
domain="$3"
*.rabbitmq.*.node.dc1.*.queue.*.*.rate
name="rabbit_queue_${5}_rate"
queue="$4"
guid="$1"
node="$2"
domain="$3"
*.rabbitmq.*.node.dc1.*.queue.*.backing_queue_status.*
name="rabbit_queue_backing_queue_status_${5}"
queue="$4"
guid="$1"
node="$2"
domain="$3"
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": 3,
"links": [],
"refresh": "5s",
"rows": [
{
"collapse": false,
"height": 250,
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"id": 1,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbit_sockets_used{guid=~\"$guid\",node=~\"$node\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{ guid }} / {{node}} ",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Sockets Used",
"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": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 250,
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbit_mem_used{guid=~\"$guid\",node=~\"$node\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{guid}} / {{node}}",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Memory Used",
"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": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 250,
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"id": 3,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbit_queue_messages_ready{guid=~\"$guid\",node=~\"$node\",queue=~\"$queue\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{guid}} / {{node}} / {{queue}}",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Messages Ready",
"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": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 250,
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"id": 4,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rabbit_queue_backing_queue_status_next_seq_id{guid=~\"$guid\",node=~\"$node\",queue=~\"$queue\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{guid}} / {{node}} / {{queue}}",
"refId": "A",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "queue_backing_queue_status_next_seq_id",
"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": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
}
],
"schemaVersion": 14,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"tags": [],
"text": "5d59d65f-58ff-4f6e-b96f-9911fd02676a",
"value": "5d59d65f-58ff-4f6e-b96f-9911fd02676a"
},
"datasource": "prometheus",
"hide": 0,
"includeAll": false,
"label": "guid",
"multi": false,
"name": "guid",
"options": [],
"query": "label_values(guid)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"text": "All",
"value": [
"$__all"
]
},
"datasource": "prometheus",
"hide": 0,
"includeAll": true,
"label": "node",
"multi": true,
"name": "node",
"options": [],
"query": "label_values(rabbit_mem_used{guid=~\"$guid\"}, node)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"text": "my-new-queue",
"value": "my-new-queue"
},
"datasource": "prometheus",
"hide": 0,
"includeAll": false,
"label": "queue",
"multi": false,
"name": "queue",
"options": [],
"query": "label_values(rabbit_queue_backing_queue_status_next_seq_id{guid=~\"$guid\"}, queue)",
"refresh": 2,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-1h",
"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": "a9s RabbitMQ (Simple Example)",
"version": 25
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment