2564 lines
72 KiB
JSON
2564 lines
72 KiB
JSON
{
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "datasource",
|
|
"uid": "grafana"
|
|
},
|
|
"enable": true,
|
|
"hide": true,
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"name": "Annotations & Alerts",
|
|
"target": {
|
|
"limit": 100,
|
|
"matchAny": false,
|
|
"tags": [],
|
|
"type": "dashboard"
|
|
},
|
|
"type": "dashboard"
|
|
}
|
|
]
|
|
},
|
|
"description": "Updated to Zabbix 7 and Grafana 11",
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 1,
|
|
"id": 0,
|
|
"links": [],
|
|
"liveNow": true,
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 29,
|
|
"panels": [],
|
|
"title": "Problems",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 12,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 1
|
|
},
|
|
"id": 17,
|
|
"options": {
|
|
"ackEventColor": "rgb(56, 219, 156)",
|
|
"ackField": true,
|
|
"ageField": true,
|
|
"allowDangerousHTML": false,
|
|
"customLastChangeFormat": false,
|
|
"customTagColumns": "",
|
|
"descriptionAtNewLine": false,
|
|
"descriptionField": true,
|
|
"fontSize": "120%",
|
|
"highlightBackground": true,
|
|
"highlightNewEvents": true,
|
|
"highlightNewerThan": "1h",
|
|
"hostField": true,
|
|
"hostGroups": false,
|
|
"hostProxy": false,
|
|
"hostTechNameField": false,
|
|
"lastChangeFormat": "",
|
|
"layout": "table",
|
|
"limit": 100,
|
|
"markAckEvents": true,
|
|
"okEventColor": "rgb(56, 189, 113)",
|
|
"opdataField": false,
|
|
"pageSize": 10,
|
|
"problemTimeline": true,
|
|
"resizedColumns": [
|
|
{
|
|
"id": "hostname",
|
|
"value": 125
|
|
},
|
|
{
|
|
"id": "lastchange",
|
|
"value": 187
|
|
},
|
|
{
|
|
"id": "age",
|
|
"value": 125
|
|
},
|
|
{
|
|
"id": "ack",
|
|
"value": 207
|
|
},
|
|
{
|
|
"id": "description",
|
|
"value": 899
|
|
}
|
|
],
|
|
"severityField": true,
|
|
"showDatasourceName": false,
|
|
"showTags": false,
|
|
"sortProblems": "lastchange",
|
|
"statusField": false,
|
|
"statusIcon": true,
|
|
"triggerSeverity": [
|
|
{
|
|
"$$hashKey": "object:738",
|
|
"color": "rgb(108, 108, 108)",
|
|
"priority": 0,
|
|
"severity": "Not classified",
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:739",
|
|
"color": "rgb(120, 158, 183)",
|
|
"priority": 1,
|
|
"severity": "Information",
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:740",
|
|
"color": "rgb(175, 180, 36)",
|
|
"priority": 2,
|
|
"severity": "Warning",
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:741",
|
|
"color": "rgb(255, 137, 30)",
|
|
"priority": 3,
|
|
"severity": "Average",
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:742",
|
|
"color": "rgb(255, 101, 72)",
|
|
"priority": 4,
|
|
"severity": "High",
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:743",
|
|
"color": "rgb(215, 0, 0)",
|
|
"priority": 5,
|
|
"severity": "Disaster",
|
|
"show": true
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "6.3.0",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": ""
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"hide": false,
|
|
"host": {
|
|
"filter": ""
|
|
},
|
|
"item": {
|
|
"filter": ""
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"acknowledged": 2,
|
|
"count": false,
|
|
"disableDataAlignment": false,
|
|
"hostProxy": false,
|
|
"hostsInMaintenance": false,
|
|
"limit": 1001,
|
|
"minSeverity": 0,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"sortProblems": "default",
|
|
"useTimeRange": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "5",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"showProblems": "problems",
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
}
|
|
}
|
|
],
|
|
"title": "All Problems",
|
|
"type": "alexanderzobnin-zabbix-triggers-panel"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 13
|
|
},
|
|
"id": 38,
|
|
"panels": [],
|
|
"title": "Agent info",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [
|
|
{
|
|
"options": {
|
|
"1": {
|
|
"text": "ONLINE"
|
|
}
|
|
},
|
|
"type": "value"
|
|
},
|
|
{
|
|
"options": {
|
|
"match": "null",
|
|
"result": {
|
|
"text": "OFFLINE"
|
|
}
|
|
},
|
|
"type": "special"
|
|
}
|
|
],
|
|
"noValue": "OFFLINE",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "red",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 3,
|
|
"w": 4,
|
|
"x": 0,
|
|
"y": 14
|
|
},
|
|
"hideTimeOverride": true,
|
|
"id": 3,
|
|
"maxDataPoints": 100,
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "horizontal",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {},
|
|
"textMode": "value",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "/.*/"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "Zabbix agent ping"
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"timeFrom": "5m",
|
|
"title": "",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "grafana",
|
|
"uid": "-- Grafana --"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"displayName": "$Host",
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 3,
|
|
"w": 16,
|
|
"x": 4,
|
|
"y": 14
|
|
},
|
|
"id": 2,
|
|
"options": {
|
|
"colorMode": "none",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"orientation": "horizontal",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"textMode": "name",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"targets": [
|
|
{
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Agent name",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"decimals": 0,
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "yellow",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 3,
|
|
"w": 4,
|
|
"x": 20,
|
|
"y": 14
|
|
},
|
|
"hideTimeOverride": true,
|
|
"id": 10,
|
|
"maxDataPoints": 100,
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"orientation": "auto",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {},
|
|
"textMode": "value",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": ""
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"hide": false,
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": ""
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"acknowledged": 2,
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"hostProxy": false,
|
|
"hostsInMaintenance": false,
|
|
"limit": 1001,
|
|
"minSeverity": 0,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"sortProblems": "default",
|
|
"useTimeRange": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "4",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"showProblems": "problems",
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
}
|
|
}
|
|
],
|
|
"timeFrom": "5y",
|
|
"title": "Problems",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 17
|
|
},
|
|
"id": 31,
|
|
"panels": [],
|
|
"title": "Agent stats",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisBorderShow": false,
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"barWidthFactor": 0.6,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 0,
|
|
"gradientMode": "none",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"insertNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"showPoints": "auto",
|
|
"showValues": false,
|
|
"spanNulls": false,
|
|
"stacking": {
|
|
"group": "A",
|
|
"mode": "none"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"decimals": 0,
|
|
"mappings": [
|
|
{
|
|
"options": {
|
|
"match": "null",
|
|
"result": {
|
|
"text": "N/A"
|
|
}
|
|
},
|
|
"type": "special"
|
|
}
|
|
],
|
|
"max": 100,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "rgba(50, 172, 45, 0.97)",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "rgba(237, 129, 40, 0.89)",
|
|
"value": 50
|
|
},
|
|
{
|
|
"color": "rgba(245, 54, 54, 0.9)",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 18
|
|
},
|
|
"id": 5,
|
|
"maxDataPoints": 100,
|
|
"options": {
|
|
"legend": {
|
|
"calcs": [],
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"minVizHeight": 75,
|
|
"minVizWidth": 75,
|
|
"orientation": "horizontal",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showThresholdLabels": false,
|
|
"showThresholdMarkers": true,
|
|
"sizing": "auto",
|
|
"text": {},
|
|
"tooltip": {
|
|
"hideZeros": false,
|
|
"mode": "single",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "Memory"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "Memory utilization"
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"timeFrom": "2d",
|
|
"title": "Memory Utilization",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisBorderShow": false,
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"barWidthFactor": 0.6,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 0,
|
|
"gradientMode": "none",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"insertNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"showPoints": "auto",
|
|
"showValues": false,
|
|
"spanNulls": false,
|
|
"stacking": {
|
|
"group": "A",
|
|
"mode": "none"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"decimals": 0,
|
|
"mappings": [
|
|
{
|
|
"options": {
|
|
"match": "null",
|
|
"result": {
|
|
"text": "N/A"
|
|
}
|
|
},
|
|
"type": "special"
|
|
}
|
|
],
|
|
"max": 100,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "rgba(50, 172, 45, 0.97)",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "rgba(237, 129, 40, 0.89)",
|
|
"value": 50
|
|
},
|
|
{
|
|
"color": "rgba(245, 54, 54, 0.9)",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 18
|
|
},
|
|
"id": 4,
|
|
"maxDataPoints": 100,
|
|
"options": {
|
|
"legend": {
|
|
"calcs": [],
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"minVizHeight": 75,
|
|
"minVizWidth": 75,
|
|
"orientation": "horizontal",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showThresholdLabels": false,
|
|
"showThresholdMarkers": true,
|
|
"sizing": "auto",
|
|
"text": {},
|
|
"tooltip": {
|
|
"hideZeros": false,
|
|
"mode": "single",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "CPU"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "CPU utilization"
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "B",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"timeFrom": "2d",
|
|
"title": "CPU utilization",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisBorderShow": true,
|
|
"axisCenteredZero": true,
|
|
"axisColorMode": "series",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"barWidthFactor": 0.6,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 60,
|
|
"gradientMode": "opacity",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"insertNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"lineStyle": {
|
|
"fill": "solid"
|
|
},
|
|
"lineWidth": 2,
|
|
"pointSize": 5,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"showPoints": "always",
|
|
"showValues": false,
|
|
"spanNulls": true,
|
|
"stacking": {
|
|
"group": "A",
|
|
"mode": "none"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "line"
|
|
}
|
|
},
|
|
"fieldMinMax": false,
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "text",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byRegexp",
|
|
"options": "/read rate/"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.lineWidth",
|
|
"value": 2
|
|
},
|
|
{
|
|
"id": "custom.fillOpacity",
|
|
"value": 60
|
|
},
|
|
{
|
|
"id": "displayName",
|
|
"value": "Disk $Disk read rate"
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"fixedColor": "blue",
|
|
"mode": "fixed"
|
|
}
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "rps"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byRegexp",
|
|
"options": "/write rate/"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.lineWidth",
|
|
"value": 2
|
|
},
|
|
{
|
|
"id": "custom.fillOpacity",
|
|
"value": 60
|
|
},
|
|
{
|
|
"id": "displayName",
|
|
"value": "Disk $Disk write rate"
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"fixedColor": "semi-dark-red",
|
|
"mode": "fixed"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.transform",
|
|
"value": "negative-Y"
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "wps"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 28
|
|
},
|
|
"id": 89,
|
|
"options": {
|
|
"legend": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"hideZeros": false,
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"repeat": "Disk",
|
|
"repeatDirection": "v",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "$Disk"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"hide": false,
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/read rate/"
|
|
},
|
|
"itemTag": {
|
|
"filter": "disk: $Disk $Filesystem"
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "reads",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
},
|
|
{
|
|
"application": {
|
|
"filter": "$Disk"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/write rate/"
|
|
},
|
|
"itemTag": {
|
|
"filter": "disk: $Disk $Filesystem"
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "writes",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"title": "Disk $Disk (read/write rates)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"description": "This item is the percentage of elapsed time that the selected disk drive was busy servicing read or writes requests.",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"decimals": 0,
|
|
"mappings": [],
|
|
"max": 100,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "#EAB839",
|
|
"value": 50
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 28
|
|
},
|
|
"id": 23,
|
|
"options": {
|
|
"minVizHeight": 75,
|
|
"minVizWidth": 75,
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showThresholdLabels": false,
|
|
"showThresholdMarkers": true,
|
|
"sizing": "auto",
|
|
"text": {}
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"repeat": "Disk",
|
|
"repeatDirection": "v",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "$Disk"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/Disk utilization/"
|
|
},
|
|
"itemTag": {
|
|
"filter": "disk: $Disk $Filesystem"
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"title": "Disk $Disk (Performance)",
|
|
"type": "gauge"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 38
|
|
},
|
|
"id": 41,
|
|
"panels": [],
|
|
"title": "Network",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"fixedColor": "semi-dark-green",
|
|
"mode": "fixed"
|
|
},
|
|
"decimals": 0,
|
|
"displayName": "$Network",
|
|
"mappings": [
|
|
{
|
|
"options": {
|
|
"match": "null",
|
|
"result": {
|
|
"text": "N/A"
|
|
}
|
|
},
|
|
"type": "special"
|
|
}
|
|
],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
"unit": "binBps"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 4,
|
|
"x": 0,
|
|
"y": 39
|
|
},
|
|
"id": 19,
|
|
"maxDataPoints": 100,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "horizontal",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {},
|
|
"textMode": "value",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"repeat": "Network",
|
|
"repeatDirection": "v",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "$Network"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/\\$Network.*Bits received/"
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"title": "(IN) $Network",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisBorderShow": true,
|
|
"axisCenteredZero": true,
|
|
"axisColorMode": "series",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"barWidthFactor": 0.6,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 30,
|
|
"gradientMode": "opacity",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"insertNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 3,
|
|
"pointSize": 5,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"showPoints": "always",
|
|
"showValues": false,
|
|
"spanNulls": true,
|
|
"stacking": {
|
|
"group": "A",
|
|
"mode": "none"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "line"
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "text",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
"unit": "binBps"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byRegexp",
|
|
"options": "/Bits received/"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"fixedColor": "#56A64B",
|
|
"mode": "fixed"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byRegexp",
|
|
"options": "/Bits sent/"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"fixedColor": "#8F3BB8",
|
|
"mode": "fixed"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.transform",
|
|
"value": "negative-Y"
|
|
},
|
|
{
|
|
"id": "custom.axisPlacement",
|
|
"value": "right"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 16,
|
|
"x": 4,
|
|
"y": 39
|
|
},
|
|
"id": 18,
|
|
"options": {
|
|
"legend": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"displayMode": "list",
|
|
"placement": "right",
|
|
"showLegend": false
|
|
},
|
|
"tooltip": {
|
|
"hideZeros": false,
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"repeat": "Network",
|
|
"repeatDirection": "v",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "$Network"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/\\$Network.*Bits received/"
|
|
},
|
|
"itemTag": {
|
|
"filter": "description: $Network"
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "received",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
},
|
|
{
|
|
"application": {
|
|
"filter": "$Network"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"hide": false,
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/\\$Network.*Bits sent/"
|
|
},
|
|
"itemTag": {
|
|
"filter": "description: $Network"
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": true,
|
|
"disableDataAlignment": false,
|
|
"minSeverity": 3,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "sent",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"title": "$Network",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"fixedColor": "semi-dark-purple",
|
|
"mode": "fixed"
|
|
},
|
|
"decimals": 0,
|
|
"mappings": [
|
|
{
|
|
"options": {
|
|
"match": "null",
|
|
"result": {
|
|
"text": "N/A"
|
|
}
|
|
},
|
|
"type": "special"
|
|
}
|
|
],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
"unit": "binBps"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 4,
|
|
"x": 20,
|
|
"y": 39
|
|
},
|
|
"id": 21,
|
|
"maxDataPoints": 100,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "horizontal",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {},
|
|
"textMode": "value",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.3.5",
|
|
"repeat": "Network",
|
|
"repeatDirection": "v",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": "$Network"
|
|
},
|
|
"countTriggersBy": "",
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": "$Group"
|
|
},
|
|
"host": {
|
|
"filter": "$Host"
|
|
},
|
|
"item": {
|
|
"filter": "/$Network.*Bits sent/"
|
|
},
|
|
"itemTag": {
|
|
"filter": "description: $Network"
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": false,
|
|
"disableDataAlignment": false,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
},
|
|
"triggers": {
|
|
"acknowledged": 2
|
|
}
|
|
}
|
|
],
|
|
"title": "(OUT) $Network",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 46
|
|
},
|
|
"id": 90,
|
|
"panels": [],
|
|
"title": "Creation",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "P3DDF143C55A61A34"
|
|
},
|
|
"description": "To create a host in zabbix for status monitoring of devices. \n\nFill in in order (at least the Host name and IP or DNS name before the group and template).",
|
|
"fieldConfig": {
|
|
"defaults": {},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 11,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 47
|
|
},
|
|
"id": 91,
|
|
"options": {
|
|
"Layout": "Basic",
|
|
"buttonGroup": {
|
|
"orientation": "center",
|
|
"size": "md"
|
|
},
|
|
"confirmModal": {
|
|
"body": "Please confirm to update changed values",
|
|
"cancel": "Cancel",
|
|
"columns": {
|
|
"include": [
|
|
"name",
|
|
"oldValue",
|
|
"newValue"
|
|
],
|
|
"name": "Label",
|
|
"newValue": "New Value",
|
|
"oldValue": "Old Value"
|
|
},
|
|
"confirm": "Confirm",
|
|
"elementDisplayMode": "modified",
|
|
"title": "Confirm update request"
|
|
},
|
|
"elementValueChanged": "",
|
|
"elements": [
|
|
{
|
|
"id": "hostname",
|
|
"title": "Host name*",
|
|
"type": "string",
|
|
"uid": "dbd86caf-732c-4bdd-b0b0-4647f3110454"
|
|
},
|
|
{
|
|
"id": "ip",
|
|
"title": "IP address* (compulsory this or DNS name)",
|
|
"type": "string",
|
|
"uid": "d22cdbc1-5551-4c7c-891f-0f14cf351fd6"
|
|
},
|
|
{
|
|
"id": "dns",
|
|
"title": "DNS Name*",
|
|
"type": "string",
|
|
"uid": "2b2f8a18-f040-45d5-91d8-db75ad34a36c"
|
|
},
|
|
{
|
|
"allowCustomValue": false,
|
|
"getOptions": "function ejecutarPeticion() {\r\n\r\n function getToken() {\r\n let xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"http://localhost:8080/api_jsonrpc.php\", false); // false = síncrono\r\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\r\n\r\n xhr.send(JSON.stringify({\r\n jsonrpc: \"2.0\",\r\n method: \"user.login\",\r\n params: {\r\n username: \"Admin\",\r\n password: \"zabbix\"\r\n },\r\n id: 1\r\n }));\r\n\r\n let data = JSON.parse(xhr.responseText);\r\n return data.result;\r\n }\r\n\r\n let token = getToken();\r\n\r\n let xhr2 = new XMLHttpRequest();\r\n xhr2.open(\"POST\", \"http://localhost:8080/api_jsonrpc.php\", false); // síncrono\r\n xhr2.setRequestHeader(\"Content-Type\", \"application/json\");\r\n xhr2.setRequestHeader(\"Authorization\", \"Bearer \" + token);\r\n\r\n xhr2.send(JSON.stringify({\r\n jsonrpc: \"2.0\",\r\n method: \"hostgroup.get\",\r\n params: {},\r\n id: 2\r\n }));\r\n\r\n let groupData = JSON.parse(xhr2.responseText);\r\n\r\n let grupos = [];\r\n if (groupData.result && groupData.result.length >= 0) {\r\n grupos = groupData.result.map(item => ({\r\n label: item.name,\r\n value: item.groupid\r\n }));\r\n }\r\n\r\n return grupos;\r\n}\r\n\r\nif (((\"\" + context.panel.elements.find(e => e.id === \"ip\")?.value).length < 8 || \"\" + context.panel.elements.find(e => e.id === \"ip\")?.value === \"undefined\") &&\r\n ((\"\" + context.panel.elements.find(e => e.id === \"dns\")?.value).length < 2 || \"\" + context.panel.elements.find(e => e.id === \"dns\")?.value === \"undefined\") ||\r\n ((\"\" + context.panel.elements.find(e => e.id === \"hostname\")?.value).length < 2 || \"\" + context.panel.elements.find(e => e.id === \"hostname\")?.value === \"undefined\")) {\r\n return;\r\n}\r\nreturn ejecutarPeticion();",
|
|
"id": "group",
|
|
"labelWidth": 10,
|
|
"options": [],
|
|
"optionsSource": "Code",
|
|
"section": "",
|
|
"title": "Group",
|
|
"tooltip": "",
|
|
"type": "multiselect",
|
|
"uid": "f697c7eb-4e3b-4e23-8805-3ef0b8ec555f",
|
|
"unit": "",
|
|
"value": ""
|
|
},
|
|
{
|
|
"allowCustomValue": false,
|
|
"getOptions": "function ejecutarPeticion() {\r\n\r\n function getToken() {\r\n let xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"http://localhost:8080/api_jsonrpc.php\", false); // false = síncrono\r\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\r\n\r\n xhr.send(JSON.stringify({\r\n jsonrpc: \"2.0\",\r\n method: \"user.login\",\r\n params: {\r\n username: \"Admin\",\r\n password: \"zabbix\"\r\n },\r\n id: 1\r\n }));\r\n\r\n let data = JSON.parse(xhr.responseText);\r\n return data.result;\r\n }\r\n\r\n let token = getToken();\r\n\r\n let xhr2 = new XMLHttpRequest();\r\n xhr2.open(\"POST\", \"http://localhost:8080/api_jsonrpc.php\", false); // síncrono\r\n xhr2.setRequestHeader(\"Content-Type\", \"application/json\");\r\n xhr2.setRequestHeader(\"Authorization\", \"Bearer \" + token);\r\n\r\n xhr2.send(JSON.stringify({\r\n jsonrpc: \"2.0\",\r\n method: \"template.get\",\r\n params: {},\r\n id: 2\r\n }));\r\n\r\n let templateData = JSON.parse(xhr2.responseText);\r\n\r\n let templates = [];\r\n if (templateData.result && templateData.result.length >= 0) {\r\n templates = templateData.result.map(item => ({\r\n label: item.name,\r\n value: item.templateid\r\n }));\r\n }\r\n\r\n return templates;\r\n}\r\n\r\nif (((\"\" + context.panel.elements.find(e => e.id === \"ip\")?.value).length < 8 || \"\" + context.panel.elements.find(e => e.id === \"ip\")?.value === \"undefined\") &&\r\n ((\"\" + context.panel.elements.find(e => e.id === \"dns\")?.value).length < 2 || \"\" + context.panel.elements.find(e => e.id === \"dns\")?.value === \"undefined\") ||\r\n ((\"\" + context.panel.elements.find(e => e.id === \"hostname\")?.value).length < 2 || \"\" + context.panel.elements.find(e => e.id === \"hostname\")?.value === \"undefined\")) {\r\n return;\r\n}\r\n\r\nreturn ejecutarPeticion();",
|
|
"id": "template",
|
|
"labelWidth": 10,
|
|
"options": [],
|
|
"optionsSource": "Code",
|
|
"section": "",
|
|
"title": "Template",
|
|
"tooltip": "",
|
|
"type": "multiselect",
|
|
"uid": "08a10d84-710e-44a0-86db-a63f50bb6830",
|
|
"unit": "",
|
|
"value": ""
|
|
},
|
|
{
|
|
"allowCustomValue": false,
|
|
"id": "interface",
|
|
"options": [
|
|
{
|
|
"id": "ZBX",
|
|
"label": "Zabbix agent",
|
|
"value": "ZBX"
|
|
},
|
|
{
|
|
"id": "snmp_v3",
|
|
"label": "SNMP v3",
|
|
"value": "snmp_v3"
|
|
},
|
|
{
|
|
"id": "snmp_v2",
|
|
"label": "SNMP v2",
|
|
"value": "snmp_v2"
|
|
}
|
|
],
|
|
"title": "Interface type",
|
|
"type": "select",
|
|
"uid": "509b91a0-39d9-4664-a775-24f1f7ca63c8"
|
|
},
|
|
{
|
|
"id": "snmp_com",
|
|
"title": "SNMP community name (SNMP v2)",
|
|
"type": "string",
|
|
"uid": "b3c51a15-59ef-4fa4-b337-e49709234a4e"
|
|
},
|
|
{
|
|
"id": "snmp_sec",
|
|
"title": "SNMP security name (SNMP v3)",
|
|
"type": "string",
|
|
"uid": "0ff944e6-3349-4aee-a7d8-ee478dcac4e9"
|
|
},
|
|
{
|
|
"id": "snmp_context",
|
|
"title": "SNMP context group (SNMP v3)",
|
|
"type": "string",
|
|
"uid": "772b0852-ca82-436c-ad14-ad7d3d07b149"
|
|
}
|
|
],
|
|
"initial": {
|
|
"code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);",
|
|
"contentType": "application/json",
|
|
"getPayload": "return {}",
|
|
"highlight": false,
|
|
"highlightColor": "red",
|
|
"method": "-",
|
|
"payload": {}
|
|
},
|
|
"layout": {
|
|
"orientation": "horizontal",
|
|
"padding": 10,
|
|
"sectionVariant": "default",
|
|
"variant": "single"
|
|
},
|
|
"reset": {
|
|
"backgroundColor": "purple",
|
|
"foregroundColor": "yellow",
|
|
"icon": "process",
|
|
"text": "Reset",
|
|
"variant": "hidden"
|
|
},
|
|
"resetAction": {
|
|
"code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}",
|
|
"confirm": false,
|
|
"getPayload": "return {}",
|
|
"mode": "initial",
|
|
"payload": {}
|
|
},
|
|
"saveDefault": {
|
|
"icon": "save",
|
|
"text": "Save Default",
|
|
"variant": "hidden"
|
|
},
|
|
"styles": {
|
|
"padding": "16px"
|
|
},
|
|
"submit": {
|
|
"backgroundColor": "purple",
|
|
"foregroundColor": "yellow",
|
|
"icon": "cloud-upload",
|
|
"label": "Enviar",
|
|
"text": "Submit",
|
|
"variant": "primary"
|
|
},
|
|
"sync": true,
|
|
"update": {
|
|
"code": "let hostname = context.panel.elements.find(e => e.id === \"hostname\")?.value; let group = context.panel.elements.find(e => e.id === \"group\")?.value; let interface = context.panel.elements.find(e => e.id === \"interface\")?.value; let ipa = context.panel.elements.find(e => e.id === \"ip\")?.value; let dns_name = context.panel.elements.find(e => e.id === \"dns\")?.value; let template = context.panel.elements.find(e => e.id === \"template\")?.value; async function ejecutarPeticion() { async function getToken() { let token = null; let res = await fetch(\"http://localhost:8080/api_jsonrpc.php\", { method: \"POST\", headers: { \"Content-Type\": \"application/json\" }, body: JSON.stringify({ jsonrpc: \"2.0\", method: \"user.login\", params: { username: \"Admin\", password: \"zabbix\" }, id: 1 }) }); const data = await res.json(); token = data.result; return token; } let token = await getToken(); if (interface == \"ZBX\") { return fetch(\"http://localhost:8080/api_jsonrpc.php\", { method: \"POST\", headers: { \"Content-Type\": \"application/json-rpc\", \"Authorization\": \"Bearer \" + token }, body: JSON.stringify({ jsonrpc: \"2.0\", method: \"host.create\", params: { host: hostname, interfaces: [ { type: 1, main: 1, useip: 1, ip: ipa, dns: \"\" + dns_name, port: \"10050\" } ], groups: group.map(g => ({ groupid: parseInt(g) })), templates: template.map(g => ({ templateid: parseInt(g) })), }, id: 1 }) }); } else if (interface == \"snmp_v3\") { let snmp_sec = context.panel.elements.find(e => e.id === \"snmp_sec\")?.value; let snmp_context = context.panel.elements.find(e => e.id === \"snmp_context\")?.value; return fetch(\"http://localhost:8080/api_jsonrpc.php\", { method: \"POST\", headers: { \"Content-Type\": \"application/json-rpc\", \"Authorization\": \"Bearer \" + token }, body: JSON.stringify({ jsonrpc: \"2.0\", method: \"host.create\", params: { host: hostname, interfaces: [ { type: 2, main: 1, useip: 1, ip: ipa, dns: \"\" + dns_name, port: \"161\", details: { version: 3, bulk: 0, securityname: snmp_sec, contextname: \"\" + snmp_context, securitylevel: 1 } } ], groups: group.map(g => ({ groupid: parseInt(g) })), templates: template.map(g => ({ templateid: parseInt(g) })), }, id: 1 }) }); } else if (interface == \"snmp_v2\") { let snmp_com = context.panel.elements.find(e => e.id === \"snmp_com\")?.value; return fetch(\"http://localhost:8080/api_jsonrpc.php\", { method: \"POST\", headers: { \"Content-Type\": \"application/json-rpc\", \"Authorization\": \"Bearer \" + token }, body: JSON.stringify({ jsonrpc: \"2.0\", method: \"host.create\", params: { host: hostname, interfaces: [ { type: 2, main: 1, useip: 1, ip: ipa, dns: \"\" + dns_name, port: \"161\", details: { version: 2, bulk: 0, community: snmp_com } } ], groups: group.map(g => ({ groupid: parseInt(g) })), templates: template.map(g => ({ templateid: parseInt(g) })), }, id: 1 }) }); } } return ejecutarPeticion();",
|
|
"confirm": false,
|
|
"contentType": "application/json",
|
|
"getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;",
|
|
"method": "-",
|
|
"payload": {},
|
|
"payloadMode": "all"
|
|
},
|
|
"updateEnabled": "auto"
|
|
},
|
|
"pluginVersion": "6.3.1",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": ""
|
|
},
|
|
"countTriggersBy": "",
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": ""
|
|
},
|
|
"host": {
|
|
"filter": ""
|
|
},
|
|
"item": {
|
|
"filter": ""
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": false,
|
|
"disableDataAlignment": false,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
}
|
|
}
|
|
],
|
|
"title": "Host Create (Fill in in order and at least the *)",
|
|
"type": "volkovlabs-form-panel"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "P3DDF143C55A61A34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 7,
|
|
"x": 9,
|
|
"y": 47
|
|
},
|
|
"id": 92,
|
|
"options": {
|
|
"Layout": "Basic",
|
|
"buttonGroup": {
|
|
"orientation": "center",
|
|
"size": "md"
|
|
},
|
|
"confirmModal": {
|
|
"body": "Please confirm to update changed values",
|
|
"cancel": "Cancel",
|
|
"columns": {
|
|
"include": [
|
|
"name",
|
|
"oldValue",
|
|
"newValue"
|
|
],
|
|
"name": "Label",
|
|
"newValue": "New Value",
|
|
"oldValue": "Old Value"
|
|
},
|
|
"confirm": "Confirm",
|
|
"elementDisplayMode": "modified",
|
|
"title": "Confirm update request"
|
|
},
|
|
"elementValueChanged": "",
|
|
"elements": [
|
|
{
|
|
"id": "groupname",
|
|
"title": "Group name",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"initial": {
|
|
"code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);",
|
|
"contentType": "application/json",
|
|
"getPayload": "return {}",
|
|
"highlight": false,
|
|
"highlightColor": "red",
|
|
"method": "-",
|
|
"payload": {}
|
|
},
|
|
"layout": {
|
|
"orientation": "horizontal",
|
|
"padding": 10,
|
|
"sectionVariant": "default",
|
|
"variant": "single"
|
|
},
|
|
"reset": {
|
|
"backgroundColor": "purple",
|
|
"foregroundColor": "yellow",
|
|
"icon": "process",
|
|
"text": "Reset",
|
|
"variant": "hidden"
|
|
},
|
|
"resetAction": {
|
|
"code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}",
|
|
"confirm": false,
|
|
"getPayload": "return {}",
|
|
"mode": "initial",
|
|
"payload": {}
|
|
},
|
|
"saveDefault": {
|
|
"icon": "save",
|
|
"text": "Save Default",
|
|
"variant": "hidden"
|
|
},
|
|
"styles": {
|
|
"padding": "16px"
|
|
},
|
|
"submit": {
|
|
"backgroundColor": "purple",
|
|
"foregroundColor": "yellow",
|
|
"icon": "cloud-upload",
|
|
"label": "Enviar",
|
|
"text": "Submit",
|
|
"variant": "primary"
|
|
},
|
|
"sync": true,
|
|
"update": {
|
|
"code": "let groupname = context.panel.elements.find(e => e.id === \"groupname\")?.value;\r\n\r\nasync function ejecutarPeticion() {\r\n async function getToken() {\r\n let token = null;\r\n\r\n const res = await fetch(\"http://localhost:8080/api_jsonrpc.php\", {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify({\r\n jsonrpc: \"2.0\",\r\n method: \"user.login\",\r\n params: {\r\n username: \"Admin\",\r\n password: \"zabbix\"\r\n },\r\n id: 1\r\n })\r\n });\r\n\r\n const data = await res.json();\r\n token = data.result;\r\n return token;\r\n }\r\n\r\n let token = await getToken();\r\n\r\n let groupRes = await fetch(\"http://localhost:8080/api_jsonrpc.php\", {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n \"Authorization\": \"Bearer \" + token\r\n },\r\n body: JSON.stringify({\r\n jsonrpc: \"2.0\",\r\n method: \"hostgroup.get\",\r\n params: {},\r\n id: 2\r\n })\r\n });\r\n\r\n let groupData = await groupRes.json();\r\n\r\n let grupos = [];\r\n if (groupData.result || groupData.result.length >= 0) {\r\n grupos = groupData.result.map(item => ({\r\n label: item.name,\r\n value: item.id\r\n }));\r\n }\r\n return grupos;\r\n}\r\nconsole.log(ejecutarPeticion());\r\nreturn ejecutarPeticion();",
|
|
"confirm": false,
|
|
"contentType": "application/json",
|
|
"getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;",
|
|
"method": "-",
|
|
"payload": {},
|
|
"payloadMode": "all"
|
|
},
|
|
"updateEnabled": "auto"
|
|
},
|
|
"pluginVersion": "6.3.1",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": ""
|
|
},
|
|
"countTriggersBy": "",
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": ""
|
|
},
|
|
"host": {
|
|
"filter": ""
|
|
},
|
|
"item": {
|
|
"filter": ""
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": false,
|
|
"disableDataAlignment": false,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
}
|
|
}
|
|
],
|
|
"title": "Group Create",
|
|
"type": "volkovlabs-form-panel"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "P3DDF143C55A61A34"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 7,
|
|
"x": 9,
|
|
"y": 51
|
|
},
|
|
"id": 93,
|
|
"options": {
|
|
"Layout": "Basic",
|
|
"buttonGroup": {
|
|
"orientation": "center",
|
|
"size": "md"
|
|
},
|
|
"confirmModal": {
|
|
"body": "Please confirm to update changed values",
|
|
"cancel": "Cancel",
|
|
"columns": {
|
|
"include": [
|
|
"name",
|
|
"oldValue",
|
|
"newValue"
|
|
],
|
|
"name": "Label",
|
|
"newValue": "New Value",
|
|
"oldValue": "Old Value"
|
|
},
|
|
"confirm": "Confirm",
|
|
"elementDisplayMode": "modified",
|
|
"title": "Confirm update request"
|
|
},
|
|
"elementValueChanged": "",
|
|
"elements": [
|
|
{
|
|
"id": "triggername",
|
|
"title": "Trigger name",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"id": "expression",
|
|
"title": "Expresion",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"initial": {
|
|
"code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);",
|
|
"contentType": "application/json",
|
|
"getPayload": "return {}",
|
|
"highlight": false,
|
|
"highlightColor": "red",
|
|
"method": "-",
|
|
"payload": {}
|
|
},
|
|
"layout": {
|
|
"orientation": "horizontal",
|
|
"padding": 10,
|
|
"sectionVariant": "default",
|
|
"variant": "single"
|
|
},
|
|
"reset": {
|
|
"backgroundColor": "purple",
|
|
"foregroundColor": "yellow",
|
|
"icon": "process",
|
|
"text": "Reset",
|
|
"variant": "hidden"
|
|
},
|
|
"resetAction": {
|
|
"code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}",
|
|
"confirm": false,
|
|
"getPayload": "return {}",
|
|
"mode": "initial",
|
|
"payload": {}
|
|
},
|
|
"saveDefault": {
|
|
"icon": "save",
|
|
"text": "Save Default",
|
|
"variant": "hidden"
|
|
},
|
|
"styles": {
|
|
"padding": "16px"
|
|
},
|
|
"submit": {
|
|
"backgroundColor": "purple",
|
|
"foregroundColor": "yellow",
|
|
"icon": "cloud-upload",
|
|
"label": "Enviar",
|
|
"text": "Submit",
|
|
"variant": "primary"
|
|
},
|
|
"sync": true,
|
|
"update": {
|
|
"code": "const triggername = context.panel.elements.find(e => e.id === \"triggername\")?.value; const exp = context.panel.elements.find(e => e.id === \"expression\")?.value; async function ejecutarPeticion() { async function getToken() { let token = null; const res = await fetch(\"http://localhost:8080/api_jsonrpc.php\", { method: \"GET\", headers: { \"Content-Type\": \"application/json\" }, body: JSON.stringify({ jsonrpc: \"2.0\", method: \"user.login\", params: { username: \"Admin\", password: \"zabbix\" }, id: 1 }) }); const data = await res.json(); token = data.result; return token; } let token = await getToken(); let petition = await fetch(\"http://localhost:8080/api_jsonrpc.php\", { method: \"POST\", headers: { \"Content-Type\": \"application/json\", \"Authorization\": \"Bearer \" + token }, body: JSON.stringify({ jsonrpc: 2.0, method: \"trigger.create\", params: { description: triggername, expression: exp, }, id: 1 }) }); return petition; } return ejecutarPeticion();",
|
|
"confirm": false,
|
|
"contentType": "application/json",
|
|
"getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;",
|
|
"method": "-",
|
|
"payload": {},
|
|
"payloadMode": "all"
|
|
},
|
|
"updateEnabled": "auto"
|
|
},
|
|
"pluginVersion": "6.3.1",
|
|
"targets": [
|
|
{
|
|
"application": {
|
|
"filter": ""
|
|
},
|
|
"countTriggersBy": "",
|
|
"evaltype": "0",
|
|
"functions": [],
|
|
"group": {
|
|
"filter": ""
|
|
},
|
|
"host": {
|
|
"filter": ""
|
|
},
|
|
"item": {
|
|
"filter": ""
|
|
},
|
|
"itemTag": {
|
|
"filter": ""
|
|
},
|
|
"macro": {
|
|
"filter": ""
|
|
},
|
|
"options": {
|
|
"count": false,
|
|
"disableDataAlignment": false,
|
|
"showDisabledItems": false,
|
|
"skipEmptyValues": false,
|
|
"useTrends": "default",
|
|
"useZabbixValueMapping": false
|
|
},
|
|
"proxy": {
|
|
"filter": ""
|
|
},
|
|
"queryType": "0",
|
|
"refId": "A",
|
|
"resultFormat": "time_series",
|
|
"schema": 12,
|
|
"table": {
|
|
"skipEmptyValues": false
|
|
},
|
|
"tags": {
|
|
"filter": ""
|
|
},
|
|
"textFilter": "",
|
|
"trigger": {
|
|
"filter": ""
|
|
}
|
|
}
|
|
],
|
|
"title": "Trigger Create",
|
|
"type": "volkovlabs-form-panel"
|
|
}
|
|
],
|
|
"preload": false,
|
|
"refresh": "30s",
|
|
"schemaVersion": 42,
|
|
"tags": [
|
|
"zabbix"
|
|
],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {
|
|
"text": "All",
|
|
"value": [
|
|
"$__all"
|
|
]
|
|
},
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"definition": "Zabbix - group",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "Group",
|
|
"options": [],
|
|
"query": {
|
|
"application": "",
|
|
"group": "/.*/",
|
|
"host": "",
|
|
"item": "",
|
|
"itemTag": "",
|
|
"queryType": "group"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"sort": 1,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allowCustomValue": true,
|
|
"current": {
|
|
"text": "Zabbix server",
|
|
"value": "Zabbix server"
|
|
},
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"definition": "Zabbix - host",
|
|
"includeAll": false,
|
|
"name": "Host",
|
|
"options": [],
|
|
"query": {
|
|
"application": "",
|
|
"group": "$Group",
|
|
"host": "/.*/",
|
|
"item": "",
|
|
"itemTag": "",
|
|
"queryType": "host"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"sort": 1,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allowCustomValue": true,
|
|
"current": {
|
|
"text": "All",
|
|
"value": "$__all"
|
|
},
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"definition": "Zabbix - item",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "Disk",
|
|
"options": [],
|
|
"query": {
|
|
"application": "",
|
|
"group": "$Group",
|
|
"host": "$Host",
|
|
"item": "/Disk utilization/",
|
|
"itemTag": "",
|
|
"queryType": "item"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "/^(\\d+)/",
|
|
"sort": 1,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allowCustomValue": true,
|
|
"current": {
|
|
"text": "All",
|
|
"value": [
|
|
"$__all"
|
|
]
|
|
},
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"definition": "Zabbix - item",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "Filesystem",
|
|
"options": [],
|
|
"query": {
|
|
"application": "",
|
|
"group": "$Group",
|
|
"host": "$Host",
|
|
"item": "/FS/",
|
|
"itemTag": "",
|
|
"queryType": "item"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "/\\[(.*?)\\]/",
|
|
"sort": 1,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allowCustomValue": true,
|
|
"current": {
|
|
"text": "All",
|
|
"value": [
|
|
"$__all"
|
|
]
|
|
},
|
|
"datasource": {
|
|
"type": "alexanderzobnin-zabbix-datasource",
|
|
"uid": "DS_ZABBIX34"
|
|
},
|
|
"definition": "Zabbix - item",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "Network",
|
|
"options": [],
|
|
"query": {
|
|
"application": "",
|
|
"group": "$Group",
|
|
"host": "$Host",
|
|
"item": "/Interface type/",
|
|
"itemTag": "",
|
|
"queryType": "item"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "/^(.*?):/",
|
|
"sort": 1,
|
|
"type": "query"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-1h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "",
|
|
"title": "Monitorizado de estado de equipos",
|
|
"uid": "8801e40d-bf8e-4ecc-8fec-3db0024fd417",
|
|
"version": 2
|
|
} |