You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
234 lines
5.4 KiB
234 lines
5.4 KiB
<dashboard version="2" theme="dark">
|
|
<label>TrackMe - KVstore collections audit</label>
|
|
<description>This dashboard shows the size for all KVstore collections, as well as their number of objects</description>
|
|
<definition><![CDATA[
|
|
{
|
|
"dataSources": {
|
|
"ds_6rcal2tp": {
|
|
"type": "ds.search",
|
|
"options": {
|
|
"query": "| rest splunk_server=local /services/server/introspection/kvstore/collectionstats\n| mvexpand data\n| spath input=data\n| rex field=ns \"(?<App>.*)\\.(?<Collection>.*)\"\n| rex field=Collection \".*_(?<tenant_id>.*)$\"\n| eval tenant_id=if(match(Collection, \"(?:kv_trackme_backup_archives_info|kv_trackme_maintenance_mode|kv_trackme_user_pref|kv_trackme_virtual_tenants_entities_summary|kv_trackme_user_uipref)\"), \"common\", tenant_id)\n| where App=\"trackme\"\n| eval dbsize=round(size/1024/1024, 2)\n| eval indexsize=round(totalIndexSize/1024/1024, 2)\n| stats first(count) AS \"Number of Objects\" first(dbsize) AS \"Collection Size (MB)\" by tenant_id, Collection\n| sort tenant_id, Collection",
|
|
"queryParameters": {
|
|
"earliest": "-5m",
|
|
"latest": "now"
|
|
}
|
|
},
|
|
"name": "kvstore_collections_table"
|
|
},
|
|
"ds_Ux6AXFkI": {
|
|
"type": "ds.chain",
|
|
"options": {
|
|
"extend": "ds_6rcal2tp",
|
|
"query": "| search tenant_id=$tk_tenant_id$\n| stats dc(Collection) as dcount"
|
|
},
|
|
"name": "dcount_collections"
|
|
},
|
|
"ds_mJ8G3LHO": {
|
|
"type": "ds.chain",
|
|
"options": {
|
|
"extend": "ds_6rcal2tp",
|
|
"query": "| search tenant_id=$tk_tenant_id$\n| stats sum(\"Collection Size (MB)\") as total_mb"
|
|
},
|
|
"name": "sum_collections"
|
|
},
|
|
"ds_YlggFnPS": {
|
|
"type": "ds.chain",
|
|
"options": {
|
|
"extend": "ds_6rcal2tp",
|
|
"query": "| stats count by tenant_id \n| sort 0 tenant_id"
|
|
},
|
|
"name": "list_tenants"
|
|
},
|
|
"ds_avugorVn": {
|
|
"type": "ds.chain",
|
|
"options": {
|
|
"extend": "ds_6rcal2tp",
|
|
"query": "| search tenant_id=$tk_tenant_id$\n| sort tenant_id, Collection"
|
|
},
|
|
"name": "table_collections"
|
|
},
|
|
"ds_KxiIwB4q": {
|
|
"type": "ds.chain",
|
|
"options": {
|
|
"extend": "ds_6rcal2tp",
|
|
"query": "| search tenant_id=$tk_tenant_id$\n| stats sum(\"Number of Objects\") as no_records"
|
|
},
|
|
"name": "no_records"
|
|
}
|
|
},
|
|
"visualizations": {
|
|
"viz_table_1": {
|
|
"type": "splunk.singlevalue",
|
|
"options": {
|
|
"unit": "collections",
|
|
"backgroundColor": "transparent"
|
|
},
|
|
"dataSources": {
|
|
"primary": "ds_Ux6AXFkI"
|
|
},
|
|
"showProgressBar": false,
|
|
"showLastUpdated": false,
|
|
"description": ""
|
|
},
|
|
"viz_2LxfoWGB": {
|
|
"type": "splunk.table",
|
|
"options": {
|
|
"count": 15
|
|
},
|
|
"dataSources": {
|
|
"primary": "ds_avugorVn"
|
|
}
|
|
},
|
|
"viz_kvM2Jjrl": {
|
|
"type": "splunk.singlevalue",
|
|
"options": {
|
|
"unit": "MB",
|
|
"numberPrecision": 3,
|
|
"backgroundColor": "transparent"
|
|
},
|
|
"dataSources": {
|
|
"primary": "ds_mJ8G3LHO"
|
|
},
|
|
"showProgressBar": false,
|
|
"showLastUpdated": false,
|
|
"description": ""
|
|
},
|
|
"viz_aMEf9KSl": {
|
|
"type": "splunk.image",
|
|
"options": {
|
|
"preserveAspectRatio": true,
|
|
"src": "../../static/app/trackme/icons/trackme.png"
|
|
}
|
|
},
|
|
"viz_tDM7CEie": {
|
|
"type": "splunk.singlevalue",
|
|
"options": {
|
|
"unit": "records",
|
|
"backgroundColor": "transparent"
|
|
},
|
|
"dataSources": {
|
|
"primary": "ds_KxiIwB4q"
|
|
},
|
|
"showProgressBar": false,
|
|
"showLastUpdated": false,
|
|
"description": ""
|
|
}
|
|
},
|
|
"inputs": {
|
|
"input_SFyxNLxE": {
|
|
"options": {
|
|
"items": ">frame(label, value) | prepend(formattedStatics) | objects()",
|
|
"defaultValue": "*",
|
|
"token": "tk_tenant_id"
|
|
},
|
|
"title": "Tenant:",
|
|
"type": "input.dropdown",
|
|
"dataSources": {
|
|
"primary": "ds_YlggFnPS"
|
|
},
|
|
"context": {
|
|
"formattedConfig": {
|
|
"number": {
|
|
"prefix": ""
|
|
}
|
|
},
|
|
"formattedStatics": ">statics | formatByType(formattedConfig)",
|
|
"statics": [
|
|
[
|
|
"All"
|
|
],
|
|
[
|
|
"*"
|
|
]
|
|
],
|
|
"label": ">primary | seriesByName(\"tenant_id\") | renameSeries(\"label\") | formatByType(formattedConfig)",
|
|
"value": ">primary | seriesByName(\"tenant_id\") | renameSeries(\"value\") | formatByType(formattedConfig)"
|
|
}
|
|
}
|
|
},
|
|
"layout": {
|
|
"type": "absolute",
|
|
"options": {
|
|
"width": 1920,
|
|
"height": 1080
|
|
},
|
|
"structure": [
|
|
{
|
|
"item": "viz_table_1",
|
|
"type": "block",
|
|
"position": {
|
|
"x": 10,
|
|
"y": 80,
|
|
"w": 250,
|
|
"h": 60
|
|
}
|
|
},
|
|
{
|
|
"item": "viz_2LxfoWGB",
|
|
"type": "block",
|
|
"position": {
|
|
"x": 10,
|
|
"y": 140,
|
|
"w": 1750,
|
|
"h": 920
|
|
}
|
|
},
|
|
{
|
|
"item": "viz_kvM2Jjrl",
|
|
"type": "block",
|
|
"position": {
|
|
"x": 320,
|
|
"y": 80,
|
|
"w": 200,
|
|
"h": 60
|
|
}
|
|
},
|
|
{
|
|
"item": "viz_aMEf9KSl",
|
|
"type": "block",
|
|
"position": {
|
|
"x": 1630,
|
|
"y": 70,
|
|
"w": 120,
|
|
"h": 60
|
|
}
|
|
},
|
|
{
|
|
"item": "viz_tDM7CEie",
|
|
"type": "block",
|
|
"position": {
|
|
"x": 590,
|
|
"y": 80,
|
|
"w": 200,
|
|
"h": 60
|
|
}
|
|
}
|
|
],
|
|
"globalInputs": [
|
|
"input_SFyxNLxE"
|
|
]
|
|
},
|
|
"title": "TrackMe - KVstore collections audit",
|
|
"defaults": {
|
|
"dataSources": {
|
|
"ds.search": {
|
|
"options": {
|
|
"queryParameters": {
|
|
"latest": "$global_time.latest$",
|
|
"earliest": "$global_time.earliest$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "This dashboard shows the size for all KVstore collections, as well as their number of objects"
|
|
}
|
|
]]> </definition>
|
|
<meta type="hiddenElements"><![CDATA[
|
|
{
|
|
"hideEdit": false,
|
|
"hideOpenInSearch": false,
|
|
"hideExport": false
|
|
}
|
|
]]> </meta>
|
|
</dashboard> |