{"_id":"@appoptics/statsd-appoptics-backend","_rev":"11-5a20a5b6d13f3d67ddb2700b3d50db89","name":"@appoptics/statsd-appoptics-backend","dist-tags":{"latest":"1.2.1"},"versions":{"1.2.0":{"name":"@appoptics/statsd-appoptics-backend","description":"A StatsD backend for AppOptics Metrics","version":"1.2.0","license":"MIT","homepage":"https://github.com/appoptics/statsd-appoptics-backend","repository":{"type":"git","url":"git://github.com/appoptics/statsd-appoptics-backend.git"},"author":{"name":"Mike Heffner","email":"mike@solarwinds.cloud"},"contributors":[{"name":"Bryan Mikaelian","email":"bryan@solarwinds.cloud"},{"name":"Michael Beale","email":"mbeale@solarwinds.cloud"},{"name":"Bruce MacNaughton","email":"bmacnaughton@gmail.com"}],"keywords":["appoptics","metrics","statsd"],"engines":{"node":">=4.0.0"},"devDependencies":{"nock":"^9.0.13","nodeunit":"^0.11.0","pre-commit":"^1.2.2","sinon":"^2.1.0"},"main":"lib/appoptics.js","scripts":{"test":"nodeunit","lint":"eslint lib test"},"pre-commit":["lint","test"],"bin":{"statsd-appoptics":"./bin/statsd-appoptics"},"gitHead":"a55cfb11ae7f98927e5056c5d097cc5e3b0474b0","bugs":{"url":"https://github.com/appoptics/statsd-appoptics-backend/issues"},"_id":"@appoptics/statsd-appoptics-backend@1.2.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-H5rGOje0E7Ay+zY/S4T55KikkMbd/wAI9qogiiQyx3iOALwpU8LhNXlevIXvGm8/z0iWBu3rIgzQGpyTt+RbKA==","shasum":"6de234e70e8f0568ae6e10420fe2160920ca50a0","tarball":"https://registry.npmjs.org/@appoptics/statsd-appoptics-backend/-/statsd-appoptics-backend-1.2.0.tgz","fileCount":9,"unpackedSize":45474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd++AXCRA9TVsSAnZWagAAmi8P/2QoNKUaefQ3PR5kq5F0\nvt/ek8rUqnWUPfGYX9pY4lf8ovEVwkTdmh0Qt0nunmIRtiTj5naoDlyKrQQg\ngXZQo++nGL8D4YunNQWqDNRlZ8GMP5zs5yeVJPlQ6iZjfsQ4VophZBbJ/uw9\nnXyoSsH3090K7HuJDrNILG+JE5TEt1NrHuxq7m5EriOQvzttvokcRO82GMeG\n1ZltQDt7eQk2oZ3uDytCK54HaQKJLWPQipmb0xRgsuTDdoD6XuYZUzcebTDy\n/pjJhu48ECtUqtnC1q75QBTESwjuYC17kcNJ8YZDAaQ+ji+y42jMwJFNkY6x\ncNcp7cjKEE8EyyK9By+lIjlJkhx+RqzgcORzDpLxxaTcQZKlP6al3EXjOo0+\nDkVV95EjqsNqNSKFUu5hAoRybjpmtaNZIObwKfF0+agBjFFhPJk3FWDdq04f\nh3i/lKBS5YX1lyQ7MApczS7WJZJYlj7w1Z4dESZOvtBo1qJKShxuk4w8Rp7b\n7GcA9KUmbJMaV9ZestKYUuVmLaQYWZM35ZDh3A/WF+6u0uvk5lFFZscY3Wtn\n3bOPbWkXSwrh0KkCsXorB689lFhb+iPyK0ECrghOXXvyjx9Zb+ucmJUc2e8O\nTV/5ng3OrZvyk91OAeeHxKjU+/KvVCr/RKGOCqAOJRNCA2GkISPftoNfcBfh\ngoec\r\n=ECEN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWbXrxOEOUPeZsM9u/zWXCy2dyKaFTjapNkbM2eK7MyAiEA8878bI48jpBllZXTFnjSCo/bzjce4cP1LZSIqpDsSSA="}]},"maintainers":[{"name":"lin-solarwinds","email":"lin@solarwinds.cloud"},{"name":"bruce-solarwinds","email":"bruce@solarwinds.cloud"},{"name":"bmacnaughton","email":"bmacnaughton@gmail.com"}],"_npmUser":{"name":"bmacnaughton","email":"bmacnaughton@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/statsd-appoptics-backend_1.2.0_1576787991365_0.8599698760158649"},"_hasShrinkwrap":false},"1.2.1":{"name":"@appoptics/statsd-appoptics-backend","description":"A StatsD backend for AppOptics Metrics","version":"1.2.1","license":"MIT","homepage":"https://github.com/appoptics/statsd-appoptics-backend","repository":{"type":"git","url":"git://github.com/appoptics/statsd-appoptics-backend.git"},"author":{"name":"Mike Heffner","email":"mike@solarwinds.cloud"},"contributors":[{"name":"Bryan Mikaelian","email":"bryan@solarwinds.cloud"},{"name":"Michael Beale","email":"mbeale@solarwinds.cloud"},{"name":"Bruce MacNaughton","email":"bmacnaughton@gmail.com"}],"keywords":["appoptics","metrics","statsd"],"engines":{"node":">=4.0.0"},"devDependencies":{"nock":"^9.0.13","nodeunit":"^0.11.0","pre-commit":"^1.2.2","sinon":"^2.1.0"},"main":"lib/appoptics.js","scripts":{"test":"nodeunit","lint":"eslint lib test"},"pre-commit":["lint","test"],"bin":{"statsd-appoptics":"./bin/statsd-appoptics"},"gitHead":"ec85e1d98d2a5ff0b3a4fde051049d03edbe3930","bugs":{"url":"https://github.com/appoptics/statsd-appoptics-backend/issues"},"_id":"@appoptics/statsd-appoptics-backend@1.2.1","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-NCVdAt56fVDoXXTAkTGjvFCPFLcD2qJrVIaHU1tYmUACqXfJvuA1F7Pva5X1iTbF2abiBtwTgp6jJzZ31H/9pw==","shasum":"8c35064c5cb0e3c1ebbf939f0f430938de9ddf1a","tarball":"https://registry.npmjs.org/@appoptics/statsd-appoptics-backend/-/statsd-appoptics-backend-1.2.1.tgz","fileCount":9,"unpackedSize":45485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd++qQCRA9TVsSAnZWagAA8KsP/jN5VJbxnFjY9WqWmS2P\nwoeWogd7AkwwNvOTAf+aBJokVrSZmN0kmFLfIwpZIGTfOjImQnHd52tqHb13\nCFQ9GHEr7Pe4d1d3c1YgQDixy85+2kgIQ4+n4mC8OHPAdnla5BeaIvoEmP/V\n4ZzinK9pN2sJPWxjOJ7eRCW9ISks+7VqSrd4tJUdgGPXjtNmTNgU/UsaVmb7\nwR21sKP+HAT/20QHhNtB3xjjsnQdQ3S11/QJ9V4m6du9zUzP63kV4bd0jHZB\nbgp8a5JCeX0EzBbewaSRIUnCQfH/FlRhmZLytFLVuR88+BVNApJk56QXFkzE\ndtnTGGG11r6xEAjDI6nfT3WW90/Csn0MOo69Ca/mytC4RyEwGtpcj/vWU9cp\nhnqd8Gl0A/iIT222WpdIruvz+G6yV26ONb+UYOf5PcUvEgkQ3X5jr4MLlhla\nCHrpBCyDUCwpzIgQrjalp7iVNx0Kf6l0Gw41IiGMldc+TooWlQHEnWa9We+r\n67F1Ej8rFcpiO3wpYw3NUlpEo2YWGwh2kUetUSy8yrQGtCkdVIy0QX35dyx5\n1CTPk7x22PlpUzhWUD3PYJDrdwKYwE7jut/VxC6O/ODxvOubNKm1lluZqYRz\nxlAk82Hiy5cabenwf1aH/YKRyE+dvTx/tVCJ+dCFz4hb4sM+Qowmff0wLBRJ\nAhc9\r\n=NM+0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMEbhBE2fcyCZjMSKLvdgQdufFqE1/qP55jYJCNHILLAiEAu3xNCJrwtBYfk7VLcH6kIoAV/Jx0Z94wbPU3377s7Bo="}]},"maintainers":[{"name":"bmacnaughton","email":"bmacnaughton@gmail.com"},{"name":"bruce-solarwinds","email":"bruce@solarwinds.cloud"},{"name":"lin-solarwinds","email":"lin@solarwinds.cloud"}],"_npmUser":{"name":"bmacnaughton","email":"bmacnaughton@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/statsd-appoptics-backend_1.2.1_1576790672241_0.1756836371773769"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-19T20:39:51.214Z","1.2.0":"2019-12-19T20:39:51.472Z","modified":"2022-10-01T00:00:00.351Z","1.2.1":"2019-12-19T21:24:32.346Z"},"maintainers":[{"email":"lin.lin@solarwinds.com","name":"lin-solarwinds"},{"email":"apmagent@solarwinds.com","name":"appoptics-npm"}],"description":"A StatsD backend for AppOptics Metrics","homepage":"https://github.com/appoptics/statsd-appoptics-backend","keywords":["appoptics","metrics","statsd"],"repository":{"type":"git","url":"git://github.com/appoptics/statsd-appoptics-backend.git"},"contributors":[{"name":"Bryan Mikaelian","email":"bryan@solarwinds.cloud"},{"name":"Michael Beale","email":"mbeale@solarwinds.cloud"},{"name":"Bruce MacNaughton","email":"bmacnaughton@gmail.com"}],"author":{"name":"Mike Heffner","email":"mike@solarwinds.cloud"},"bugs":{"url":"https://github.com/appoptics/statsd-appoptics-backend/issues"},"license":"MIT","readme":"# StatsD AppOptics backend\n\n[![npm](https://img.shields.io/npm/v/statsd-appoptics-backend.svg)](https://www.npmjs.com/package/statsd-appoptics-backend)\n[![Travis](https://img.shields.io/travis/appoptics/statsd-appoptics-backend/master.svg)](https://travis-ci.org/appoptics/statsd-appoptics-backend)\n[![npm](https://img.shields.io/npm/dm/statsd-appoptics-backend.svg)](https://www.npmjs.com/package/statsd-appoptics-backend)\n[![npm](https://img.shields.io/npm/l/statsd-appoptics-backend.svg)](https://github.com/appoptics/statsd-appoptics-backend/blob/master/LICENSE)\n---\n\n## Overview\n\nThis is a pluggable backend for [StatsD][statsd], which\npublishes stats to [AppOptics](https://www.appoptics.com).\n\n## Requirements\n\n* [StatsD][statsd] versions >= 0.6.0.\n* An active [AppOptics](https://my.appoptics.com/sign_up) account\n\n## Installation\n\n    $ cd /path/to/statsd\n    $ npm install @appoptics/statsd-appoptics-backend\n\n## Configuration\n\nYou will need to add the following to your StatsD config file.\n\n```js\nappoptics: {\n  token:  \"ca98e2bc23b1bfd0cbe9041e824f610491129bb952d52ca4ac22cf3eab5a1c32\"\n}\n```\n\nExample Full Configuration File:\n\n```js\n{\n  appoptics: {\n    token:  \"ca98e2bc23b1bfd0cbe9041e824f610491129bb952d52ca4ac22cf3eab5a1c32\"\n  }\n  , backends: [\"statsd-appoptics-backend\"]\n  , port: 8125\n  , keyNameSanitize: false\n}\n```\n\n\nThe *token* settings can be found on your AppOptics account\nsettings page.\n\n## Enabling\n\nAdd the `statsd-appoptics-backend` backend to the list of StatsD\nbackends in the StatsD configuration file:\n\n```js\n{\n  backends: [\"statsd-appoptics-backend\"]\n}\n```\n\nStart/restart the statsd daemon and your StatsD metrics should now be\npushed to your AppOptics account.\n\n\n## Additional configuration options\n\nThe AppOptics backend also supports the following optional configuration\noptions under the top-level `appoptics` hash:\n\n| Parameter | Description |\n| --------- |------------ |\n| snapTime  | Measurement timestamps are snapped to this interval (specified in seconds). This makes it easier to align measurements sent from multiple statsd instances on a single graph. Default is to use the flush interval time. |\n| countersAsGauges | A boolean that controls whether StatsD counters are sent to AppOptics as gauge values (default) or as counters. When set to true (default), the backend will send the aggregate value of all increment/decrement operations during a flush period as a gauge measurement to AppOptics.<br/><br/>When set to false, the backend will track the running value of all counters and submit the current absolute value to AppOptics as acounter. This will require some additional memory overhead and processing time to track the running value of all counters. |\n| skipInternalMetrics | Boolean of whether to skip publishing of internal statsd metrics. This includes all metrics beginning with 'statsd.' and the metric numStats. Defaults to true, implying they are not sent. |\n| retryDelaySecs | How long to wait before retrying a failed request, in seconds. |\n| postTimeoutSecs | Max time for POST requests to AppOptics, in seconds. |\n| includeMetrics | An array of JavaScript regular expressions. Only metrics that match any of the regular expressions will be sent to AppOptics. Defaults to an empty array.<br/><br/>{includeMetrics: [/^my\\.included\\.metrics/, /^my.specifically.included.metric$/]} |\n| excludeMetrics | An array of JavaScript regular expressions. Metrics which match any of the regular expressions will NOT be sent to AppOptics. If includedMetrics is specified, then patterns will be matched against the resulting list of included metrics. Defaults to an empty array.<br/><br/>{excludeMetrics: [/^my\\.excluded\\.metrics/, /^my.specifically.excluded.metric$/]} |\n| globalPrefix | A string to prepend to all measurement names sent to AppOptics. If set, a dot will automatically be added as separator between prefix and measurement name. |\n| tags | Define global tags that are used as defaults in all measurements. If per-stat tags are defined these tags are not included unless `mergeGlobalTags` is set. |\n| mergeGlobalTags | If truthy merge global tags into any per-stat tags; if a tag is specified in both places the per-stat tag is used. If falsey and per-stat tags are set then no global tags will be included. |\n\n## Reducing published data for inactive stats\n\nBy default StatsD will push a zero value for any counter that does not\nreceive an update during a flush interval. Similarly, it will continue\nto push the last seen value of any gauge that hasn't received an\nupdate during the flush interval. This is required for some backend\nsystems that can not handle sporadic metric reports and therefore\nrequire a fixed frequency of incoming metrics. However, it requires\nStatsD to track all known gauges and counters and means that published\npayloads are inflated with zero-fill data.\n\nAppOptics can handle sporadic metric publishing at non-fixed\nfrequencies. Any \"zero filling\" of graphs is handled at display time\non the frontend. Therefore, when using the AppOptics backend it is\nbeneficial for bandwidth and measurement-pricing costs to reduce the\namount of data sent to AppOptics. In the StatsD configuration file it is\nrecommended that you enable the following top-level configuration\ndirective to reduce the amount of zero-fill data StatsD sends:\n\n```json\n{\n   deleteIdleStats: true\n}\n```\n\nYou can configure your metric in AppOptics to display the gaps between\nsporadic reports in a variety of ways. Visit the [knowledge base\narticle](https://docs.appoptics.com/kb/faq/gap_detection/)\nto see how to change the display attributes.\n\n## Publishing to Graphite and AppOptics simultaneously\n\nYou can push metrics to Graphite and AppOptics simultaneously as\nyou evaluate AppOptics. Just include both backends in the `backends`\nvariable:\n\n```js\n{\n  backends: [ \"./backends/graphite\", \"statsd-appoptics-backend\" ],\n  ...\n}\n```\n\nSee the [statsd][statsd] manpage for more information.\n\n## Using Proxy\n\nIf you want to use statsd-appoptics-backend througth a proxy you should\ninstall **https-proxy-agent** module:\n\n        $npm install https-proxy-agent\n\nAfter that you should add the *proxy* config to the StatsD config file\nin the appoptics configuration section:\n\n```js\n{\n  \"appoptics\" : {\n    \"proxy\" : {\n      \"uri\" : \"http://127.0.0.01:8080\"\n    }\n  }\n}\n```\n\nThat configuration will proxy requests via a proxy listening on\nlocalhost on port 8080. You can also use an https proxy by setting the\nprotocol to https in the URI.\n\n## Tags\n\nOur backend plugin offers basic tagging support for your metrics you submit\nto AppOptics. You can specify what tags you want to submit to AppOptics using\nthe *tags* property in the appoptics configuration section of the StatsD\nconfig file:\n\n\n```js\n{\n  \"appoptics\" : {\n    \"tags\": {\n      \"os\" : \"ubuntu\",\n      \"host\" : \"production-web-server-1\",\n      ...\n    }\n  }\n}\n```\n\nThe `tags` property defines global tags, i.e., tags that are included in all\nmetrics submitted to AppOptics in addition to any per-stat tags (next\nparagraph).\n\n\nWe also support tags at the per-stat level should you need more detailed tagging.\nThe syntax for per-stat tags is:\n\n```\nmetric.name#tag1=value1,tag2=value2:metric-value\n```\n\nStarting with a `#`, supply a comma-separated list of tag-name=value pairs\nto be sent with this specific metric. For the example above, the following\nis submitted to AppOptics: name of `metric.name` with a value of `metric-value`\nwith the tags `tag1=value1` and `tag2=value2`. You are welcome to use any\nstatsd client of your choosing.\n\nPlease note that in order to use tags, the statsd config option `keyNameSanitize`\nmust be set to `false` to allow these tags in your config file name.\n\n## Docker\n\nYou may use `bin/statsd-appoptics` to easily bootstrap the daemon inside\na container.\n\nInvoking this via `CMD` or `ENTRYPOINT` will create a simple\nconfiguration and run the statsd daemon with this backend enabled,\nlistening on `8125`.\n\nThe following environment variables are available to customize:\n\n - `APPOPTICS_TOKEN`\n - `APPOPTICS_SOURCE`\n\n## Development\n\n- [AppOptics Backend](https://github.com/appoptics/statsd-appoptics-backend)\n\nIf you want to contribute:\n\n1. Clone your fork\n2. `yarn install`\n3. Hack away\n4. If you are adding new functionality, document it in the README\n5. for tests, run `yarn test`\n6. Push the branch up to GitHub\n7. Send a pull request\n\n[statsd]: https://github.com/etsy/statsd\n","readmeFilename":"README.md"}