Ad Widget

Collapse

I cant get the key value using vfs.file.regexp in a windows system

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lecarrari
    Junior Member
    • Jun 2014
    • 3

    #1

    I cant get the key value using vfs.file.regexp in a windows system

    Hi members of Zabbix Forums,

    I´m using zabbix agent in a windows machine running Windows Server 2008r2. The zabbix agent is running and works fine.

    But when I decided to use a new key to check a string in a text file using vfs.file.regexp, I had some problems:

    The file I im trying to check is a log file generated by HP Data Protector backup software. I configured the software to create a log in the file C:\Zabbix\dataprotector\dataprotector.log. So I created an item in Zabbix Named "Success Backup", type "Zabbix Agent", key vfs.file.regexp["C:\Zabbix\dataprotector\dataprotector.log","Succe ss:"], text.

    When the backup software creates the log file, the key doenst work and returns an empty value. But if I create the file with notepad, for example, the key works fine and returns the correct value.

    I tried to use many encodings and nothing...

    Anybody could help me with this issue?

    Thanks a lot.
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome!

    Did you try to use the Zabbix item type "Log"? (https://www.zabbix.com/documentation...ypes/log_items)
    Any luck with that?

    One more thing I noticed. Is that space in word "Succe ss" intentional?
    Code:
    vfs.file.regexp["C:\Zabbix\dataprotector\dataprotector.log","Succe ss:"]
    Best Regards,
    Ingus

    Comment

    • lecarrari
      Junior Member
      • Jun 2014
      • 3

      #3
      I cant get the key value using vfs.file.regexp in a windows system

      Hello Ingus,

      Thank you for your answer.

      I tried to use the type "Log", but didn´t work. This is the Zabbix Server Log when I use "log":

      2308:20140606:161657.941 item [serverbkp.suprir.com.br:log["C:\Zabbix\dataprotector\dataprotector.log","Succe ss:"]] became not supported: Not supported by Zabbix Agent
      As I said in the first post, the item works fine if I create the file C:\Zabbix\dataprotector\dataprotector.log by notepad.

      About space in "Success", I guess it was a wrong input only on the post...

      I still looking for a solution for my case.

      Thank you again.

      PS: You can see the space in "success" word again... I don´t know why. But don´t worry about that. It´s only in the post.

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        Looks a little similar to this case here (https://www.zabbix.com/forum/showthread.php?t=45513).

        Try your item key without quotation marks like this:
        Code:
        log[C:\Zabbix\dataprotector\dataprotector.log,Success]
        P.S. Really very strange thing about this space.

        Best Regards,
        Ingus

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          One more thing - permissions.

          May be, Data Protector use the permissions which is different with Zabbix Agent.
          Because of that, Zabbix Agent cannot get access to Data Protector .log-file.

          Check it, please.
          Sincerely yours,
          Aleksey

          Comment

          • lecarrari
            Junior Member
            • Jun 2014
            • 3

            #6
            Hello,

            I checked permissions too, and are the same. To test, I put permission "full control" for everyone.

            This file I am trying to load by Zabbix Agent is not a log with new entries been adding by the application. Data Protector creates a new file when the backup session (job) ends. So, I think the best key to use is vfs.file.regexp.

            ...But it doens´t work.

            Anyone have an ideia?


            Thanks

            Comment

            Working...