uber / uReplicator

Improvement of Apache Kafka Mirrormaker
Apache License 2.0
917 stars 199 forks source link

graphite metrics not working #331

Closed shashankkoppar closed 3 years ago

shashankkoppar commented 3 years ago
No available client connector supports the required protocols: 'WAR' . Please add the JAR of a matching connector to your classpath.
Starting the Jetty [HTTP/1.1] server on port 9000
Starting com.uber.stream.kafka.mirrormaker.controller.rest.ControllerRestApplication application
[2021-02-11 19:26:07,521] WARN Unable to report to Graphite (com.codahale.metrics.graphite.GraphiteReporter)
    at com.codahale.metrics.graphite.Graphite.connect(Graphite.java:129)
    at com.codahale.metrics.graphite.GraphiteReporter.report(GraphiteReporter.java:265)
[2021-02-11 19:27:07,517] WARN Unable to report to Graphite (com.codahale.metrics.graphite.GraphiteReporter)
    at com.codahale.metrics.graphite.Graphite.connect(Graphite.java:129)
    at com.codahale.metrics.graphite.GraphiteReporter.report(GraphiteReporter.java:265)
    controller.graphite.host : 35.187.124.7
    controller.graphite.port : 2003
    controller.graphite.report.freq.in.sec : 60
    controller.enable.graphite.report : true
    controller.graphite.host : 35.187.124.7
    controller.graphite.port : 2003
    controller.graphite.report.freq.in.sec : 60
    controller.enable.graphite.report : true
No available client connector supports the required protocols: 'WAR' . Please add the JAR of a matching connector to your classpath.

uber replicator is running fine, just metrics arent and i get this error. Can anyone let me know what jar file i should add to path?

shashankkoppar commented 3 years ago

@yangy0000 , would appreciate if u help out here :D

Please add the JAR of a matching connector to your classpath.

which jar file should i add to classpath and how? https://javadoc.io/doc/io.dropwizard.metrics/metrics-graphite/latest/com/codahale/metrics/graphite/package-summary.html Is this jar file?

yangy0000 commented 3 years ago

we didn't add any additional JAR into our classpath. which branch you are using?

shashankkoppar commented 3 years ago

I am using master branch

shashankkoppar commented 3 years ago

Can you also put an example for graphite metrics as well?

      -graphiteHost {{ graphite_host }} \
      -metricsPrefix {{ helixClusterName }}-controller \
      -graphitePort 2003"

It used to work before worker change you guys did 😄

yangy0000 commented 3 years ago

Test metric at local, it is working, the error "No available client connector" is irrelevant, I saw this error too.

The command I use in additional to the regular parameter is -graphitePort 2003 -graphiteHost localhost -metricsPrefix test-controller -env dc1.zone1 Metric start with prefix "stats.dc1.counter.test-controller.zone1"

From your error log

WARN Unable to report to Graphite (com.codahale.metrics.graphite.GraphiteReporter)
    at com.codahale.metrics.graphite.Graphite.connect(Graphite.java:129)
    at com.codahale.metrics.graphite.GraphiteReporter.report(GraphiteReporter.java:265)

is it possible that Graphite is not reachable

shashankkoppar commented 3 years ago

Thanks figured it out! :) path has changed! Before I didnt have to specify stats.dc1.counter now i have to! Will fix dashboards in my grafana!

yangy0000 commented 3 years ago

great it worked, this change was part of the federated ureplicator release. sorry it breaks the backward compatibility

shashankkoppar commented 3 years ago

Thanks, @yangy0000 ! No worries! Also is it difficult to output Prometheus metrics instead?

yangy0000 commented 3 years ago

it's not difficult but probably needs to touch many code. Alternatively, you should able to use https://github.com/prometheus/graphite_exporter to output Prometheus metrics