Ad Widget

Collapse

Monitor inserts in a database table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • claudiojgb
    Junior Member
    • Apr 2023
    • 2

    #1

    Monitor inserts in a database table

    Good day.

    I wanted to see if it is possible with Zabbix to constantly read a table in the database and show when data is inserted into that table, something similar to what is done with the item logrt but with a table instead of a log.

    Thanks.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    If you can make an sql query that will return you the necessary data - then you can.
    Or use transaction tracking mechanisms (log into file) in your database version.
    There is no built-in zabbix of what you want.

    Comment

    • PeterZielony
      Senior Member
      • Nov 2022
      • 146

      #3
      I'm thinking about nearly the same thing but just got no time to do it yet.

      You have 2x approaches
      - trigger SQL to exec agent sender with trapper in zabbix server, when table is being inserted.
      - setup extended events to capture "sql_text" as when it happens so you can capture it (and format extended events in any way you want for easy query). Then hook ODBC to get that data out to bring your data back from events /event - this is different beast and harder to do but opens more options from SQL side of things

      I'm going with the second option but i need it for different reasons (performance and checking bottleneck of queries that runs longer than 5sec and log them to zabbix on monthly basis)

      Hiring in the UK? Drop a message

      Comment

      Working...