Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18410

Trigger function strlen #num does not work

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 5.0.3
    • Server (S)
    • None
    • New zabbix installation on CentOS7 with zabbix-server-pgsql, zabbix-web-pgsql-scl and zabbix-apache-conf-scl packages
    • Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021)
    • 0.25

      In trigger function strlen() the strlen(#num) does not work according to manual https://www.zabbix.com/documentation/current/manual/appendix/triggers/functions but seems to be ignored instead.

       

      To reproduce:

      • create empty file /var/tmp/tstfile on zabbix server
      • create new Item on Zabbix Server 'test' with
        • Type Zabbix Agent
        • Key vfs.file.contents[/var/tmp/tstfile]
        • Type of information Text
      • create Trigger 'strln-test-trigger'
        • Expression:
          {Zabbix server:vfs.file.contents[/var/tmp/tstfile].strlen(#4)}>0 

        Observation: when adding some text to /var/tmp/tstfile, the trigger is active immediately after the next check, instead of  the 4th check.

        1. 2020-10-05_Selection_001.jpg
          105 kB
          Georg Schuetze
        2. 2020-10-05_Selection_002.jpg
          107 kB
          Georg Schuetze
        3. 2020-10-05_Selection_003.jpg
          89 kB
          Georg Schuetze
        4. 2020-10-05_Selection_004.jpg
          107 kB
          Georg Schuetze
        5. 2020-10-05_Selection_006.jpg
          107 kB
          Georg Schuetze

            dgoloscapov Dmitrijs Goloscapovs
            gschuetze Georg Schuetze
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: