Skip to content

Instantly share code, notes, and snippets.

@Sam-Martin
Last active March 5, 2018 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sam-Martin/f99db754b8e72272019c2f0e967373d4 to your computer and use it in GitHub Desktop.
Save Sam-Martin/f99db754b8e72272019c2f0e967373d4 to your computer and use it in GitHub Desktop.
Zabbix Grafana Alerts
{
"annotations": {
"list": [
{
"$$hashKey": "object:1373",
"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": 9,
"links": [],
"panels": [
{
"columns": [],
"datasource": "Zabbix SQL",
"fontSize": "100%",
"gridPos": {
"h": 16,
"w": 24,
"x": 0,
"y": 0
},
"hideTimeOverride": false,
"id": 2,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 3,
"desc": true
},
"styles": [
{
"$$hashKey": "object:914",
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false,
"linkUrl": "",
"pattern": "Time",
"type": "date"
},
{
"$$hashKey": "object:915",
"alias": "Severity",
"colorMode": "row",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "Priority",
"thresholds": [
"2",
"4",
"5"
],
"type": "number",
"unit": "short"
},
{
"$$hashKey": "object:916",
"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": "number",
"unit": "short"
}
],
"targets": [
{
"$$hashKey": "object:869",
"alias": "",
"application": {
"filter": ""
},
"format": "table",
"functions": [],
"group": {
"filter": ""
},
"host": {
"filter": ""
},
"item": {
"filter": ""
},
"mode": 0,
"options": {
"showDisabledItems": false
},
"rawSql": "\nSELECT Host, REPLACE(Description,'{HOST.NAME}',host) as Description, Time, Priority FROM (SELECT DISTINCT host as Host, t.description as Description, t.lastchange * 1000 as Time, t.priority, t.triggerid,\n (SELECT acknowledged FROM events WHERE objectid = t.triggerid ORDER BY clock DESC LIMIT 0,1) as acknowledged \n FROM triggers t \n INNER JOIN functions f ON ( f.triggerid = t.triggerid ) \n INNER JOIN items i ON ( i.itemid = f.itemid ) \n INNER JOIN hosts ON ( i.hostid = hosts.hostid ) \n WHERE \n (t.value=1 OR (t.value =0 AND unix_timestamp(now()) - t.lastchange <60)) \n AND hosts.status =0 \n AND i.status =0 \n AND t.status =0 \n AND t.priority >= 3\n GROUP BY f.triggerid\n ORDER BY t.priority\n ) as q WHERE acknowledged = 0;",
"refId": "A",
"triggers": {
"acknowledged": 2,
"count": true,
"minSeverity": 3
}
}
],
"timeFrom": null,
"title": "Alerts",
"transform": "table",
"type": "table"
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"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": "Zabbix Problems",
"uid": "Ygssdk6zz",
"version": 10
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment