- Create a column in Disk sampler and call it "freeSpace in GB" using compute engine.
- Create a "path aliases" rule and call it "conversion".
- Create a rule that will actually do the conversion. (below is the xml)
<
rule
name
=
"Disk space conversion"
>
<
targets
>
<
target
>/geneos/gateway/directory/probe/managedEntity/sampler/dataview/rows/row/cell[(@column="freeSpace in GB")]</
target
>
</
targets
>
<
priority
>1</
priority
>
<
pathAliases
>
<
pathAlias
name
=
"conversion"
>../cell[(@column="freeSpace")]</
pathAlias
>
</
pathAliases
>
<
block
>
<
transaction
>
<
update
>
<
property
>@value</
property
>
<
format
>
<
string
>%0.2f GB</
string
>
<
divide
>
<
dataItem
>
<
pathAlias
ref
=
"conversion"
></
pathAlias
>
<
property
>@value</
property
>
</
dataItem
>
<
integer
>1024</
integer
>
</
divide
>
</
format
>
</
update
>
</
transaction
>
</
block
>
</
rule
>
using format function you can set the number of decimal places shown in the DV.
Below is the DV result.
-
Tags:
- disk
- rules
Comments
2 comments
Where is the xml?
This has been corrected
Please sign in to leave a comment.