Ad Widget

Collapse

Calculated discovery item prototypes?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aspeagle
    Junior Member
    • Dec 2025
    • 1

    #1

    Calculated discovery item prototypes?

    So... wondering if this is even possible.... because I can't seem to find the syntax for it.

    What I'm trying to do add a calculated item prototype to the mounted filesystem discovery for Linux systems so that I can create a more dynamic filesystem "full" threshold (percentage) depending on the total size of the mounted filesystem. I'd then use that calculated item in a trigger prototype to create filesystem utilization triggers.

    I was trying something like this for the formula...

    Code:
    20-(15*(vfs.fs.size[{#FSNAME},total]/1073741824-200)/800)
    But... I get all sorts of incorrect expression errors with various things I've tried... is what I'm trying to do even possible? Is there a different way to accomplish this?
  • Viktors Fomics
    Member
    • Oct 2025
    • 42

    #2
    Hello

    The main issue here is the {#FSNAME} macro, as discovery rule macros are not expanded inside calculated item expression. To make this work, a standard Zabbix agent item prototype vfs.fs.size[{#FSNAME},total] must be created under the LLD rule, and a separate calculated item must be created outside the LLD rule using a concrete filesystem (e.g. /) with the formula 20-(15*(last(/<HOSTNAME>/vfs.fs.size[/,total])/1073741824-200)/800). However, depending on the goal, this manual approach may not be applicable for you.
    Last edited by Viktors Fomics; 02-01-2026, 14:38.

    Comment

    Working...