got it to work using the following json:
{
“dashboard”: {
“annotations”: {
“list”: []
},
“description”: “This dashboard contains a set of useful dashboard template variables which can be used in other dashboards.”,
“editable”: true,
“gnetId”: null,
“graphTooltip”: 0,
“hideControls”: false,
“id”: null,
“links”: [],
“rows”: [
{
“collapse”: false,
“height”: “250px”,
“panels”: [
{
“aliasColors”: {},
“bars”: false,
“dashLength”: 10,
“dashes”: false,
“datasource”: “GroundWork”,
“description”: “Host and host service template variables example”,
“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”: [
{
“host”: “$host”,
“hostgroup”: “Linux Servers”,
“queryType”: “byHost”,
“refId”: “A”,
“service”: “$service”,
“servicegroup”: “Select service group”
}
],
“thresholds”: [],
“timeFrom”: null,
“timeShift”: null,
“title”: “Host / Service : $host/$service”,
“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”: true,
“title”: “By Group/Host/Service”,
“titleSize”: “h6”
},
{
“collapse”: false,
“height”: 250,
“panels”: [
{
“aliasColors”: {},
“bars”: false,
“dashLength”: 10,
“dashes”: false,
“datasource”: “GroundWork”,
“description”: “Service group and service group service template variables example”,
“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”: [
{
“host”: “Select host”,
“hostgroup”: “Select host group”,
“queryType”: “byServiceGroup”,
“refId”: “A”,
“service”: “$sg_service”,
“servicegroup”: “$sgroup”
}
],
“thresholds”: [],
“timeFrom”: null,
“timeShift”: null,
“title”: “Service Group / Service : $sgroup / $sg_service”,
“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”: true,
“title”: “By Service Group/Service”,
“titleSize”: “h6”
}
],
“schemaVersion”: 14,
“style”: “dark”,
“tags”: [
“GroundWork”,
“Example”
],
“templating”: {
“list”: [
{
“allValue”: null,
“current”: {
“tags”: [],
“text”: “Linux Servers”,
“value”: “Linux Servers”
},
“datasource”: “GroundWork”,
“hide”: 0,
“includeAll”: false,
“label”: “Host Group”,
“multi”: false,
“name”: “group”,
“options”: [],
“query”: “groups”,
“refresh”: 1,
“regex”: “”,
“sort”: 1,
“tagValuesQuery”: “”,
“tags”: [],
“tagsQuery”: “”,
“type”: “query”,
“useTags”: false
},
{
“allValue”: null,
“current”: {
“text”: “localhost”,
“value”: “localhost”
},
“datasource”: “GroundWork”,
“hide”: 0,
“includeAll”: false,
“label”: “Host Name”,
“multi”: false,
“name”: “host”,
“options”: [],
“query”: “hosts( { “queryType”: “byHost”, “hostgroup”: “$group” } )”,
“refresh”: 1,
“regex”: “”,
“sort”: 1,
“tagValuesQuery”: “”,
“tags”: [],
“tagsQuery”: “”,
“type”: “query”,
“useTags”: false
},
{
“allValue”: null,
“current”: {
“tags”: [],
“text”: “local_cpu_java”,
“value”: “local_cpu_java”
},
“datasource”: “GroundWork”,
“hide”: 0,
“includeAll”: false,
“label”: “Service Name for Host”,
“multi”: false,
“name”: “service”,
“options”: [],
“query”: “services( { “host”: “$host”, “queryType”: “byHost” } )”,
“refresh”: 1,
“regex”: “”,
“sort”: 1,
“tagValuesQuery”: “”,
“tags”: [],
“tagsQuery”: “”,
“type”: “query”,
“useTags”: false
},
{
“allValue”: null,
“current”: {},
“datasource”: “GroundWork”,
“hide”: 0,
“includeAll”: false,
“label”: “Service Group”,
“multi”: false,
“name”: “sgroup”,
“options”: [],
“query”: “servicegroups”,
“refresh”: 1,
“regex”: “”,
“sort”: 0,
“tagValuesQuery”: “”,
“tags”: [],
“tagsQuery”: “”,
“type”: “query”,
“useTags”: false
},
{
“allValue”: null,
“current”: {},
“datasource”: “GroundWork”,
“hide”: 0,
“includeAll”: false,
“label”: “Service Name for Service Group”,
“multi”: false,
“name”: “sg_service”,
“options”: [],
“query”: “services( { “queryType”: “byServiceGroup”, “servicegroup”: “$sgroup” } )”,
“refresh”: 1,
“regex”: “”,
“sort”: 0,
“tagValuesQuery”: “”,
“tags”: [],
“tagsQuery”: “”,
“type”: “query”,
“useTags”: false
}
]
},
“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”: “browser”,
“title”: “GW Template Variables”,
“uid”: “GWDASH0002”,
“version”: 1
},
“overwrite”: true,
“folderId”: 22
}