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.
183 lines
8.0 KiB
183 lines
8.0 KiB
<form version="1.1">
|
|
<label>Virtual Machine Snapshots - VMware</label>
|
|
<row>
|
|
<html>
|
|
<p>VM Snapshots view provides a user with information about VM snapshotting activities across his environment.</p>
|
|
<p>The view provides with useful information like number of snapshots per VM, space used by the snapshots and other interesting details about the individual snapshot files like creation dates, sizes etc.</p>
|
|
<p>This view is very useful in tracking the usage of resources that snapshots consume and act on it by consolidating, migrating or deleting them.</p>
|
|
<p><b>Additional information about fields</b></p>
|
|
<p><b>Snapshot Space-</b> This field shows space used by vmsn files. A vmsn file is used to store the exact state of the virtual machine when the snapshot was taken.</p>
|
|
<p><b>Total Space-</b> In addition to the vmsn files a snapshot may contain other files like vmsd(stores the metadata or structure of the snapshot tree), vmdk(descriptor files) and -delta.vmdk(file that contains the changes done on this snapshot in relation with its parents). Total Space gives the space used by vmsn files along with these other files.</p>
|
|
</html>
|
|
</row>
|
|
<row>
|
|
<panel>
|
|
<title>Snapshots present on VM</title>
|
|
<input type="dropdown" token="vc" searchWhenChanged="true">
|
|
<label>VirtualCenter:</label>
|
|
<fieldForLabel>name</fieldForLabel>
|
|
<fieldForValue>vc</fieldForValue>
|
|
<search>
|
|
<query>| inputlookup Entity | search type=RootFolder | table name | sort name | rename name AS vc</query>
|
|
</search>
|
|
<selectFirstChoice>true</selectFirstChoice>
|
|
<change>
|
|
<unset token="panel_show"></unset>
|
|
</change>
|
|
</input>
|
|
<input type="time" token="timerange1">
|
|
<default>
|
|
<earliest>-4h</earliest>
|
|
<latest>now</latest>
|
|
</default>
|
|
<change>
|
|
<unset token="panel_show"></unset>
|
|
</change>
|
|
</input>
|
|
<html>
|
|
<p>Click on a datastore to see snapshot details on it</p>
|
|
</html>
|
|
<table>
|
|
<search>
|
|
<query>|`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type)
|
|
from datamodel=VMwareInventory
|
|
where host="$vc$"
|
|
groupby _time host, Inventory.moid, Inventory.filename Inventory.filetype
|
|
|`process_inventory`
|
|
| stats first(filesize) AS Filesize,
|
|
first(filedatastore) AS Datastore
|
|
by host, moid, filename, filetype
|
|
| stats sum(Filesize) AS totalSpace
|
|
by host, moid, Datastore, filetype, filename
|
|
| eval vmsnspace = if (lower(filetype)=="snapshotdata", totalSpace, 0 )
|
|
| stats list(filename) AS "SnapshotFiles",
|
|
sum(totalSpace) AS TotalSnapSpace,
|
|
sum(vmsnspace) AS VmsnSpace,
|
|
count by host, moid, Datastore
|
|
| search VmsnSpace > 0
|
|
| eval TotalSpace=`format_bytes(TotalSnapSpace)`
|
|
| eval SnapshotSpace= `format_bytes(VmsnSpace)`
|
|
| fields - totalSpace vmsnspace
|
|
| lookup Entity moid AS moid, host AS host OUTPUT name AS name
|
|
| lookup Entity lowername AS Datastore, host AS host OUTPUT moid AS HIDE-Datastore-moid
|
|
| rename count AS "TotalFiles",
|
|
host AS VirtualCenter,
|
|
moid AS HIDE-VirtualMachine-moid,
|
|
name AS VirtualMachine
|
|
| table VirtualCenter VirtualMachine Datastore SnapshotFiles TotalFiles SnapshotSpace TotalSpace</query>
|
|
<earliest>$timerange1.earliest$</earliest>
|
|
<latest>$timerange1.latest$</latest>
|
|
</search>
|
|
<option name="drilldown">cell</option>
|
|
<drilldown>
|
|
<set token="panel_show">True</set>
|
|
<set token="datastore_for">$row.Datastore$</set>
|
|
</drilldown>
|
|
</table>
|
|
</panel>
|
|
</row>
|
|
<row>
|
|
<panel depends="$panel_show$">
|
|
<title>Snapshot details for $datastore_for$</title>
|
|
<table>
|
|
<search>
|
|
<query>|`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type)
|
|
from datamodel=VMwareInventory
|
|
where host="$vc$"
|
|
groupby _time,host, Inventory.moid, Inventory.filename
|
|
|`process_inventory`
|
|
| where filedatastore="$datastore_for$" AND lower(filetype)="snapshotdata"
|
|
| stats first(snapshotName) AS SnapshotName,
|
|
first(snapshotState) AS State,
|
|
first(snapshotTime) AS CreateTime,
|
|
first(snapshotDescr) AS Description,
|
|
first(snapshotDepth) as Depth,
|
|
first(filesize) AS size BY filename
|
|
| eval CreateTimeEpoch=strptime(CreateTime,"%Y-%m-%d %H:%M:%S.%Q")
|
|
| convert ctime(CreateTimeEpoch) AS CreatedTime
|
|
| eval Size =`format_bytes(size)`
|
|
| fields - splitSubPath, CreateTime, CreateTimeEpoch, size
|
|
| rename filename as Filename</query>
|
|
<earliest>$timerange1.earliest$</earliest>
|
|
<latest>$timerange1.latest$</latest>
|
|
</search>
|
|
<option name="drilldown">none</option>
|
|
</table>
|
|
</panel>
|
|
</row>
|
|
<row>
|
|
<panel>
|
|
<title>Snapshot Statistics for Datastore</title>
|
|
<input type="dropdown" token="host" searchWhenChanged="true">
|
|
<label>VirtualCenter:</label>
|
|
<fieldForLabel>host</fieldForLabel>
|
|
<fieldForValue>host</fieldForValue>
|
|
<search>
|
|
<query>| inputlookup Entity | search type="Datastore" | dedup host | table host | sort host</query>
|
|
</search>
|
|
<selectFirstChoice>true</selectFirstChoice>
|
|
</input>
|
|
<input type="dropdown" token="datastore" searchWhenChanged="true">
|
|
<label>Datastore:</label>
|
|
<fieldForLabel>datastore</fieldForLabel>
|
|
<fieldForValue>lowername</fieldForValue>
|
|
<search>
|
|
<query>| inputlookup Entity | search type="Datastore" | search host="$host$" | dedup name | table host, name, moid | sort name | eval lowername=lower(name) | rename name AS datastore</query>
|
|
</search>
|
|
<selectFirstChoice>true</selectFirstChoice>
|
|
</input>
|
|
<input type="time" token="timerange2">
|
|
<default>
|
|
<earliest>-4h</earliest>
|
|
<latest>now</latest>
|
|
</default>
|
|
</input>
|
|
<chart>
|
|
<title>Snapshot space used on disk</title>
|
|
<search>
|
|
<query>
|
|
|`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type)
|
|
from datamodel=VMwareInventory
|
|
where host="$host$"
|
|
groupby _time, host, Inventory.moid, Inventory.filename span=10m
|
|
|`process_inventory`
|
|
| where lower(filedatastore)="$datastore$" AND lower(filetype)="snapshotdata"
|
|
| stats first(filesize) as Filesize by _time, host, moid, filename
|
|
| timechart minspan=10m sum(Filesize) as "SnapshotSpace"
|
|
</query>
|
|
<earliest>$timerange2.earliest$</earliest>
|
|
<latest>$timerange2.latest$</latest>
|
|
</search>
|
|
<option name="charting.chart">line</option>
|
|
<option name="charting.drilldown">none</option>
|
|
<option name="refresh.display">progressbar</option>
|
|
<option name="charting.chart.nullValueMode">connect</option>
|
|
<option name="charting.axisTitleX.text">Time</option>
|
|
<option name="charting.axisTitleY.text">Snapshot Space In bytes</option>
|
|
</chart>
|
|
<chart>
|
|
<title>Number of Snapshots on datastore</title>
|
|
<search>
|
|
<query>
|
|
|`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type)
|
|
from datamodel=VMwareInventory
|
|
where host="$host$"
|
|
groupby _time, host, Inventory.moid, Inventory.filename span=10m
|
|
|`process_inventory`
|
|
| where lower(filedatastore)="$datastore$" AND lower(filetype)="snapshotdata"
|
|
| stats first(filesize) as Filesize by _time, host, moid, filename
|
|
| timechart minspan=10m dc(filename) AS "Total count"
|
|
</query>
|
|
<earliest>$timerange2.earliest$</earliest>
|
|
<latest>$timerange2.latest$</latest>
|
|
</search>
|
|
<option name="charting.chart">line</option>
|
|
<option name="charting.drilldown">none</option>
|
|
<option name="refresh.display">progressbar</option>
|
|
<option name="charting.chart.nullValueMode">connect</option>
|
|
<option name="charting.axisTitleX.text">Time</option>
|
|
<option name="charting.axisTitleY.text">Number of Snapshots</option>
|
|
</chart>
|
|
</panel>
|
|
</row>
|
|
</form> |