3 Replies Latest reply on Dec 18, 2013 8:54 AM by Ramesh Reddy

    Hooks on TEIID for external integration

    luca gioppo Novice

      Mu need is to be able to be alerted when some events are executed:

      - each time a query get issued I'd like to be able to send an API call (using curl or a thrift client to an externale monitoring tool)

      - same when a VDB get active or change the lifecycle.

       

      Is there any way (a filter at the AS level, a custom logger, ...)

       

      Thanks

      Luca

        • 1. Re: Hooks on TEIID for external integration
          Ramesh Reddy Master

          Luca,

           

          - For query, the best I can think of is write extension of log appender for COMMAND_LOG, this context gets called for different events with query. Since this is nothing but extension of Log4J appender, you can forward that message to whatever you want to do.

           

          - For VDB, little more involved right now you need to add VDBLifeCycleListener during that start of the engine. I suppose we could add another log context for this to extension purposes.

           

          Ramesh..

          1 of 1 people found this helpful
          • 2. Re: Hooks on TEIID for external integration
            luca gioppo Novice

            How can I register the listener at the start?

            I should develop my class that extend from the one you mentioned and than deploy on JBoss and than ...

             

            For the log context ... could be an easier approach

            • 3. Re: Hooks on TEIID for external integration
              Ramesh Reddy Master

              Yes, extend the VDBLifeCycleListener interface and you register it with VDBRepository. If you are writing a service, VDBrepository can be injected as service into your if you define it as dependency. Or you can add it in DQPCore class in "start" method. There are several examples in code of this, take a look.

               

              I agree, log context is much more simpler and non-invasive and works without you re-compiling the whole Teiid code. Log a JIRA, we will provide hook in 8.7, or you can write patch, you still have to above or use of the already setup paths and submit it. I know somebody else also requested this before, this should be good enhancement.

               

              Thanks

               

              Ramesh..