{"id":42910241,"url":"https://github.com/cdemers/journald2graylog","last_synced_at":"2026-01-30T16:56:09.584Z","repository":{"id":92838460,"uuid":"55626829","full_name":"cdemers/journald2graylog","owner":"cdemers","description":"Command line tool to forward systemd's journald's logs to a Graylog server while taking advantage of the descriptive GELF format.","archived":false,"fork":false,"pushed_at":"2017-11-17T18:39:28.000Z","size":176,"stargazers_count":5,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-19T22:14:36.436Z","etag":null,"topics":["12factors","docker","gelf","golang","graylog-server","journald","systemd"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdemers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-06T17:31:25.000Z","updated_at":"2025-12-19T03:00:03.000Z","dependencies_parsed_at":"2024-06-20T16:17:24.520Z","dependency_job_id":null,"html_url":"https://github.com/cdemers/journald2graylog","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cdemers/journald2graylog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdemers%2Fjournald2graylog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdemers%2Fjournald2graylog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdemers%2Fjournald2graylog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdemers%2Fjournald2graylog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdemers","download_url":"https://codeload.github.com/cdemers/journald2graylog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdemers%2Fjournald2graylog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28915942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["12factors","docker","gelf","golang","graylog-server","journald","systemd"],"created_at":"2026-01-30T16:56:09.496Z","updated_at":"2026-01-30T16:56:09.569Z","avatar_url":"https://github.com/cdemers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# journald2graylog\n\n[![Build Status](https://travis-ci.org/cdemers/journald2graylog.svg?branch=master)](https://travis-ci.org/cdemers/journald2graylog)\n\nCommand line tool to help forward _systemd's_ _journald's_ logs to a [_Graylog_](https://www.graylog.org/) server taking advantage of the descriptive _GELF_ format.\n\nThe _journald2graylog_ command expects it's paramters to be provided as the environment variables, making it well suited for [_Docker_](https://www.docker.com/) or _systemd_ driven environments, and _PaaS_ platforms like [_Heroku_](https://www.heroku.com/) and the [_Twelve-Factor App_](http://12factor.net/config) approach.\n\n## Usage\n\nTo use _journald2graylog_, you simply pipe the output of _journalctl_, while enabling it's _JSON_ output format, into the _jourald2graylog_ command.  It can be as simple this: `journalctl -o json | journald2graylog`, but usually you will require and want to provide more parameters.\n\nNote that _journald2graylog_ **only supports UDP** for now, having TCP might be cool, but it's not in our short term plans.\n\nThere are four configuration parameters:\n\n* The `J2G_HOSTNAME` is the _hostname_ or _IP_ of your _Graylog_ server, it has no default and **MUST** be specified.\n* The `J2G_PORT` is the port of the **UDP GELF** input of the _Graylog_ server, it will default to `12201`, but this value will almost always differ depending on your _Graylog_ configuration, so you will most likely have to look it up in your own _Graylog_ server.\n* The `J2G_PACKET_SIZE` is the maximum size of the TCP/IP packets you can use between the source (_journald2graylg_) and the destination (your _Graylog_ server). This will vary depending on your network capabilities, but the default value of _1420_ will be appropriate in the vast majority of situations.\n* The `J2G_BLACKLIST` is a list containing regex identifying logs that must not be sent to _Graylog_, separated by a semicolon (`;`).\n\nYou can add debugging by specifying the `--verbose` (also `-v`) flag, it will display the configuration parameters sent to journald2graylog in stdout\n\nNote that from version 0.2.0 onward, _journald2graylog_ will now exit if there is a network error, instead of looping forever. This makes a network problem more visible, and also gives Kubernetes (or a bash script, or systemd, etc) a chance to restart the application, which might end up resolving this kind of network problem.\n\n### Example usage\nThis example uses all available configuration parameters, provided as environment variables:\n\n``` bash\nexport J2G_HOSTNAME=graylog.example.com\nexport J2G_PORT=12201\nexport J2G_PACKET_SIZE=1420\nexport J2G_BLACKLIST=\"foo.*;bar.*\"\nsudo journalctl -o json -f | journald2graylog --verbose\n```\nOr you can simply do:\n\n``` bash\njournalctl -o json -f | J2G_HOSTNAME=graylog.example.com journald2graylog\n```\n\nAnd depending on your context, you might actually need to use something more among the line of:\n\n``` bash\nsudo journalctl -o json -f | J2G_HOSTNAME=graylog.example.com ./journald2graylog\n```\n\nNote that if a parameter specified via an environment variable will override the same parameter specified via command line. For example, in the following command, the _blacklist_ parameter will be set to _localhost_ and not _remotehost_ :\n\n``` bash\nJ2G_BLACKLIST=localhost journald2graylog --blacklist remotehost\n```\n\n## Install\n\n**From source**, you will have to already have a working _go_ development environment setup, with a proper _GOPATH_.\n\n``` bash\ngo get github.com/cdemers/journald2graylog\n```\nThe resulting binary should be compiled and placed in your GOPATH tree as `$GOPATH/bin/journald2graylog`.\n\n**From binary**, you can download the latest precompiled binary (Linux AMD64) from the [release section](https://github.com/cdemers/journald2graylog/releases).\n\n**Using _make_**, running `make` or `make all` will build a single binary for your current platform.\n\n### Building for Docker\n**Using _make_**, you can build a docker image by running `make docker`, it will build the _Linux_ binary and a docker image from _Dockerfile_, and attempt to push image to a docker registry. You must use your own registry by specifying `DOCKER_REGISTRY`, for example:\n\n``` bash\nmake docker -e DOCKER_REGISTRY=private.registry.org\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdemers%2Fjournald2graylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdemers%2Fjournald2graylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdemers%2Fjournald2graylog/lists"}