-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.xml
271 lines (241 loc) · 11.6 KB
/
dashboard.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<form version="1.1" theme="light">
<label>DDAA/DDAS Projections (With Calc Table)</label>
<!-- John Ciavarella 2022 -->
<fieldset submitButton="false" autoRun="false"></fieldset>
<row>
<panel>
<html>
<br/>
<font size="8" color="green">
<b>Current Configurations </b>
</font>
<h1>Current Sizing</h1>
<i>This dashboard helps give you an overview of your current Splunk Cloud environment, usage and future projections on storage based on that information.</i>
<ul>
<li>
<b>Index</b> - Your Splunk index</li>
<li>
<b>DDAS Retention</b> - This is your currently configured DDAS (Searchable) storage.</li>
<li>
<b>DDAA Retention</b> - This is your currently configured DDAA (Archived) storage.</li>
<li>
<b>Index Usage</b> - What this specific index is currently utilizing today in DDAA (searchable)</li>
<li>
<b>30 Day Data</b> - This is the total of 30 days of ingestion for this index.</li>
<li>
<b>Daily Ingest</b> - This is the DAILY ingest for this index</li>
<li>
<b>Projected DDAS</b> - We calculate based on your 30 day rolling average of ingestion, how much DDAS storage you will need based on your current DDAS retention settings. </li>
<li>
<b>Projected DDAA</b> - We calculate based on your 30 day rolling average of ingestion, how much DDAA storage you will need based on your current DDAA retention settings. </li>
</ul>
</html>
</panel>
</row>
<row>
<panel>
<input type="radio" token="internal">
<label>Show internal indexes</label>
<choice value="true">True</choice>
<choice value="| search NOT Index=_*">False</choice>
<search>
<query>|makeresults</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<initialValue>| search NOT Index=_*</initialValue>
<fieldForLabel>a</fieldForLabel>
<fieldForValue>a</fieldForValue>
</input>
<input type="radio" token="show_blocks">
<label>Show storage blocks</label>
<choice value="| eval blocks_ddas=projected_ddas_storage_gb/500 | eval blocks_ddas=round(if(blocks_ddas>0, if(blocks_ddas>1, blocks_ddas, 1), "f"),0) | eval blocks_ddaa=projected_ddaa_storage_gb/500 | eval blocks_ddaa=round(if(blocks_ddaa>0, if(blocks_ddaa>1, blocks_ddaa, 1), "f"),0)">True</choice>
<choice value="">False</choice>
<search>
<query>|makeresults</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<fieldForLabel>a</fieldForLabel>
<fieldForValue>a</fieldForValue>
<default></default>
</input>
<table>
<search>
<query>| rest timeout=600 splunk_server=local /services/data/distributed-indexes
| fields title datatype maxTotalDataSizeMB frozenTimePeriodInSecs minTime coldPath.maxDataSizeMB homePath.maxDataSizeMB, homePath, coldPath, cold_bucket_size, total_size, total_bucket_count, totalEventCount, archiver.coldStorageRetentionPeriod, archiver.enableDataArchive rawSizeBytes
| eval disk_usage_gb = if(isnotnull(rawSizeBytes), round(rawSizeBytes/1024/1024/1024, 2), 0)
| eval frozenTimePeriodDay = round(frozenTimePeriodInSecs / 86400, 0)
| eval frozenTimePeriodDay = if(isnull(frozenTimePeriodDay) OR frozenTimePeriodDay == 0, "unlimited", frozenTimePeriodDay)
| fields title, disk_usage_gb, total_bucket_count, totalEventCount, currentDBSizeGB, frozenTimePeriodDay, archiver.coldStorageRetentionPeriod archiver.enableDataArchive
| rename title as Index, disk_usage_gb as "Index Usage (GB)",totalEventCount as "Total Event Count"
| join type=outer Index [ search earliest=-30d
index=_internal source=*license_usage.log type=Usage|stats sum(b) as Bytes by idx st
|eval GB=round(Bytes/1024/1024/1024,3)
| rename idx as Index | rename st as sourcetype
| stats sum(GB) as ingested_gb_30day by Index
]
```show projected DDAS requirements as per current retention settings```
| eval projected_ddas_storage_gb='ingested_gb_30day'/30*'frozenTimePeriodDay'
| eval ddaa_days='archiver.coldStorageRetentionPeriod'-frozenTimePeriodDay
| eval projected_ddaa_storage_gb='ingested_gb_30day'/30*'ddaa_days'
```show DDAA/DDAS blocks```
```| eval blocks_ddas=round(projected_ddas_storage_gb/500,0) | eval blocks_ddaa=round(projected_ddaa_storage_gb/500,0)```
$show_blocks$
| eval daily_ingest='ingested_gb_30day'/30
| rename frozenTimePeriodDay as "DDAS Retention (Searchable)"
| rename ingested_gb_30day as "30 day data (GB)"
| rename archiver.coldStorageRetentionPeriod as "DDAA Retention (Archive)"
| rename daily_ingest as "Daily Ingest (GB)"
| fields Index "DDAS Retention (Searchable)" "DDAA Retention (Archive)" "Index Usage (GB)" "30 day data (GB)" "Daily Ingest (GB)" projected_ddas_storage_gb, projected_ddaa_storage_gb
```| addcoltotals *gb*```
$internal$
$show_blocks$</query>
<earliest>-30d@d</earliest>
<latest>now</latest>
</search>
<option name="count">20</option>
<option name="drilldown">none</option>
<format type="number" field="projected_ddas_storage_gb">
<option name="precision">3</option>
</format>
<format type="color" field="DDAA Retention (Days)">
<colorPalette type="map"></colorPalette>
</format>
</table>
</panel>
</row>
<row>
<panel>
<html>
<br/>
<font size="8" color="green">
<b>Calculators</b>
</font>
<h1>DDAA/DDAS Forecasting Tool </h1>
<i>This panel is a calculator to help understand by index if you change your DDAA or DDAS retention settings, how much data would be needed in both locations.</i>
</html>
</panel>
</row>
<row>
<panel>
<table>
<search>
<query>| rest timeout=600 splunk_server=local /services/data/distributed-indexes
| fields title datatype maxTotalDataSizeMB frozenTimePeriodInSecs minTime coldPath.maxDataSizeMB homePath.maxDataSizeMB, homePath, coldPath, cold_bucket_size, total_size, total_bucket_count, totalEventCount, archiver.coldStorageRetentionPeriod, archiver.enableDataArchive rawSizeBytes
| eval disk_usage_gb = if(isnotnull(rawSizeBytes), round(rawSizeBytes/1024/1024/1024, 2), 0)
| eval frozenTimePeriodDay = round(frozenTimePeriodInSecs / 86400, 0)
| eval frozenTimePeriodDay = if(isnull(frozenTimePeriodDay) OR frozenTimePeriodDay == 0, "unlimited", frozenTimePeriodDay)
| fields title, disk_usage_gb, total_bucket_count, totalEventCount, currentDBSizeGB, frozenTimePeriodDay, archiver.coldStorageRetentionPeriod archiver.enableDataArchive
| rename title as Index, disk_usage_gb as "Index Usage (GB)",totalEventCount as "Total Event Count"
| join type=outer Index [ search earliest=-30d
index=_internal source=*license_usage.log type=Usage|stats sum(b) as Bytes by idx st
|eval GB=round(Bytes/1024/1024/1024,3)
| rename idx as Index | rename st as sourcetype
| stats sum(GB) as ingested_gb_30day by Index
]
```THIS IS THE JOIN STATEMENT```
| join type=left Index [ inputlookup ddaX_retention.csv
| dedup selected_index sortby - modtime
| fields selected_index hot_retention cold_retention indexusage projectedddass projectedddaa
| rename hot_retention AS frozenTimePeriodDay cold_retention AS archiver.coldStorageRetentionPeriod selected_index AS Index
]
```THIS IS THE JOIN STATEMENT```
```show projected DDAS requirements as per current retention settings```
| eval projected_ddas_storage_gb='ingested_gb_30day'/30*'frozenTimePeriodDay'
| eval ddaa_days='archiver.coldStorageRetentionPeriod'-frozenTimePeriodDay
| eval projected_ddaa_storage_gb='ingested_gb_30day'/30*'ddaa_days'
```show DDAA/DDAS blocks```
```| eval blocks_ddas=round(projected_ddas_storage_gb/500,0) | eval blocks_ddaa=round(projected_ddaa_storage_gb/500,0)```
$show_blocks$
| eval daily_ingest='ingested_gb_30day'/30
| rename frozenTimePeriodDay as "DDAS Retention (Searchable)"
| rename ingested_gb_30day as "30 day data (GB)"
| rename archiver.coldStorageRetentionPeriod as "DDAA Retention (Archive)"
| rename daily_ingest as "Daily Ingest (GB)"
```this is to just force the reload```
| eval just_to_churn=$hot_retention$ | eval just_to_churn2=$cold_retention$
| fields Index "DDAS Retention (Searchable)" "DDAA Retention (Archive)" "Index Usage (GB)" "30 day data (GB)" "Daily Ingest (GB)" projected_ddas_storage_gb, projected_ddaa_storage_gb
$internal$
$show_blocks$
| addcoltotals</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="count">15</option>
<option name="drilldown">none</option>
<format type="number" field="projected_ddaa_storage_gb">
<option name="precision">3</option>
</format>
</table>
</panel>
</row>
<row>
<panel>
<title>Projected Storage Needs</title>
<input type="dropdown" token="index_projection" searchWhenChanged="true">
<label>Index</label>
<fieldForLabel>index</fieldForLabel>
<fieldForValue>index</fieldForValue>
<search>
<query>| rest /services/data/indexes | fields id | rex field=id "(?<index>[^\/]+$)" | dedup index | fields index</query>
<earliest>0</earliest>
<latest></latest>
</search>
</input>
<input type="text" token="hot_retention" searchWhenChanged="true">
<label>Days retention Searchable (DDAS)</label>
<default>30</default>
</input>
<input type="text" token="cold_retention" searchWhenChanged="true">
<label>Days retention Archive (DDAA)</label>
<default>90</default>
<initialValue>90</initialValue>
</input>
<single>
<title>DDAS (GB)</title>
<search>
<query>earliest=-30d
index=_internal source=*license_usage.log type=Usage idx=$index_projection$
|stats sum(b) as Bytes by idx st
|eval GB=round(Bytes/1024/1024/1024,3)
| rename idx as Index | rename st as sourcetype
| stats sum(GB) as ingested_gb_30day
| eval dailygb=ingested_gb_30day/30
| eval ddas=$hot_retention$*dailygb
| eval selected_index=$index_projection|s$ | eval hot_retention=$hot_retention$ | eval cold_retention=$cold_retention$ | eval modtime=now()
| fields ddas modtime selected_index ingested_gb_30day cold_retention hot_retention dailygb
| outputlookup append=true ddaX_retention.csv</query>
<earliest>0</earliest>
<latest></latest>
</search>
<option name="drilldown">none</option>
<option name="numberPrecision">0.00</option>
<option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
<option name="refresh.display">progressbar</option>
<option name="unit">gb</option>
</single>
<single>
<title>DDAA (GB)</title>
<search>
<query>index=_internal source=*license_usage.log type=Usage idx=$index_projection$
|stats sum(b) as Bytes by idx st
|eval GB=round(Bytes/1024/1024/1024,3)
| rename idx as Index | rename st as sourcetype
| stats sum(GB) as ingested_gb_30day
| eval dailygb=ingested_gb_30day/30
| eval cold=$cold_retention$-$hot_retention$
| eval ddas=cold*dailygb
| fields ddas</query>
<earliest>0</earliest>
<latest></latest>
</search>
<option name="drilldown">none</option>
<option name="numberPrecision">0.00</option>
<option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
<option name="refresh.display">progressbar</option>
<option name="unit">gb</option>
</single>
</panel>
</row>
</form>