Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging with Graylog #11814

Closed
mehdiMj-ir opened this issue Jan 11, 2022 · 5 comments
Closed

logging with Graylog #11814

mehdiMj-ir opened this issue Jan 11, 2022 · 5 comments

Comments

@mehdiMj-ir
Copy link

Hi, Hope 2022 be a good year

Proposal


A Graylog driver for Nomad to ship and sent containers logs to Graylog.

Use-cases

This will help me to monitor and visualize logs for users without giving Nomad UI access to Developers. (I will keep Nomad to myself😈)
gray

Attempted Solutions

I currently install rsyslog on my docker containers and then syslog push logs to my Graylog server.
But a nice Driver and more logging option would be a great help.

@tgross
Copy link
Member

tgross commented Jan 11, 2022

Hi @mehdiMj-ir! This falls into the same sort of bucket as #10220 and #9211 to extend Nomad to support some kind of logging plugin (cc @mikenomitch just a heads up that this has come up a few times now). I'm going to keep this issue open for further discussion and roadmapping.

But in the meantime, you mentioned you're using the docker task driver. You can use the task.config.logging block for those tasks to set any of the configuration options supported by your version of Docker. Taking a quick look at the Docker logging docs it looks like Docker supports gelf natively. So your jobspec would look like this:

job "example" {
  datacenters = ["dc1"]

  group "cache" {
    network {
      port "db" {
        to = 6379
      }
    }

    task "redis" {
      driver = "docker"

      config {
        image = "redis:3.2"
        ports  = ["db"]

        logging {
          type = "gelf"
          config {
            gelf-address = "udp://localhost:12201"
          }
        }
      }

      resources {
        cpu    = 500
        memory = 256
      }
    }
  }
}

@mehdiMj-ir
Copy link
Author

mehdiMj-ir commented Jan 12, 2022

THANK YOU, VERY VERY MUCH.

I was about to setup fluentd as mentioned on Nomad Docs but this make my job so much easier. I even searched and found #688 but those option didn't work for me.

@mikenomitch
Copy link
Contributor

Hey @mehdiMj-ir thanks for the issue. I am going to close this one out in favor of the more generic #10220 and #9211 - the link to this issue will stick around though so whenever we pick those us we'll be able to include this request for context.

@Allan-Nava
Copy link

How to send the entire log message from nomad job to graylog?

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

4 participants