Ad Widget

Collapse

Write to Zabbix database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kgb
    Junior Member
    • Mar 2005
    • 2

    #1

    Write to Zabbix database

    Currently I am using Zabbix 1.0 and I would like to monitor logs created by software written Java (using log4j). I have serveral different logs on different servers and some of the store logs from more than one application.

    Instead of writing script to parse the logs on regular basis I am thinking of creating log4j socket server that receives all critical, error and warning logs from all applications. Now I am wondering if it makes any sence to let that server write directly to the Zabbix database. This could be done in the following manner:

    For each received log from application the server queries for itemid in the ITEM table having the application name. It creates new row if not found.

    Then it looks for trigger in the TRIGGER table for that item and that log level. If not found then create one.

    Then it writes one row to the ALARMS table using this triggerid, itemid, clock and some value.

    Does this makes sense or would I break Zabbix using this method? What would happen to services or alarms having such triggers?

    By the way, working for European Meteorological Office. Enjoy using Zabbix for monitoring hardware, server software and data flow.

    Thanks.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    I would suggest using of 'zabbix_sender' for sending information to the ZABBIX server. This will guarantee that consistency of the database will be preserved. You could define triggers having 'str()' function in order to generate notifications for specific events.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...