Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker & Graylog

I've been installing the last version of Docker (1.8). This new version is great because you can set a particular log-driver to send the log to Graylog2 (for example).

Here's the blog post from docker : Docker Blog announcing 1.8 Here's the graylog team blog to make the magic happen : Graylog blog

My problem is that it doesn't work :(

Here is the error message I get when I lauch this command :

docker run –log-driver=gelf –log-opt gelf-address=udp://127.0.0.1:12201 busybox echo Hello Graylog 

Error :

Unable to find image '–log-driver=gelf:latest' locally repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"

Here's an screenshot :

enter image description here

Any idea ?

EDIT

Following the advices of smart people : It looks like the dash was not the good one.

Here's a paste of the correct command :

docker run --log-driver=gelf --log-opt gelf-address=udp://127.0.0.1:12201 busybox echo Hello Graylog
like image 773
Mathieu Avatar asked Sep 27 '22 01:09

Mathieu


1 Answers

You need to write two dashes instead a single one: ... --log-driver=gelf --log-opt ...

EDIT: In that blogpost it is written:

The Docker plugins mechanism is now available in the new Docker experimental channel.

You need to install the experimental docker version like:

curl -sSL https://experimental.docker.com/ | sh
like image 192
Henrik Sachse Avatar answered Oct 13 '22 13:10

Henrik Sachse