Conductor server metrics how/help + prometheus
See original GitHub issueHello guys I read a few tickets about conductor server and prometheus metrics
https://github.com/Netflix/conductor/issues/600 https://github.com/Netflix/conductor/issues/1769
And the conductor documentation https://netflix.github.io/conductor/metrics/server/
But I can’t understand how to enable spectator in conductor server and then push metrics to a external prometheus server.
https://netflix.github.io/conductor/metrics/server/#publishing-metrics
Conductor uses spectator to collect the metrics.
-
To enable conductor serve to publish metrics, add this dependency to your build.gradle.
is build.grade, server/build.gradle ?
I followed the link and I tried to add
// metrics -- this line didn't work compile "com.netflix.spectator:spectator-reg-metrics3:0.89.0"
or https://github.com/brharrington/spectator-examples/blob/master/metrics3/build.gradle
I had errors
A problem occurred configuring project ‘:conductor-server’.
Could not resolve all dependencies for configuration ‘:conductor-server:runtimeCopy’. Could not find com.netflix.spectator:spectator-reg-metrics3:0.89.0.
OR
Could not get unknown property ‘version_guice’ for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
-
Conductor Server enables you to load additional modules dynamically, this feature can be controlled using this configuration.
I added to docker/server/config/config.properties
# Additional modules for metrics collection (optional) conductor.additional.modules=com.netflix.conductor.contribs.metrics.MetricsRegistryModule,com.netflix.conductor.contribs.metrics.LoggingMetricsModule com.netflix.conductor.contribs.metrics.LoggingMetricsModule.reportPeriodSeconds=15
-
Create your own AbstractModule that overides configure function and registers the Spectator metrics registry.
-
Initialize the Registry and add it to the global registry via ((CompositeRegistry)Spectator.globalRegistry()).add(…).
the last two option I don’t know where I need to add it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
By the way, the source I consulted:
@eins today I faced the same problem and a Web search brings me here. In case you still want to achieve this, I’d suggest to:
for development purposes:
in server/build.gradle file add:
in server/src/main/resources/application.properties add:
** EDITED ** in java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfiguration.java
Remove the instantiation of Prometheus registry, and let Spring inject the actuator one:
then hit at root:
visit: http://localhost:8080/actuator and follow the links.
for PRD
For production, build a docker image with the change in server/build.gradle and then configure your container as showed.