Ad Widget

Collapse

LLD using logrt as input

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbribeiro@gmail.com
    Junior Member
    • Jun 2018
    • 13

    #1

    LLD using logrt as input

    Hi, I am monitoring some shares (in order to trigger quota usage and other stuff) from a file server, so this server writes information about every share in a logfile and this logfile is monitored using Zabbix (with logrt).
    Thats fine, we are able to see the log and how it changes. The next move is to create items based on every share the storage shows in its log file.
    My approach was to use Low level discovery based on a regex in the log file to discover the share names (when a quota exceeds or returns to normal its name would be grabbed).
    In Zabbix manual (v3.4) it says logrt can be used to LLD, so my question is how do I know what macros logrt exports so I can use them to create prototype items.

    Thanks in advance.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    In order to use for discovery of LLD, it must be JSON format as described in the manual.


    If it is not such a JSON format, it is necessary to prepare a mechanism to convert from log output contents to JSON format and deliver it to Zabbix server.

    Comment


    • mbribeiro@gmail.com
      [email protected] commented
      Editing a comment
      I tried this custom approach but this way I'll have to monitor log changes by my self (using a custom script as well). I thought logrt would have its own solution for LLD as it is listed as LLD compliant.
      From https://www.zabbix.com/documentation...evel_discovery
      "An item with “vfs.fs.discovery” key is built into Zabbix agent since version 2.0 on many platforms (see supported item key list for details)"
      and in the link provided by "supported item key" we can find log and logrt (I understood items that have some built in support for macro generating names, for example returning regex groups as macros in logrt).
      If this is not the case I will have to write a custom script to parse the logs (this is the easy part) and using this script to monitor the log just like the logrt function (this is the complicated part I would like to let Zabbix take control).

    • Atsushi
      Atsushi commented
      Editing a comment
      There is no function to reformat to JSON format for LLD from format like ordinary system log.
Working...