fix titles and some bad regex

This commit is contained in:
David Newhall II 2024-02-04 22:40:56 -08:00
parent 9f5c7f942c
commit 7f29a6531c
6 changed files with 757 additions and 757 deletions

File diff suppressed because it is too large Load Diff

View File

@ -702,7 +702,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT last(\"ip\") AS \"Address\", last(\"note\") AS \"Note\", last(\"network\") AS \"Network\" FROM \"clients\" WHERE (\"is_wired\" != 'false' AND \"name\" =~ /^${Client:regex}$/ AND \"site_name\" =~ /${Site:regex}$/) AND $timeFilter GROUP BY \"sw_port\", \"mac\", \"oui\", \"use_fixedip\", \"name\"", "query": "SELECT last(\"ip\") AS \"Address\", last(\"note\") AS \"Note\", last(\"network\") AS \"Network\" FROM \"clients\" WHERE (\"is_wired\" != 'false' AND \"name\" =~ /^${Client:regex}$/ AND \"site_name\" =~ /^${Site:regex}$/) AND $timeFilter GROUP BY \"sw_port\", \"mac\", \"oui\", \"use_fixedip\", \"name\"",
"rawQuery": false, "rawQuery": false,
"refId": "A", "refId": "A",
"resultFormat": "table", "resultFormat": "table",
@ -861,7 +861,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND (\"site_name\" =~ /${Site:regex}$/ AND \"name\" =~ /^${Wired:regex}$/ AND sw_name =~ /${Switch:regex}$/ ) GROUP BY \"hostname\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND (\"site_name\" =~ /^${Site:regex}$/ AND \"name\" =~ /^${Wired:regex}$/ AND sw_name =~ /^${Switch:regex}$/ ) GROUP BY \"hostname\"",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -904,7 +904,7 @@
"hide": false, "hide": false,
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND (\"site_name\" =~ /${Site:regex}$/ AND \"name\" =~ /^${Wireless:regex}$/ AND ap_name =~ /${AP:regex}$/ ) GROUP BY \"channel\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND (\"site_name\" =~ /^${Site:regex}$/ AND \"name\" =~ /^${Wireless:regex}$/ AND ap_name =~ /$AP$/ ) GROUP BY \"channel\"",
"rawQuery": true, "rawQuery": true,
"refId": "B", "refId": "B",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -986,7 +986,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT count(distinct(\"hostname\")) FROM \"clients\" WHERE $timeFilter AND \"ap_name\" =~ /${AP:regex}$/ AND \"site_name\" =~ /${Site:regex}$/ AND \"name\" =~ /^${Wireless:regex}$/ GROUP BY radio_proto", "query": "SELECT count(distinct(\"hostname\")) FROM \"clients\" WHERE $timeFilter AND \"ap_name\" =~ /$AP$/ AND \"site_name\" =~ /^${Site:regex}$/ AND \"name\" =~ /^${Wireless:regex}$/ GROUP BY radio_proto",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -1074,7 +1074,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND site_name =~ /${Site:regex}$/ AND ((\"name\" =~ /^${Wireless:regex}$/ AND \"ap_name\" =~ /^${AP:regex}$/) OR (\"name\" =~ /^${Wired:regex}$/ AND \"sw_name\" =~ /${Switch:regex}$/ )) GROUP BY \"oui\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND site_name =~ /^${Site:regex}$/ AND ((\"name\" =~ /^${Wireless:regex}$/ AND \"ap_name\" =~ /^${AP:regex}$/) OR (\"name\" =~ /^${Wired:regex}$/ AND \"sw_name\" =~ /^${Switch:regex}$/ )) GROUP BY \"oui\"",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -1160,7 +1160,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND site_name =~ /${Site:regex}$/ AND ((\"name\" =~ /^${Wireless:regex}$/ AND \"ap_name\" =~ /^${AP:regex}$/) OR (\"name\" =~ /^${Wired:regex}$/ AND \"sw_name\" =~ /${Switch:regex}$/ )) GROUP BY \"os_class\", \"os_name\", \"dev_cat\", \"dev_family\", \"dev_id\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 5m AND site_name =~ /^${Site:regex}$/ AND ((\"name\" =~ /^${Wireless:regex}$/ AND \"ap_name\" =~ /^${AP:regex}$/) OR (\"name\" =~ /^${Wired:regex}$/ AND \"sw_name\" =~ /^${Switch:regex}$/ )) GROUP BY \"os_class\", \"os_name\", \"dev_cat\", \"dev_family\", \"dev_id\"",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -1880,7 +1880,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT \"ip\" FROM \"clients\" WHERE \"use_fixedip\" != 'true' AND \"name\" =~ /^${Client:regex}$/ AND (\"ap_name\" =~ /^${AP:regex}$/ OR \"sw_name\" =~ /${Switch:regex}$/) AND \"site_name\" =~ /^${Site:regex}$/ AND $timeFilter GROUP BY \"name\"", "query": "SELECT \"ip\" FROM \"clients\" WHERE \"use_fixedip\" != 'true' AND \"name\" =~ /^${Client:regex}$/ AND (\"ap_name\" =~ /^${AP:regex}$/ OR \"sw_name\" =~ /^${Switch:regex}$/) AND \"site_name\" =~ /^${Site:regex}$/ AND $timeFilter GROUP BY \"name\"",
"rawQuery": false, "rawQuery": false,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -1934,7 +1934,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT \"ip\" FROM \"clients\" WHERE \"use_fixedip\" != 'true' AND \"name\" =~ /^${Client:regex}$/ AND (\"ap_name\" =~ /^${AP:regex}$/ OR \"sw_name\" =~ /${Switch:regex}$/) AND \"site_name\" =~ /^${Site:regex}$/ AND $timeFilter GROUP BY \"name\"", "query": "SELECT \"ip\" FROM \"clients\" WHERE \"use_fixedip\" != 'true' AND \"name\" =~ /^${Client:regex}$/ AND (\"ap_name\" =~ /^${AP:regex}$/ OR \"sw_name\" =~ /^${Switch:regex}$/) AND \"site_name\" =~ /^${Site:regex}$/ AND $timeFilter GROUP BY \"name\"",
"rawQuery": false, "rawQuery": false,
"refId": "B", "refId": "B",
"resultFormat": "time_series", "resultFormat": "time_series",

View File

@ -3018,7 +3018,7 @@
"timeFrom": null, "timeFrom": null,
"timeRegions": [], "timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Site ${Site:regex} Data Transfer", "title": "Site $Site Data Transfer",
"tooltip": { "tooltip": {
"shared": true, "shared": true,
"sort": 2, "sort": 2,
@ -3208,7 +3208,7 @@
"timeFrom": null, "timeFrom": null,
"timeRegions": [], "timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Site ${Site:regex} Client Counts", "title": "Site $Site Client Counts",
"tooltip": { "tooltip": {
"shared": true, "shared": true,
"sort": 2, "sort": 2,
@ -3431,8 +3431,8 @@
} }
} }
], ],
"repeat": "site", "repeat": "Site",
"title": "Site: ${Site:regex}", "title": "Site: $Site",
"type": "row" "type": "row"
} }
], ],

View File

@ -186,7 +186,7 @@
"measurement": "uap", "measurement": "uap",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE $timeFilter AND ap_name =~ /${AP:regex}$/ AND site_name =~ /${Site:regex}$/ GROUP BY \"channel\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE $timeFilter AND ap_name =~ /^${AP:regex}$/ AND site_name =~ /^${Site:regex}$/ GROUP BY \"channel\"",
"rawQuery": true, "rawQuery": true,
"refId": "B", "refId": "B",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -265,7 +265,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE ($timeFilter AND ap_name =~ /${AP:regex}$/ AND site_name =~ /${Site:regex}$/) GROUP BY \"radio_proto\", \"ap_name\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE ($timeFilter AND ap_name =~ /^${AP:regex}$/ AND site_name =~ /^${Site:regex}$/) GROUP BY \"radio_proto\", \"ap_name\"",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -348,7 +348,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE $timeFilter AND ap_name =~ /${AP:regex}$/ AND site_name =~ /${Site:regex}$/ GROUP BY \"oui\"", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE $timeFilter AND ap_name =~ /^${AP:regex}$/ AND site_name =~ /^${Site:regex}$/ GROUP BY \"oui\"",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -460,7 +460,7 @@
"measurement": "uap_radios", "measurement": "uap_radios",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE ($timeFilter AND ap_name =~ /${AP:regex}$/ AND site_name =~ /${Site:regex}$/)", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE ($timeFilter AND ap_name =~ /^${AP:regex}$/ AND site_name =~ /^${Site:regex}$/)",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -588,7 +588,7 @@
"measurement": "clients", "measurement": "clients",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "select count(distinct(hostname)) FROM \"clients\" WHERE ($timeFilter AND ap_name =~ /${AP:regex}$/ AND site_name =~ /${Site:regex}$/ AND is_guest = \"true\")", "query": "select count(distinct(hostname)) FROM \"clients\" WHERE ($timeFilter AND ap_name =~ /^${AP:regex}$/ AND site_name =~ /^${Site:regex}$/ AND is_guest = \"true\")",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -5181,14 +5181,14 @@
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_UNIFI_POLLER}", "datasource": "${DS_UNIFI_POLLER}",
"definition": "show tag values from \"uap\" with key=\"site_name\" where source =~ /${Controller:regex}$/", "definition": "show tag values from \"uap\" with key=\"site_name\" where source =~ /^${Controller:regex}$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"label": "", "label": "",
"multi": true, "multi": true,
"name": "Site", "name": "Site",
"options": [], "options": [],
"query": "show tag values from \"uap\" with key=\"site_name\" where source =~ /${Controller:regex}$/", "query": "show tag values from \"uap\" with key=\"site_name\" where source =~ /^${Controller:regex}$/",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
@ -5203,14 +5203,14 @@
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_UNIFI_POLLER}", "datasource": "${DS_UNIFI_POLLER}",
"definition": "show tag values from \"uap\" with key=\"name\" where site_name =~ /${Site:regex}$/", "definition": "show tag values from \"uap\" with key=\"name\" where site_name =~ /^${Site:regex}$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"label": "UniFi AP:", "label": "UniFi AP:",
"multi": true, "multi": true,
"name": "AP", "name": "AP",
"options": [], "options": [],
"query": "show tag values from \"uap\" with key=\"name\" where site_name =~ /${Site:regex}$/", "query": "show tag values from \"uap\" with key=\"name\" where site_name =~ /^${Site:regex}$/",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,

View File

@ -4201,14 +4201,14 @@
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_UNIFI_POLLER}", "datasource": "${DS_UNIFI_POLLER}",
"definition": "show tag values from \"usg\" with key=\"site_name\" where source =~ /${Controller:regex}$/", "definition": "show tag values from \"usg\" with key=\"site_name\" where source =~ /^${Controller:regex}$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"label": "", "label": "",
"multi": true, "multi": true,
"name": "Site", "name": "Site",
"options": [], "options": [],
"query": "show tag values from \"usg\" with key=\"site_name\" where source =~ /${Controller:regex}$/", "query": "show tag values from \"usg\" with key=\"site_name\" where source =~ /^${Controller:regex}$/",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
@ -4223,14 +4223,14 @@
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "${DS_UNIFI_POLLER}", "datasource": "${DS_UNIFI_POLLER}",
"definition": "show tag values from \"usg\" with key=\"name\" where site_name =~ /${Site:regex}$/", "definition": "show tag values from \"usg\" with key=\"name\" where site_name =~ /^${Site:regex}$/",
"hide": 2, "hide": 2,
"includeAll": true, "includeAll": true,
"label": "UniFi USG:", "label": "UniFi USG:",
"multi": false, "multi": false,
"name": "host", "name": "host",
"options": [], "options": [],
"query": "show tag values from \"usg\" with key=\"name\" where site_name =~ /${Site:regex}$/", "query": "show tag values from \"usg\" with key=\"name\" where site_name =~ /^${Site:regex}$/",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,

View File

@ -1924,7 +1924,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -3005,7 +3005,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -3172,7 +3172,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -3397,7 +3397,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -3647,7 +3647,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -3849,7 +3849,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -4009,7 +4009,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -4169,7 +4169,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }
@ -4329,7 +4329,7 @@
"condition": "AND", "condition": "AND",
"key": "port_id", "key": "port_id",
"operator": "=~", "operator": "=~",
"value": "/^$Port$/" "value": "/^${Port:regex}$/"
} }
] ]
} }