{"id":13510576,"url":"https://github.com/Graylog2/graylog-guide-syslog-linux","last_synced_at":"2025-03-30T16:34:06.335Z","repository":{"id":137547641,"uuid":"47115286","full_name":"Graylog2/graylog-guide-syslog-linux","owner":"Graylog2","description":"How to send syslog from Linux systems into Graylog","archived":false,"fork":false,"pushed_at":"2018-11-06T13:01:55.000Z","size":8,"stargazers_count":79,"open_issues_count":6,"forks_count":15,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-08-02T02:16:41.380Z","etag":null,"topics":["documentation","graylog","guide","linux","rsyslog","syslog","syslog-ng"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Graylog2.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}},"created_at":"2015-11-30T11:54:06.000Z","updated_at":"2024-07-10T17:11:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"310dfd0e-d443-4a5f-aa58-30280d874fbb","html_url":"https://github.com/Graylog2/graylog-guide-syslog-linux","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-guide-syslog-linux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-guide-syslog-linux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-guide-syslog-linux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graylog2%2Fgraylog-guide-syslog-linux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Graylog2","download_url":"https://codeload.github.com/Graylog2/graylog-guide-syslog-linux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222566739,"owners_count":17004237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["documentation","graylog","guide","linux","rsyslog","syslog","syslog-ng"],"created_at":"2024-08-01T02:01:44.878Z","updated_at":"2024-11-01T11:30:38.609Z","avatar_url":"https://github.com/Graylog2.png","language":null,"readme":"## Sending syslog from Linux systems into Graylog\n\nThe two most popular syslog deamons (the programs that run in the background to accept and write or forward logs) are [rsyslog](https://www.rsyslog.com/) and [syslog-ng](https://syslog-ng.com/). One of these will most likely be running on your Linux distribution.\n\nPlease refer to the documentation of your distribution if you are not sure about this.\n\n### ⚠️ Warning ⚠️\n\n**These instructions configure rsyslog and syslog-ng to send log messages _unencrypted_ over the network. This is generally not recommended on public networks.**\n\n### rsyslog\n\nForwarding syslog messages with rsyslog is easy. The only important thing to get the most out of your logs is following\n[RFC 5424](http://www.ietf.org/rfc/rfc5424.txt). The following examples configure your `rsyslog` daemon to send\nRFC 5424 date to Graylog syslog inputs:\n\n##### UDP:\n\n    *.* @graylog.example.org:514;RSYSLOG_SyslogProtocol23Format\n\n##### TCP:\n\n    *.* @@graylog.example.org:514;RSYSLOG_SyslogProtocol23Format\n\n(The difference between UDP and TCP is using `@` instead of `@@` as target descriptor.)\n\nThe above configuration should be placed as new file ending in .conf in `/etc/rsyslog.d/` and rsyslog should be restarted. In addition the port 514 on the Graylog server need to be reachable from the sending server.  \n\n### Old rsyslog\nIf you're using a very old version of rsyslog (versions before rsyslog 5.10) which doesn't provide the built-in [RSYSLOG_SyslogProtocol23Format](http://www.rsyslog.com/doc/v5-stable/configuration/templates.html#string-based-templates\u003e) template, you can create a custom message template.\n\nFor **UDP** this becomes:\n\n    $template GRAYLOGRFC5424,\"\u003c%PRI%\u003e%PROTOCOL-VERSION% %TIMESTAMP:::date-rfc3339% %HOSTNAME% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%\\n\"\n    *.* @graylog.example.org:514;GRAYLOGRFC5424\n\n### syslog-ng\n\nConfiguring `syslog-ng` to send syslog to Graylog is equally simple. Use the `syslog` function to send\n[RFC 5424](http://www.ietf.org/rfc/rfc5424.txt) formatted syslog messages via TCP to the remote Graylog host:\n\n    # Define TCP syslog destination.\n    destination d_net {\n        syslog(\"graylog.example.org\" port(514));\n    };\n    # Tell syslog-ng to send data from source s_src to the newly defined syslog destination.\n    log {\n        source(s_src); # Defined in the default syslog-ng configuration.\n        destination(d_net);\n    };\n","funding_links":[],"categories":["Others","linux","Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGraylog2%2Fgraylog-guide-syslog-linux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGraylog2%2Fgraylog-guide-syslog-linux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGraylog2%2Fgraylog-guide-syslog-linux/lists"}