Ad Widget

Collapse

Trigger expression using data from two hosts

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sszabbix01
    Junior Member
    • Sep 2019
    • 5

    #1

    Trigger expression using data from two hosts

    I am trying to create a trigger with an expression that uses data points from two hosts and some simple math. The expression works when I test via the expression constructor, but as soon as it is saved and applied to the hosts it begins to generate a problem even though all of the conditions are supposedly false. Below is the expression I am trying to use. If anyone has any suggestions as to why this is failing I would greatly appreciate any advise

    ({HOST1:vfs.fs.size[/path/directory,used].last()} - {HOST2:vfs.fs.size[/path/directory,used].last()}) > 1

    Zabbix 5.0.21
    CentOS 7
  • Answer selected by markfree at 22-08-2023, 00:45.
    markfree
    Senior Member
    • Apr 2019
    • 868

    The key "vfs.fs.size[fs,used]" returns the used bytes from a file system.
    You should check the actual value (bytes) of both file systems.

    Comment

    • sszabbix01
      Junior Member
      • Sep 2019
      • 5

      #2
      Here's an update. After playing around with the arithmetic operators (<,>,=) and different values to generate TRUE and FALSE conditions it seems as though the issue is with using the greater than (>) operator. Has anyone seen this behavior before.​

      Comment

      • markfree
        Senior Member
        • Apr 2019
        • 868

        #3
        The key "vfs.fs.size[fs,used]" returns the used bytes from a file system.
        You should check the actual value (bytes) of both file systems.

        Comment

        • sszabbix01
          Junior Member
          • Sep 2019
          • 5

          #4
          Originally posted by markfree
          The key "vfs.fs.size[fs,used]" returns the used bytes from a file system.
          You should check the actual value (bytes) of both file systems.
          That was the ticket. I was using the wrong measurement for my calculations

          Comment

          Working...