I have multiple triggers that are tripped when my disk space space drops below 5, 10 or 20 percent.
{Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<5
{Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<10
{Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<20
(I added the triggers into the windows template so as that they will apply to any host with that template)
When these triggers are tripped an action takes place to send me an email notifying me of the disk space problem. I know how to get the percentage of disk space free but how would I go about printing the actual amount of disk space free in MB out in the email being sent to me?
So far I have tried setting this as the comment in the trigger and printing out the comment:
{Template OS Windows:vfs.fs.size[{#FSNAME},free]} Mb Free
{{HOST.NAME}:vfs.fs.size[{#FSNAME},free]} Mb Free
And these simply from the action message:
{Template OS Windowsvfs.fs.size[{#FSNAME},free]}
{zabbix.zabbix.com:vfs.fs.size[{#FSNAME},free]}
{{HOST.NAME}:vfs.fs.size[{#FSNAME},free]}
I have tried a few other ways that I cannot think of now but none of them have worked for me yet.
The classic workaround for this is to add the item you wish to reference to the trigger expression. The condition involving the item should always be true, like so:
{Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<5 and
{Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}>=0
Then, you can reference the name, the host, the key, and the value of this item using the following macros (included into the default notification message that comes with Zabbix):
2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}
You might wish to vote or comment on ZBXNEXT-3121. See also ZBX-10474 for another example.