Ad Widget

Collapse

Unsupported items in triggers with zabbix 3.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • c.mammoli
    Member
    Zabbix Certified Specialist
    • Feb 2012
    • 48

    #1

    Unsupported items in triggers with zabbix 3.2

    Anyone playing with the new unsupported items function in 3.2 (https://www.zabbix.com/documentation...unknown_values)

    I'm trying to fire a trigger if at least one of 2 files is older than 1 day:

    {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cld,modify].fuzzytime(1d)}=0 or {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cvd,modify].fuzzytime(1d)}=0

    If one of the 2 files does not exist the trigger will go unsupported.
    I tried with:

    (0 and {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cld,modify].fuzzytime(1d)}=0) or (0 and {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cvd,modify].fuzzytime(1d)}=0)

    But this will always expand to 0

    (1 or {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cld,modify].fuzzytime(1d)}=0 or {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cvd,modify].fuzzytime(1d)}=0) will always expand to 1

    Any ideas? Am I missing something?
    Last edited by c.mammoli; 30-09-2016, 10:40. Reason: typo
  • andris
    Zabbix developer
    • Feb 2012
    • 228

    #2
    Hello!

    I'm trying to fire a trigger if at least one of 2 files is older than 1 day:

    {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cld,modify].fuzzytime(1d)}=0 or {Template agent Linux ClamAV:vfs.file.time[/var/lib/clamav/daily.cvd,modify].fuzzytime(1d)}=0

    If one of the 2 files does not exist the trigger will go unsupported.
    How so ?

    One scenario:
    1. Let's assume that both files exist and are fresh. Trigger evaluates as '1=0 or 1=0' --> '0 or 0' --> 0 (trigger is "Ok").
    2. Let's assume that both files exist, but file1 is OLD and file2 is FRESH. Trigger evaluates as '0=0 or 1=0' --> '1 or 0' --> 1 (trigger is "Problem").
    3. Now delete file2. Only the file1 exists and it is OLD. Trigger evaluates as '0=0 or Unknown=0' --> '1 or Unknown' --> 1 (trigger remains in "Problem" state).

    Other scenario:
    1. Same as described above in (1.): both files exist and are fresh. Trigger is "Ok".
    2. Now delete file2. Only the file1 exists and is FRESH. Trigger evaluates as '1=0 or Unknown=0' --> '0 or Unknown' --> Unknown (trigger becomes "Unknown").
    3. As time passes, the file1 gets OLD (and file2 does not exist). Trigger evaluates as '0=0 or Unknown=0' --> '1 or Unknown' --> 1 (trigger fires into "Problem").

    What could be the recovery expression for this trigger. "Both files exist and are fresh" ?

    Andris

    Comment

    • c.mammoli
      Member
      Zabbix Certified Specialist
      • Feb 2012
      • 48

      #3
      Originally posted by andris
      Hello!

      What could be the recovery expression for this trigger. "Both files exist and are fresh" ?

      Andris
      At least 1 file exists and is fresh

      Comment

      • c.mammoli
        Member
        Zabbix Certified Specialist
        • Feb 2012
        • 48

        #4
        This is the "normal" state:

        2. Now delete file2. Only the file1 exists and is FRESH. Trigger evaluates as '1=0 or Unknown=0' --> '0 or Unknown' --> Unknown (trigger becomes "Unknown").

        But as you noticed is unsupported...

        Comment

        Working...