Update scrape rules

This commit is contained in:
2019-05-07 15:43:55 +10:00
parent 5a2804f969
commit 07535b13e7
2 changed files with 414 additions and 5 deletions
+409
View File
@@ -0,0 +1,409 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 14,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"gridPos": {
"h": 9,
"w": 17,
"x": 0,
"y": 0
},
"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,
"stack": false,
"steppedLine": false,
"targets": [
{
"$$hashKey": "object:840",
"expr": "rate(docker_hub_image_pulls_total[1h])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{image}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Pulls",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:865",
"format": "locale",
"label": "Pulls per hour",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:866",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"columns": [],
"datasource": null,
"fontSize": "100%",
"gridPos": {
"h": 18,
"w": 6,
"x": 17,
"y": 0
},
"id": 4,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"$$hashKey": "object:614",
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "hidden"
},
{
"$$hashKey": "object:671",
"alias": "Image",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "image",
"preserveFormat": false,
"thresholds": [],
"type": "string",
"unit": "short"
},
{
"$$hashKey": "object:733",
"alias": "User",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "user",
"thresholds": [],
"type": "string",
"unit": "short"
},
{
"$$hashKey": "object:1520",
"alias": "Downloads",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "Value",
"thresholds": [],
"type": "number",
"unit": "short"
},
{
"$$hashKey": "object:615",
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "hidden",
"unit": "short"
}
],
"targets": [
{
"$$hashKey": "object:411",
"expr": "docker_hub_image_pulls_total",
"format": "table",
"instant": true,
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
},
{
"$$hashKey": "object:1404",
"expr": "",
"format": "table",
"instant": true,
"intervalFactor": 1,
"refId": "B"
}
],
"title": "Repositories",
"transform": "table",
"type": "table"
},
{
"columns": [],
"datasource": null,
"fontSize": "100%",
"gridPos": {
"h": 18,
"w": 1,
"x": 23,
"y": 0
},
"id": 6,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"$$hashKey": "object:2281",
"alias": "Stars",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 0,
"pattern": "Value",
"thresholds": [],
"type": "number",
"unit": "short"
},
{
"$$hashKey": "object:2066",
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "hidden",
"unit": "short"
}
],
"targets": [
{
"$$hashKey": "object:2003",
"expr": "docker_hub_image_stars",
"format": "table",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "",
"transform": "table",
"type": "table"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"gridPos": {
"h": 9,
"w": 17,
"x": 0,
"y": 9
},
"id": 7,
"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,
"stack": false,
"steppedLine": false,
"targets": [
{
"$$hashKey": "object:840",
"expr": "rate(docker_hub_image_stars[1h])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{image}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Stars",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:865",
"format": "locale",
"label": "Stars per hour",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:866",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"refresh": "30s",
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-7d",
"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": "Docker hub",
"uid": "XsMEtCgiz",
"version": 3
}
+5 -5
View File
@@ -14,27 +14,27 @@ rule_files:
# A scrape configuration containing exactly one endpoint to scrape.
scrape_configs:
- job_name: "nodeexporter"
scrape_interval: 5s
scrape_interval: 3s
static_configs:
- targets: ["nodeexporter:9100"]
- job_name: "cadvisor"
scrape_interval: 5s
scrape_interval: 3s
static_configs:
- targets: ["cadvisor:8080"]
- job_name: "prometheus"
scrape_interval: 10s
scrape_interval: 30s
static_configs:
- targets: ["localhost:9090"]
- job_name: "pushgateway"
scrape_interval: 10s
scrape_interval: 30s
honor_labels: true
static_configs:
- targets: ["pushgateway:9091"]
- job_name: "dockerhub"
scrape_interval: 600s
scrape_interval: 60s
honor_labels: true
static_configs:
- targets: ["home.toozhao.com:9170"]