1 Reply Latest reply on Jul 2, 2019 8:59 AM by rareddy

    Http Management API - Teiid Runtime Operations

    dbester

      Good day

       

      I need some help retrieving the metrics data about teiid specific processes.

       

      Specifically the metrics found in the Jboss 6.4.0 Runtime tab > Teiid. (or wildfly)

       

      In the CLI its easy to get the metrics, I just use ./jboss-cli.sh --connect --command='/subsystem=teiid:engine-statistics()'

       

      And get some that why, but its slow (as it needs to connect to the jboss instance)

       

      I'm looking for something I can cURL to and get the output on a terminal for central monitoring.

      I've tried to follow a few examples of this: HTTP (JSON-like) API  or The HTTP management API - JBoss AS 7.1 - Project Documentation Editor

      But can't figure out the correct URL to retrieve the information.

       

      If someone could guide me in the correct direction or show a simple example of how to get the runtime operations from here :Teiid Management CLI - Teiid 9.0 (draft) - Project Documentation Editor

      I would be grateful.

       

      PS. I know I can create a jar class that inherits the api class and call some code which I can then append to the terminal, but I'm trying to find a way not to maintain another jar (if that makes any sense)

      So I can go this route if required, but would like to avoid it.

       

      Thanks in advance!

        • 1. Re: Http Management API - Teiid Runtime Operations
          rareddy
          $curl --digest http://localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"engine-statistics", "address":["subsystem","teiid"], "json.pretty":1}' -u admin:admin
          HTTP/1.1 401 Unauthorized
          Connection: keep-alive
          WWW-Authenticate: Digest realm="ManagementRealm", nonce="AAAABAAA9mcyNNq5/ESlOuTASDNYNw3490UAxJNoUPm1AhBFvzwqSRGhOc4=", opaque="00000000000000000000000000000000", algorithm=MD5, qop=auth
          X-Frame-Options: SAMEORIGIN
          Content-Length: 77
          Content-Type: text/html
          Date: Tue, 02 Jul 2019 12:56:56 GMT
          
          
          HTTP/1.1 200 OK
          Connection: keep-alive
          X-Frame-Options: SAMEORIGIN
          Content-Type: application/json; charset=utf-8
          Content-Length: 486
          Date: Tue, 02 Jul 2019 12:56:56 GMT
          
          
          {
              "outcome" : "success",
              "result" : {
                  "session-count" : 0,
                  "total-memory-inuse-kb" : 0,
                  "total-memory-inuse-active-plans-kb" : 0,
                  "buffermgr-disk-write-count" : 0,
                  "buffermgr-disk-read-count" : 0,
                  "buffermgr-cache-write-count" : 0,
                  "buffermgr-cache-read-count" : 0,
                  "buffermgr-diskspace-used-mb" : 0,
                  "active-plans-count" : 0,
                  "waiting-plans-count" : 0,
                  "max-waitplan-watermark" : 0
              }
          }
          1 of 1 people found this helpful