Coder Social home page Coder Social logo

Comments (18)

mariussturm avatar mariussturm commented on May 24, 2024 2

Could you please pull the latest image and provide this parameter when starting the container: -e GRAYLOG_NODE_ID=30833ff4-f14c-4641-8001-0866ac439552 (randomize the ID string!) This should now set the node ID to defined value. When the container is recreated on top of old data you can re-use the same ID. This should persist even inputs.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

Yes the inputs are stored in MongoDB. The problem is that they are associated through the servers node-id with a defined server instance. So every time you start a complete new container based on an old database, you get a new server node-id and the old inputs don't belong to this server instance anymore. The idea was to just stop and start containers. In this way the node-id should be the same.

from graylog2-images.

MrMarvin avatar MrMarvin commented on May 24, 2024

Ah, I see now.
So when using global inputs instead, they persist for every container instance I assume?!
Although it's kind of is obvious, I feel like this should be documented in the docker/README.md.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

Global means that a cluster of Graylog servers will all start the same input. But they are still bound to a node-id. Yep, will drop a line in the docs.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

Closing now because no real issue. Documentation is added.

from graylog2-images.

tzz avatar tzz commented on May 24, 2024

@mariussturm does specifying a container name with --name mycontainer set the node ID persistently? Or is it tied to something else?

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

do you mean docker run --name ...? That is not used inside of the container.

from graylog2-images.

tzz avatar tzz commented on May 24, 2024

I actually meant docker run --hostname=myname, sorry. That sets the hostname as far as all the apps inside the container are concerned so maybe it can be used to persist the settings.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

I think the cleanest solution would be to introduce a new container option for it. So people could provide the node-id through another environment variable.

from graylog2-images.

tzz avatar tzz commented on May 24, 2024

Works for me :) I just thought setting the hostname (which typically is a random string if you don't provide it explicitly) might be a nice way to provide the node ID. It would be nice to use the same node ID for ES as well, actually, so you can identify it easily in the ES logs.

from graylog2-images.

sheavner avatar sheavner commented on May 24, 2024

I grabbed the nodeid from the currenlty running node and passed that in after a container destroy and restart. There is now a node running with that old id.

I can't verify that the inputs are working, because I've setup mine to be global (started on all nodes) so they always come back even without the persisted node id.

I have a different issue. I have one custom user. That user exists, but I can't login and get invalid credentials. After each restart I have to go to System > Users and update the password for this user. And then things are fine. The persistent GRAYLOG_NODE_ID didn't fix this.

from graylog2-images.

tzz avatar tzz commented on May 24, 2024

@sheavner how do you grab the node ID of a running node? I didn't find that in the docs and it's not obvious from the Graylog UI. Thanks!

The invalid user password is definitely inconvenient but not as bad as losing data. I hope it can be resolved.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

Ok, thanks for the feedback! I think we have to expose the password_secret as well. Will take a look soon.

from graylog2-images.

sheavner avatar sheavner commented on May 24, 2024

@tzz If there's only one node, it's obvious from the system messages on the System Overview page at /system?page=0. I think I found mine on /system/nodes which shows the short hash + nodename. If you click on the node name, you can get the full nodeid from the url as you're viewing the node details.

from graylog2-images.

tzz avatar tzz commented on May 24, 2024

Thanks @mariussturm I found it now. I knew the short version (which I saw elsewhere) was not enough but didn't notice the node detail page. I'll wait for the password secret but otherwise this persistence is a great feature.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

Could you please pull the latest image and add this parameter to set the server password salt: -e GRAYLOG_SERVER_SECRET=somerandomstring
Next time you spin up the container with the same secret the user password should work.

from graylog2-images.

sheavner avatar sheavner commented on May 24, 2024

@mariussturm My non-admin user password did persist across a test restart of the server after the pull. Thanks for fixing this.

from graylog2-images.

mariussturm avatar mariussturm commented on May 24, 2024

Thanks for testing!

from graylog2-images.

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.