Ad Widget

Collapse

vfs.file.contents returns ZBX_NOTSUPPORTED

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pdube
    Junior Member
    • Dec 2011
    • 23

    #1

    vfs.file.contents returns ZBX_NOTSUPPORTED

    I am running Zabbix 2.4.2 and I wish to read a file on a Windows server that contains a float number (that I regenerate every 30 minutes).

    The Zabbix item is defined like:
    Type: Zabbix Agent
    Key: vfs.file.contents[C:\TimeDrift.txt]
    Type of information: Numeric (float)
    Units: seconds

    And I have a trigger on server DC1 that check {DC1:vfs.file.contents[C:\TimeDrift.txt].last()}>120

    Here is what I see in the Zabbix log file:
    3184:20180405:145536.087 Requested [vfs.file.contents[C:\TimeDrift.txt]]
    3184:20180405:145536.087 Sending back [ZBX_NOTSUPPORTED]

    File permissions are Everyone: Read on this file.

    From the help file I see that vfs.file.contents is available on Windows.

    What am I missing?

  • BP_Vital
    Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Feb 2016
    • 42

    #2
    Hello,
    vfs.file.contents returns text, not an integer.
    Item Type of information is incorrect, therefore item becomes not supported.

    Comment

    • pdube
      Junior Member
      • Dec 2011
      • 23

      #3
      Is there a way I can have Zabbix read an integer/float value from a file then?

      Comment

      • pdube
        Junior Member
        • Dec 2011
        • 23

        #4
        Found the solution.

        I just need to use a User Parameter (defined in zabbix_agentd.conf) like
        UserParameter=TimeDrift,type C:\TimeDrift.txt

        and define an Zabbix Item using this parameter.

        Comment

        Working...