Ad Widget

Collapse

Create trigger for fail Database monitor item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adopilot
    Junior Member
    • Sep 2013
    • 10

    #1

    Create trigger for fail Database monitor item

    First at all, Thank you on great things you made with Zabbix.

    I am trying to monitor MSSQL server databases using ODBC and FreeTDS.

    Most thing works smoothly. Flowing your tutorial We managed do get back data from MSSQL server into Zabbix and to measure outputs.
    It wokrs great.
    What I did not get is.
    How to make trigger if ODBC query fails inside SQL server.
    From time to time SQL server beside to return data it returns some SQL error.
    When that occurs my item get status Not Supported.
    Is there a way to make trigger on Zabbix which is going to inform me to ODBC (database monitor) item did not get results as excepted.

    Here is picure How I get error when my ODBC query fails to execute.


    How I can make trigger which is going to rise when ITEM become NOT SUPPORTED?
    Attached Files
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    There is a way to detect the event that the item status change to 'Not supported'.
    Create an action against the Internal event.

    Comment

    • adopilot
      Junior Member
      • Sep 2013
      • 10

      #3
      Thanx I did know that. (it is great thing)
      But is there any way to I rise trigger, when ODBC query fails.

      Why I prefer more trigger than notification.
      We are using few Zabbix 3th parity apps for interacting wiht zabbix.
      Also we are using much more zabbix Web fronted for waching our system.
      We do not care much about notifications, because We are sending mails onli after working hours. And most of time there is a lot of mails whic just point US to go to zabbix fontend and see what is going there.
      We are focused on triggers,

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Please vote to this feature request.

        ZBXNEXT-1791
        Trigger functions evaluation for unsupported items

        Comment

        • adopilot
          Junior Member
          • Sep 2013
          • 10

          #5
          I voted.
          I am glad I am not first one whit problem like this.
          Feature request explained exactly my problem.
          We are hoping that this is going to be implemented in next releases of Zabbix

          Comment

          • nixdummy
            Junior Member
            • Mar 2013
            • 13

            #6
            I made a similar task but without ODBC. There's a utility named SQSH - it can send simple MSSQL qeries to the database. So I installed it on the zabbix server, made an external script check and a trigger based on a regular expression. If the item returned something like "Error" the trigger changed to "PROBLEM" state.

            Comment

            • adopilot
              Junior Member
              • Sep 2013
              • 10

              #7
              I am also considering to switch from ODBC to agent replay items over SQL queries.
              But it is more native way to Zabbix talks whit SQL directly beside man in midel aggent.

              Comment

              • adopilot
                Junior Member
                • Sep 2013
                • 10

                #8
                Originally posted by nixdummy
                I made a similar task but without ODBC. There's a utility named SQSH - it can send simple MSSQL qeries to the database. So I installed it on the zabbix server, made an external script check and a trigger based on a regular expression. If the item returned something like "Error" the trigger changed to "PROBLEM" state.
                I am measuring integers , my query retuns integer and I mesuring that.
                If I go way whi external SQL calls how item looks like when nomaly getting integers and suddenly gets text ?

                Comment

                • nixdummy
                  Junior Member
                  • Mar 2013
                  • 13

                  #9
                  If I go way whi external SQL calls how item looks like when nomaly getting integers and suddenly gets text ?
                  If I had to solve this, I'd made two items with triggers and a dependancy between them.
                  The first would check if the reply is an integer, and the second would be your specified check. The second trigger should depend on the first - so if the received value is not an integer, you get a "Trigger 1 : PROBLEM", if it's ok - you get your integers.

                  After all it's an external script - so you can customize it as you wish.

                  Just a suggestion...

                  Comment

                  Working...