{"_id":"@5to3/influx-firehose-forwarder","_rev":"1-f0b92398afb6d76fa34fdcbbc4f95fa4","name":"@5to3/influx-firehose-forwarder","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@5to3/influx-firehose-forwarder","version":"1.0.4","description":"A simple forwarder that acts as an InfluxDB subscriber, forwarding each write to an AWS Firehose stream.","keywords":["influx","influxdb","aws","firehose"],"main":"index","bin":{"influx-firehose-forwarder":"index.js"},"repository":{"type":"git","url":"git://github.com/5to3/influx-firehose-forwarder.git"},"bugs":{"url":"http://github.com/5to3/influx-firehose-forwarder/issues"},"scripts":{"start":"node index.js","test":"ava"},"author":{"name":"Marian Zange","email":"marian@5to3.io"},"license":"MIT","dependencies":{"aws-sdk":"^2.404.0","express":"^4.16.4","influx-line-protocol-parser":"^0.2.0"},"devDependencies":{"ava":"^1.4.1","aws-sdk-mock":"^4.3.1","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.16.0"},"gitHead":"9b18ed6c12a49d51a2555eecf2a6642634aba48d","homepage":"https://github.com/5to3/influx-firehose-forwarder#readme","_id":"@5to3/influx-firehose-forwarder@1.0.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"mzange","email":"marian@crashpad.io"},"dist":{"integrity":"sha512-Q41pj5Jb+iWx9wJ+yZzYLn2VJ1VVXKN/gYuZkeQBoBZhX19BdvjCSL1wV2mv9hpp8vbm4W7hq0XYvgTQJhMcbg==","shasum":"818933d5b33753c234c6baae44ce9a186deb6fce","tarball":"https://registry.npmjs.org/@5to3/influx-firehose-forwarder/-/influx-firehose-forwarder-1.0.4.tgz","fileCount":7,"unpackedSize":7528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrxTHCRA9TVsSAnZWagAA9uAQAJuSHVtJLqGQmC3u17DP\n5Q2i3beMhzmDesa/nPfVsThac2d2A0wy1LQ8ho9PKFaOEMiDTiIf4pMFzkdJ\nNkxosdJ13J7Qm8AKuOYSKdFIQsyaBqtH5bQZYChOUgIhlXVTmX0AMhBMz2kQ\naANp6/N+g1Uap03624n/9anLDYXaJeeuhvS9Ha2owWp9Lq6+IpS5hZoQEGa2\nJDpYa+i4BH1szKbnT+6pcOofJ95BahS4MSbzhGdq/5uMRwH41KlmLWYh8rgw\nWUwMz5Neqa7neBAS8ehS6+OvjxfJBWcnRBkFLsrrXSCLzXNTZ7iIt+WqazC6\nbsFw2yujNAsAFl6SiyKdHsV8WsLbdU2ASiRJ7qNWQ4PnIB4g5A/dV8AyNpbc\nvaAXe/lfuW5EnChzAFT55uoG4Oi+ddzUZ7odAxKDx4ZbLxohntNs43zBQ0Ls\nH6grLJ4BFj8sjDj5IQUt0XWMUOteDnQ8Oy8I4ckit+xXmtreNLtAklEaPqJw\n0SAlDS7/dkVipyXZ+WC3wW6tZ1aglRdVZfclduP5cZOVyBG/citpwYMw8au6\ndHTWZScmCSQQQNJv0zSBb82Xi1deRPeNbrHlxvKS7wxEE+seLiO4fO5MRCet\nWsOEG6vOKt7dp5yiiGWVkSZl8t4Ckt7/WSVJbq5/MHm4iqBrxg34Jh5EjkrM\njEd4\r\n=u60w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBReA2EsP6Gu3JL3nmXZkzU2FkHElFc43Z2DAyM9QKTrAiEAmkWj0z1b+Tcac1lJIsrT+fFYe2X7gKD2JZizWWs6eZQ="}]},"maintainers":[{"name":"mzange","email":"marian@crashpad.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/influx-firehose-forwarder_1.0.4_1554977990900_0.005731402841793409"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-11T10:19:50.818Z","1.0.4":"2019-04-11T10:19:51.086Z","modified":"2022-04-04T10:48:40.402Z"},"maintainers":[{"name":"mzange","email":"marian@crashpad.io"}],"description":"A simple forwarder that acts as an InfluxDB subscriber, forwarding each write to an AWS Firehose stream.","homepage":"https://github.com/5to3/influx-firehose-forwarder#readme","keywords":["influx","influxdb","aws","firehose"],"repository":{"type":"git","url":"git://github.com/5to3/influx-firehose-forwarder.git"},"author":{"name":"Marian Zange","email":"marian@5to3.io"},"bugs":{"url":"http://github.com/5to3/influx-firehose-forwarder/issues"},"license":"MIT","readme":"# influx-firehose-forwarder\n\n![Travis (.org)](https://img.shields.io/travis/5to3/influx-firehose-forwarder.svg)\n![npm](https://img.shields.io/npm/v/influx-firehose-forwarder.svg)\n\nA simple forwarder that acts as an InfluxDB subscriber, forwarding each write to an AWS Firehose\nstream. This forwarder is useful if you want to do just in time backups of writes to an InfluxDB.\nIt acts as a subscriber that is called by InfluxDB upon every single write. Since InfluxDB retries\nfailed sends, this code doesn't include any queing or retry logic.\n\nAt 5to3 we're running this on a Raspberry Pi in our lab. It collects data from multiple sensors\nand stores it in InfluxDB. To avoid data loss in the worst-case-scenario, we're directly\nshipping off each measurement to a Firehose stream with S3 backend.\n\n## Installation\n\nThe easiest way is to install this package globally through NPM:\n\n```bash\n$ npm -i -g influx-firehose-forwarder\n```\n\n## Running\n\n```bash\n$ FH_DELIVERY_STREAM=test influx-firehose-forwarder\n```\n\n## How to keep it running\n\nIf you're running the forwarder on an OS with systemd, you can easily add it as a unit\nto keep it running and automatically restarting in case of an error. Simply use the following\nexample unit as a starting point for your own configuration.\n\n```\n[Unit]\nDescription=InfluxDB Firehose forwarder\n\n[Service]\nExecStart=/usr/local/bin/node /opt/firehose/app.js\nRestart=always\nRestartSec=10\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=influx-firehose-forwarder\nUser=someuser\nGroup=somegroup\nEnvironment=NODE_ENV=production\nEnvironment=FH_HOST=localhost\nEnvironment=FH_PORT=3000\nEnvironment=FH_DELIVERY_STREAM=test\n\n[Install]\nWantedBy=multi-user.target\n```\n\n## Adding the forwarder as a subscriber to InfluxDB\n\nUse the Influx shell to add the forwarder as a new subscriber:\n\n```bash\n$ influx\n> CREATE SUBSCRIPTION \"sub0\" ON \"your_db\".\"autogen\" DESTINATIONS ALL 'http://127.0.0.1:3000'\n> SHOW SUBSCRIPTIONS\nname: your_db\nretention_policy name mode destinations\n---------------- ---- ---- ------------\nautogen          sub0 ALL  [http://127.0.0.1:3000]\n```\n","readmeFilename":"README.md"}