Git Product home page Git Product logo

Comments (5)

jasonyates-thg avatar jasonyates-thg commented on September 13, 2024 1

This works perfectly. Thanks for the quick turnaround @karimra

from gnmic.

karimra avatar karimra commented on September 13, 2024

The Prometheus output uses the address part of the listen field to register as a service address in Consul.
If that field is empty, Consul defaults to its own address as a service address.

If you want to register 10.249.1.215 as a service address for the prometheus output you should set listen to listen: 10.249.1.215:9804.
The caveat here is that your prometheus output listens only to that address, not to any address in the system.

from gnmic.

jasonyates-thg avatar jasonyates-thg commented on September 13, 2024

The Prometheus output uses the address part of the listen field to register as a service address in Consul. If that field is empty, Consul defaults to its own address as a service address.

If you want to register 10.249.1.215 as a service address for the prometheus output you should set listen to listen: 10.249.1.215:9804. The caveat here is that your prometheus output listens only to that address, not to any address in the system.

The issue is have is that i'm running gnmic in a docker container via docker-compose with the prometheus endpoint port exposed, so it can't bind to 10.249.1.215:9804

I believe another possible solution to this would be to support the service-address configuration option in the service-registration section of the output in the same fashion that it can be configured in the clustering configuration.

from gnmic.

karimra avatar karimra commented on September 13, 2024

I see, let me look into it

from gnmic.

karimra avatar karimra commented on September 13, 2024

@jasonyates-thg can you give v0.30.0 a try?

You can set a service address as below:

outputs:
  prometheus:
    type: prometheus
    listen: :9804 
    path: /metrics 
    event-processors: 
      - interface-descriptions
    service-registration:
      address: 10.249.0.250:8500
      service-address: 10.249.1.215

It will register Address=10.249.1.215 and Port=9804.
You can also set a port with the address service-address: 10.249.1.215:9999 if the external port is different from the internal one.

from gnmic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.