Coder Social home page Coder Social logo

Comments (4)

supahgreg avatar supahgreg commented on June 3, 2024

As of 4.1 Graylog has a built-in Prometheus exporter that should be used instead of the archived project you mentioned. This isn't anything specific to the Docker image.

Try adding these environment variables:

  • GRAYLOG_PROMETHEUS_EXPORTER_ENABLED=true
  • GRAYLOG_PROMETHEUS_EXPORTER_BIND_ADDRESS=0.0.0.0:9833

... and then add port 9833:9833/tcp and restart rebuild. After that you should be able to hit http://$SOME_HOST_IP:9833/ and see metrics.

from graylog-docker.

suntereo avatar suntereo commented on June 3, 2024

Thank you Greg! I can confirm your steps do work on my end.

But I'm still confused. The graylog.conf file shows 127.0.0.1:

# IP address and port for the Prometheus exporter HTTP server.
# Default: 127.0.0.1:9833
#prometheus_exporter_bind_address = 127.0.0.1:9833

Because of this, 127.0.0.1 is what I was trying to use. But this fails on my end with:

image

Your advice to use 0.0.0.0 does resolve this error.

But if you use 127.0.0.1:9833, does it work on your end? If not, shouldn't graylog.conf be updated to show 0.0.0.0?

from graylog-docker.

supahgreg avatar supahgreg commented on June 3, 2024

The difference is that you're running Graylog within a Docker container rather than directly on the host system. By default, 127.0.0.1 in your container is local to the container (i.e. it's not the 127.0.0.1 of your host system). 0.0.0.0 binds to all available interfaces in the container, including the one used when exposing ports. Docker's networking documentation covers all of this in detail.

127.0.0.1:9833 is a reasonable default, as it prevents unintentionally exposing metrics.

from graylog-docker.

suntereo avatar suntereo commented on June 3, 2024

Thanks again. That is very helpful.

I bet others will blindly follow the comments in the graylog.conf and have it fail like I did. But I suppose they can just find this thread and get the solution they need.

from graylog-docker.

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.