Hi,
I have noticed that setting up a context macro in a trigger prototype to monitor VMware discovered guests' free disk space on mounted file systems isn't working correctly.
This is because VMware reports Windows file systems with a trailing backslash (i..e C:\) and the trigger cannot be created (as context macros cannot have backslashes at the end.)
I need to have a context macro (i.e. have different values for freespace limits to report a new problem) as things like boot partitions and page file drives have a very small amount of space compared to OS and application drives.
All Linux based guests can have their triggers created, as their filesystems do not end with a backslash symbol.
I am using the default VMWare Guest template, and Zabbix version 5.4 with the latest updates.
As a workaround, I have added text to the end of the macro.
So my trigger prototype rule is:
last(/VMware Guest/vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free])<= {$FS_LIMIT:"{#FSNAME}freespace"}
and the macro the guests inherit is in this format:
{$FS_LIMIT:"C:\freespace"}
Using the above method has worked for me, but I have to add macros for every file system.
Does anyone have any suggestions for how to clear this up?
I suspect the easiest way would be to 'override' the value of the #FSNAME - replacing C:\ with C:, for example, but I am not sure how to do this.
Thanks in advance,
Tim
I have noticed that setting up a context macro in a trigger prototype to monitor VMware discovered guests' free disk space on mounted file systems isn't working correctly.
This is because VMware reports Windows file systems with a trailing backslash (i..e C:\) and the trigger cannot be created (as context macros cannot have backslashes at the end.)
I need to have a context macro (i.e. have different values for freespace limits to report a new problem) as things like boot partitions and page file drives have a very small amount of space compared to OS and application drives.
All Linux based guests can have their triggers created, as their filesystems do not end with a backslash symbol.
I am using the default VMWare Guest template, and Zabbix version 5.4 with the latest updates.
As a workaround, I have added text to the end of the macro.
So my trigger prototype rule is:
last(/VMware Guest/vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free])<= {$FS_LIMIT:"{#FSNAME}freespace"}
and the macro the guests inherit is in this format:
{$FS_LIMIT:"C:\freespace"}
Using the above method has worked for me, but I have to add macros for every file system.
Does anyone have any suggestions for how to clear this up?
I suspect the easiest way would be to 'override' the value of the #FSNAME - replacing C:\ with C:, for example, but I am not sure how to do this.
Thanks in advance,
Tim
Comment