2 Replies Latest reply on May 13, 2014 9:40 AM by theute

    Starting with RHQ-Metrics

    theute

      I am trying to install and play with RHQ Metrics but facing some installation issue.

       

      I have Cassandra 2 running locally (On Fedora) with default options (default port 9042)

       

      I ran RHQ Metrics Server with defaults:

      java -jar rhq-metrics-server-0.1.0-SNAPSHOT-fat.jar
      

       

      I get the following log:

      log4j:WARN No appenders could be found for logger (com.datastax.driver.core.FrameCompressor).
      log4j:WARN Please initialize the log4j system properly.
      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
      May 13, 2014 2:14:57 PM org.vertx.java.core.logging.impl.JULLogDelegate info
      INFO: Succeeded in deploying module
      

       

      Then I try to populate:

      curl -i -X POST http://127.0.0.1:7474/rhq-metrics/ -d@/tmp/toto -HContent-Type:application/json
      

       

      But it complains

      curl: (7) Failed connect to 127.0.0.1:7474; Connection refused
      

       

      Did I miss something ?

        • 1. Re: Starting with RHQ-Metrics
          john.sanda

          You are running the wrong JAR file. You should be executing the fat JAR produced in the metrics-rest module, e.g.,

           

          $ java -jar target/rhq-metrics-rest-0.1.0-SNAPSHOT-fat.jar

           

          You will find some documentation for running that REST module in the README at rhq-metrics/metrics-rest at master · rhq-project/rhq-metrics · GitHub. The metrics-server module produces a Vert.x module that is the core module in that it talks directly to Cassandra via the DataStax driver. The metrics-rest module provides REST endpoints that in turn communicate with the core server via the event bus.

          • 2. Re: Re: Starting with RHQ-Metrics
            theute

            Arf, indeed...

            curl -i -X POST http://127.0.0.1:7474/rhq-metrics/test/data -d@/tmp/toto -HContent-Type:application/json
            

            Worked

             

            With /tmp/toto being:

            [
            {
             "timestamp":1398891828116,
             "value":12.3
            }
            ]
            

             

            Thanks !