Ad Widget

Collapse

VFS monitoring of files with unusual characters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rts
    Member
    • May 2007
    • 54

    #1

    VFS monitoring of files with unusual characters

    Hi,

    I need to monitor the modification time of a file which contains [] (square brackets) in its name. This seems not to work, nor do I appear able to use wild cards in the filename definition in a call such as:

    [root@servera /]# zabbix_agentd -t "vfs.file.time[/tmp/sample[file].txt]"
    vfs.file.time[/tmp/sample[file] [m|ZBX_NOTSUPPORTED]
    [root@servera /]# zabbix_agentd -t "vfs.file.time[/tmp/sample?file?.txt]"
    vfs.file.time[/tmp/sample?file?.txt] [m|ZBX_NOTSUPPORTED]
    [root@servera /]# zabbix_agentd -t "vfs.file.time[/tmp/sample*file*.txt]"
    vfs.file.time[/tmp/sample*file*.txt] [m|ZBX_NOTSUPPORTED]
    [root@servera /]# zabbix_agentd -t vfs.file.time[/tmp/sample*file*.txt]
    vfs.file.time[/tmp/sample*file*.txt] [m|ZBX_NOTSUPPORTED]
    [root@servera /]# zabbix_agentd -t vfs.file.time[/tmp/sample?file?.txt]
    vfs.file.time[/tmp/sample?file?.txt] [m|ZBX_NOTSUPPORTED]
    [root@servera /]# zabbix_agentd -t vfs.file.time[/tmp/sample[file].txt]
    vfs.file.time[/tmp/sample[file] [m|ZBX_NOTSUPPORTED]
    [root@servera /]# ls -al /tmp/sample?file?.txt
    -rw-r--r-- 1 root root 0 2009-04-14 15:20 /tmp/sample[file].txt
    [root@servera /]#


    Has anyone any suggestions? I can easily use a UserParameter to monitor this file, but it seems a bit silly when the functionality is almost present in the code.

    rts
  • dotneft
    Senior Member
    • Nov 2008
    • 699

    #2
    *** ~ # touch /tmp/sample[file].txt
    *** ~ # zabbix_agentd -t "vfs.file.time[/tmp/sample[file].txt]"
    vfs.file.time[/tmp/sample[file].txt] [u|1239722059]
    *** ~ # zabbix_agentd -t vfs.file.time[/tmp/sample[file].txt]
    vfs.file.time[/tmp/sample[file].txt] [u|1239722059]
    *** ~ # zabbix_agentd -V
    ZABBIX Agent (daemon) v1.6.2 (16 January 2009)
    Compilation time: Mar 21 2009 09:54:26


    hmmmm...try use "\" : zabbix_agentd -t vfs.file.time[/tmp/sample\[file\].txt]
    Last edited by dotneft; 14-04-2009, 17:19.

    Comment

    • rts
      Member
      • May 2007
      • 54

      #3
      Ah. Sorry about that. I have dug around, and it appears we're running v1.4 not v1.6 of the agentd. It all works fine on v1.6.

      The reason we're not using v1.6 is because of http://www.zabbix.com/forum/showthread.php?t=11560

      Comment

      • dotneft
        Senior Member
        • Nov 2008
        • 699

        #4
        *** ~ # cat /etc/zabbix/zabbix_agentd.conf | grep num
        UserParameter=usern.num,/usr/bin/\w\h\o | wc -l
        *** ~ # zabbix_get -s localhost -p 10050 -k usern.num
        3

        but thise
        Code:
        *** ~ # zabbix_agentd -t usern.num
        usern.num                                     [m|ZBX_NOTSUPPORTED]
        not working, why? o0

        Comment

        • dotneft
          Senior Member
          • Nov 2008
          • 699

          #5
          Originally posted by rts
          Ah. Sorry about that. I have dug around, and it appears we're running v1.4 not v1.6 of the agentd. It all works fine on v1.6.

          The reason we're not using v1.6 is because of http://www.zabbix.com/forum/showthread.php?t=11560
          .try use "\" : zabbix_agentd -t vfs.file.time[/tmp/sample\[file\].txt]
          not working?

          Comment

          • rts
            Member
            • May 2007
            • 54

            #6
            The backslashes didn't work with 1.4

            Comment

            Working...