Ad Widget

Collapse

Item db.odbc.get with log type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clement.vi
    Junior Member
    • Jul 2021
    • 1

    #1

    Item db.odbc.get with log type

    Hello,

    I’m trying to interpret the result of an SQL query as a log file.
    Each row of the result of the SQL query execution would correspond to a log row.
    I currently have the following result in Zabbix with db.odbc.get:
    [
    {"MESSAGE_ID":"CPI2417","FROM_JOB":"497009/QUSER/QZRCSRVS","MESSAGE_TEXT":"File d'attente de messages du travail 497009/QUSER/QZRCSRVS boucl{e."},
    {"MESSAGE_ID":"CPF1241","FROM_JOB":"504 993/CMUSER/CMDE","MESSAGE_TEXT":"Travail 504993/CMUSER/CMDE termin{ le 07/07/21 @ 12:19:02."},
    {"MESSAGE_ID":"CPF1241","FROM_JOB":"50 4992/CMUSER/STRF","MESSAGE_TEXT":"Travail 504992/CMUSER/STRF termin{ le 07/07/21 @ 12:19:02."}
    ]

    I execute an SQL query that gives me log history on the last minute, pooling is also set to 1 minute in Zabbix so this is good for datas.

    What I currently have is an array of data for each request execution as above.
    I’m looking to interpret each element of this array as a log line.

    Can you please help me?

    Thank you in advance.
Working...