{"id":18084972,"url":"https://github.com/coderofsalvation/hubot-syslogd","last_synced_at":"2025-07-06T16:38:37.743Z","repository":{"id":41213069,"uuid":"48751841","full_name":"coderofsalvation/hubot-syslogd","owner":"coderofsalvation","description":"flexible monitoring and aggregation of logs by using hubot as syslog server (replacement)","archived":false,"fork":false,"pushed_at":"2021-02-25T14:57:34.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T00:13:41.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2015-12-29T14:45:28.000Z","updated_at":"2021-06-16T10:10:17.000Z","dependencies_parsed_at":"2022-08-27T06:50:56.098Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/hubot-syslogd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/coderofsalvation/hubot-syslogd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-syslogd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-syslogd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-syslogd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-syslogd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/hubot-syslogd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-syslogd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263937836,"owners_count":23532787,"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":[],"created_at":"2024-10-31T15:08:50.022Z","updated_at":"2025-07-06T16:38:37.662Z","avatar_url":"https://github.com/coderofsalvation.png","language":"CoffeeScript","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"\u003e deprecated in favor of log4js and/or netdata\n\nPre-massage/route log messages before sending them to Splunk/Papertrail/Logsene etc.\n\n![Build Status](https://travis-ci.org/coderofsalvation/hubot-syslogd.svg?branch=master)\n\n\u003cimg src=\"https://www.websequencediagrams.com/cgi-bin/cdraw?lz=dGl0bGUgSFVCT1QtU1lTTE9HIEZMT1cKCnN5c2xvZ2NsaWVudC0-aHVib3Q6IHB1c2ggVURQL1RDUCBsb2cgbWVzc2FnZXMKABwFAB8JcmVnZXggbWF0Y2g_AAwPZm9ybWF0ADEIACsNIGNoYW5uZWxzL3VzZXJzACcFd2FyZABVCG90aGVyIHNlcnZpY2UAFQogCm5vdGUgcmlnaHQgb2YgABcQYWxlcnRpbmcgYW5kIG1ldHJpY3MgXG51c2luZzogXG4qIHBhcGVydHJhaWxcbiogc3BsdW5rXG4qIGxvZ2dseQAeBWxvZ3N0YXNoXG4AXw8AghMHSACBPAVhY3RzIGFzIACCNwYAgSYFZXIK\u0026s=napkin\"/\u003e\n\n\n# Installation \n\n    npm install hubot-syslogd\n\n\u003e Overridable Environment variables\n\n* SYSLOG_HOST=127.0.0.1   \n* SYSLOG_UDP_PORT=1338\n* SYSLOG_TCP_PORT=1337   \n\n## Usage:\n\nFirst tell hubot which regex to watch by typing to hubot:\n\n    hubot syslog add errors /(error|fail)/gi \n   \nThen invite hubot to a channel, or add him to a private chat, and type this:\n\n    hubot syslog enable errors\n\nand then send a UDP+TCP syslog message using a [PHP](https://github.com/coderofsalvation/syslog-flexible) / [JS](https://npmjs.org/syslog-client) syslog client, or on unix:\n  \n    $ logger -d --rfc3164 -n localhost -P 1338 -p local3.info hello this is an error \n    $ logger -T --rfc3164 -n localhost -P 1339 -p local3.info hello this is an error  \n\n\u003e Voila! It'll show up in the chat since it matched the regex :)\n\n    [15:29] \u003chubot\u003e errors: hello this is an error \n\n\u003e See [syslog-middleware](https://github.com/coderofsalvation/syslog-middleware/) on how to send syslog using nodejs [winston](https://npmjs.org/winston), or simply forward\nyour console using [sysconsole](@divine/sysconsole):\n\n```javascript\nimport { SysConsole } from '@divine/sysconsole';\nSysConsole.replaceConsole({ loghost: 'localhost', logport:1339,   facility: 'local0',  title: 'MySweetApp',  showFile: true,  syslogTags: true, showFunc:true,   highestLevel: 'info',  tcpTimeout:1000 })\nconsole.log(\"hoi error\") \nconsole.warn(\"hoi error\") \n```\n\n## Email alerts anyone?\n\njust get a papertrail account and forward 'errors' to papertrail/Splunk etc, by sending this to hubot:\n\n    hubot syslog config filter.errors.forward.0 udp://yourhost.papertrailapp.com:yourport\n\nAnd configure alerts in their dashboards.\n\n## sending JSON / Text formatting \n\n    $ logger -d -P 1338 -i -p local3.info -t FLOP 'foobar {{indent:10:priority}}::ok'\n    $ logger -d -P 1338 -i -p local3.info -t FLOP '{\"flop\":\"flap\",\"template\":\"foobar {{indent:10:flop}}::{{indent:10:priority}} errors\"}'\n\nwill produce nice-aligned output in the chat:\n\n    [15:29] \u003chubot\u003e errors: foobar 158        ::ok \n    [15:29] \u003chubot\u003e errors: foobar flap       ::159        error \n\nThis allows more readable logs, and/or pretty forwarded messages (to papertrail/slack/splunk etc)\n\n\u003e See [syslogd-middleware](https://npmjs.org/syslogd-middleware) for more templating options\n\n## All commands:\n\n   hubot syslog                           - get overview of filters \n   hubot syslog config [variable] [value] - show/edit filter config\n   hubot syslog add \u003cid\u003e [regex]          - add filter\n   hubot syslog remove \u003cid\u003e               - stop and remove a filter \n   hubot syslog enable \u003cid\u003e               - start monitoring in current channel/query \n   hubot syslog disable \u003cid\u003e              - stop monitoring in current channel/query \n\n## Forward messages / Backup / Files\n\nAdditionaly you could forward the logmessages to:\n\n* a rsyslog unix daemons (which can save to files, including logrotate etc)\n* a SaaS logservices (splunk/papertrail etc)\n    \nJust add their syslog-serverinfo like this:    \n    \n    hubot syslog config filter.errors.forward.0 udp://localhost:514 \n    hubot syslog config filter.errors.forward.1 tcp://someserver:567\n\n## Quick tryout\n\nThis plugin should work out of the box with your existing setup.\nHowever, here's a quick tryout scenario:\n\n    $ npm install hubot-syslogd\n    $ cd node_modules/hubot-syslogd\n    $ npm install --dev\n    $ ONLINE=1 test/test.bash\n\nThis is just a testbot which should connect to the __#hubot-syslog__ channel of __irc.freenode.net__.\n\n## Philosphy: a syslogd replacement\n\n\u003e (NG-/R)Syslog is great, but its configuration can become herculean quite fast.\n\nHubot-syslog uses [syslog-middleware](https://npmjs.org/syslogd-middleware), therefore it is\nhighly extendable, syslog-compatible UDP/TCP loggingdaemon with use()-middleware support (like express).\n\n__robot.logserver__ is your entrypoint to the `syslogd-middleware` module\n\n    reuiqre('mymodule')(robot.logserver) // add inputs\n    robot.logserver.use(...)             // add middleware/parsers\n    robot.logserver.output.push (..)     // add outputs\n\nfor more info see the `syslog.coffee` initialisation in the top\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fhubot-syslogd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fhubot-syslogd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fhubot-syslogd/lists"}