Add alarms and alarm clusters
diff --git a/nginx/files/grafana_influxdb.json b/nginx/files/grafana_influxdb.json
index 483403e..62c4781 100644
--- a/nginx/files/grafana_influxdb.json
+++ b/nginx/files/grafana_influxdb.json
@@ -1,1032 +1,158 @@
{
- "annotations": {
- "list": [
- {
- "datasource": "lma",
- "enable": true,
- "iconColor": "#C0C6BE",
- "iconSize": 13,
- "lineColor": "rgba(255, 96, 96, 0.592157)",
- "name": "Status",
- "query": "select title,tags,text from annotations where $timeFilter and cluster = 'nginx'",
- "showLine": true,
- "tagsColumn": "tags",
- "textColumn": "text",
- "titleColumn": "title"
- }
- ]
+ "cacheTimeout": null,
+ "colorBackground": true,
+ "colorValue": false,
+ "colors": [
+ "rgba(71, 212, 59, 0.4)",
+ "rgba(241, 181, 37, 0.73)",
+ "rgba(225, 40, 40, 0.59)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": null,
+ "interval": "> 60s",
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
},
- "editable": true,
- "gnetId": null,
- "hideControls": false,
- "id": 1,
- "links": [],
- "refresh": "1m",
- "rows": [
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "refresh": "1m",
+ "sharedCrosshair": true,
+ "span": 3,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "condition": "",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
{
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(241, 181, 37, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 11,
- "interval": "> 60s",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "nginx_check",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"nginx\" WHERE \"environment_label\" = '$environment' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$server$/"
- }
- ]
- }
- ],
- "thresholds": "0,1",
- "title": "",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "0"
- },
- {
- "op": "=",
- "text": "UP",
- "value": "1"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {
- "threshold1": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2": null,
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "id": 9,
- "interval": "> 60s",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_requests",
- "policy": "default",
- "query": "SELECT mean(\"value\") FROM \"apache_requests\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Number of requests",
- "tooltip": {
- "msResolution": false,
- "shared": false,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "show": true
- },
- "yaxes": [
- {
- "format": "none",
- "label": "per second",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {
- "threshold1": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2": null,
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "id": 10,
- "interval": "> 60s",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "accepted",
- "column": "value",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_connections_accepted",
- "policy": "default",
- "query": "SELECT mean(\"value\") FROM \"apache_connections\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- },
- {
- "alias": "handled",
- "column": "value",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_connections_handled",
- "policy": "default",
- "query": "SELECT mean(\"value\") FROM \"apache_connections\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
- "rawQuery": false,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Number of connections",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "show": true
- },
- "yaxes": [
- {
- "format": "short",
- "label": "per second",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 6,
- "interval": "> 60s",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 3,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_connections_active",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"apache_connections\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- }
- ],
- "thresholds": "",
- "title": "Active connections",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 12,
- "interval": "> 60s",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 3,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_connections_reading",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"apache_connections\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- }
- ],
- "thresholds": "",
- "title": "Reading connections",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 13,
- "interval": "> 60s",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 3,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_connections_writing",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"apache_connections\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- }
- ],
- "thresholds": "",
- "title": "Writing connections",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 14,
- "interval": "> 60s",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 3,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "nginx_connections_waiting",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"apache_connections\" WHERE \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "hostname",
- "operator": "=",
- "value": "$server"
- },
- {
- "condition": "AND",
- "key": "environment_label",
- "operator": "=~",
- "value": "/^$environment$/"
- }
- ]
- }
- ],
- "thresholds": "",
- "title": "Waiting connections",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- }
- ],
- "title": "Metrics"
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
}
- ],
- "schemaVersion": 12,
- "sharedCrosshair": true,
- "style": "dark",
- "tags": [],
- "templating": {
- "enable": true,
- "list": [
- {
- "allFormat": "regex values",
- "current": {},
- "datasource": null,
- "hide": 0,
- "includeAll": false,
- "name": "environment",
- "options": [],
- "query": "show tag values from nginx_requests with key = environment_label",
- "refresh": 1,
- "refresh_on_load": true,
- "regex": "",
- "type": "query"
- },
- {
- "allFormat": "glob",
- "current": {},
- "datasource": null,
- "hide": 0,
- "includeAll": false,
- "name": "server",
- "options": [],
- "query": "show tag values from nginx_requests with key = hostname where environment_label =~ /^$environment$/",
- "refresh": 1,
- "refresh_on_load": true,
- "regex": "",
- "type": "query"
- }
+ ],
+ "groupByTags": [],
+ "groupby_field": "",
+ "interval": "",
+ "measurement": "cluster_status",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"environment_label\" =~ /^$environment$/ AND \"cluster_name\" = 'memcached' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "cluster_name",
+ "operator": "=",
+ "value": "memcached"
+ }
+ ]
+ }
+ ],
+ "thresholds": "1,3",
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "no data",
+ "value": "null"
},
- "time": {
- "from": "now-1h",
- "to": "now"
+ {
+ "op": "=",
+ "text": "OKAY",
+ "value": "0"
},
- "timepicker": {
- "collapse": false,
- "enable": true,
- "notice": false,
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "status": "Stable",
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ],
- "type": "timepicker"
+ {
+ "op": "=",
+ "text": "WARN",
+ "value": "1"
},
- "timezone": "browser",
- "title": "Nginx",
- "version": 6
-}
+ {
+ "op": "=",
+ "text": "UNKN",
+ "value": "2"
+ },
+ {
+ "op": "=",
+ "text": "CRIT",
+ "value": "3"
+ },
+ {
+ "op": "=",
+ "text": "DOWN",
+ "value": "4"
+ }
+ ],
+ "valueName": "current",
+ "version": 2
+}
\ No newline at end of file
diff --git a/nginx/meta/heka.yml b/nginx/meta/heka.yml
index e69de29..92f469a 100644
--- a/nginx/meta/heka.yml
+++ b/nginx/meta/heka.yml
@@ -0,0 +1,33 @@
+{%- from "nginx/map.jinja" import server with context %}
+{%- if server.get('enabled', False) and server.get('site', {}).nginx_stats_server is defined %}
+metric_collector:
+ trigger:
+ nginx_check:
+ description: 'nginx cannot be checked'
+ severity: down
+ rules:
+ - metric: nginx_check
+ relational_operator: '=='
+ threshold: 0
+ window: 60
+ periods: 0
+ function: last
+ alarm:
+ nginx_check:
+ alerting: enabled
+ triggers:
+ - nginx_check
+ dimension:
+ service: nginx
+aggregator:
+ alarm_cluster:
+ nginx_check:
+ policy: majority_of_members
+ match:
+ service: nginx
+ group_by: hostname
+ members:
+ - nginx_check
+ dimension:
+ cluster_name: nginx
+{%- endif %}