-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexternals.xml
83 lines (79 loc) · 3.77 KB
/
externals.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<dashboard>
<label>DNS and E-groups status</label>
<row>
<panel>
<title>DNS Status</title>
<table id="dns_status">
<searchString>| dbquery "TSMMS" "SELECT SERIAL, UPDATED FROM DNS_ATTR"
| appendcols [| dbquery "TSMMS" "SELECT count(*) AS NODES_DNS FROM ZONE_BACKUP"]
| appendcols [search `lastdb("nodes")` | stats dc(NODE_NAME) AS NODES_TSMDB]
| eval "Correct?"=if('NODES_DNS'=='NODES_TSMDB', "yes", "no")
| eval "Last Update"=strftime(UPDATED, "%F %T")
| rename SERIAL AS "DNS Serial Number" NODES_DNS AS "Nodes in DNS" NODES_TSMDB AS "Nodes in TSMDB"
| table "DNS Serial Number" "Last Update" "Nodes in DNS" "Nodes in TSMDB" "Correct?"
</searchString>
<earliestTime>-7d</earliestTime>
<option name="drilldown">cell</option>
<drilldown>
<link field="Correct?">search?earliest=-24h@h&q=| set diff [| dbquery "TSMMS" "SELECT NAME, ALIAS AS NODE_NAME FROM ZONE_BACKUP" | rename NAME AS tsmserver | fields tsmserver NODE_NAME] [search `lastdb("nodes")` | search REPL_MODE!=RECEIVE | sort LOCKED, -REG_TIME | stats first(tsmserver) AS tsmserver by NODE_NAME]</link>
</drilldown>
</table>
</panel>
<panel>
<title>E-group Status</title>
<table id="egroup_status">
<searchString>`lastdb("nodes")`
| lookup serverinfo TSMSERVER AS tsmserver OUTPUTNEW BUILDING SERVER_TYPE SERVER_STATUS
| search SERVER_STATUS=production SERVER_TYPE=user
| dedup tsmserver
| eval egroupname="it-service-backup-"+lower(tsmserver)
| fields egroupname
| append [search `lastdb("nodes")`
| lookup serverinfo TSMSERVER AS tsmserver OUTPUTNEW BUILDING SERVER_TYPE SERVER_STATUS
| search SERVER_STATUS=production SERVER_TYPE=user
| dedup BUILDING
| eval egroupname="it-service-backup-b"+BUILDING
| fields egroupname]
| checkegroups
| where contact!="it-service-backup-notify" AND contact!="tsm-admin" AND contact!="tsm.support"
| stats count AS egroup_count by egroupname
| append [search `lastdb("nodes")`
| lookup serverinfo TSMSERVER AS tsmserver OUTPUTNEW SERVER_TYPE SERVER_STATUS
| search SERVER_STATUS=production SERVER_TYPE=user
| eval CONTACT=lower(CONTACT)
| where CONTACT!="tsm-admin" AND CONTACT!="tsm.support"
| stats dc(CONTACT) AS tsmdb_count by tsmserver
| eval egroupname="it-service-backup-"+lower(tsmserver)
| fields egroupname tsmdb_count]
| append [search `lastdb("nodes")`
| lookup serverinfo TSMSERVER AS tsmserver
| search SERVER_STATUS=production SERVER_TYPE=user
| stats dc(tsmserver) AS tsmdb_count by BUILDING
| eval egroupname="it-service-backup-b"+BUILDING
| fields egroupname tsmdb_count]
| stats sum(*_count) AS *_count by egroupname
| eval "Correct?"=if('egroup_count'=='tsmdb_count', "yes", "no")
| rename egroupname AS "E-group" egroup_count AS "Members in e-group" tsmdb_count AS "Contacts in TSMDB"
| table "E-group" "Members in e-group" "Contacts in TSMDB" "Correct?"
</searchString>
<earliestTime>-7d</earliestTime>
<option name="count">35</option>
</table>
</panel>
<panel>
<title>SLS Data Status</title>
<table id="sls_status">
<searchString>| importutil https https://druid.cern.ch/static/sls-status.xml
| xmlkv
| eval timestamp=strftime(strptime(timestamp, "%FT%T"), "%F %T")
| stats first(timestamp) AS "Last sls-status update"
| appendcols [| importutil https https://druid.cern.ch/static/sls-accounting.xml
| xmlkv
| rename day AS "Last sls-accounting update"
| fields "Last sls-accounting update"]
</searchString>
<earliestTime>-24h</earliestTime>
</table>
</panel>
</row>
</dashboard>