{"_id":"triton-metrics","_rev":"43-b8d0f4e5cd9f54fd4ba9a0c562a942ec","name":"triton-metrics","dist-tags":{"latest":"1.0.3"},"versions":{"0.1.0":{"name":"triton-metrics","version":"0.1.0","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@0.1.0","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"e3aa8c591a3edb1c04822110f15022aa326bf11a","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-0.1.0.tgz","fileCount":12,"integrity":"sha512-00fBH0FmLdkW3rP5/+dUV5mJpe5JZBPgVV701oM2ctIQeIfUrfO6Nxhwb8L47Bic+FhFltxgy/WhbltJGENd5Q==","signatures":[{"sig":"MEQCIBBYkd3M8yVyTx5yZ3H3IWXPS7am2hnyT450hUGVsNIjAiASICm8CQ+Jcw7nCNdIQxQeKIOTFDMLDgSPksDKwA5tgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44144},"main":"./lib/index.js","gitHead":"e0025e61c7410652f529fcde91e9eb9d8cb08ed0","_npmUser":{"name":"dyep49","email":"dyep49@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"5.6.0","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"8.9.4","dependencies":{"artedi":"1.3.0","bunyan":"1.8.12","verror":"1.10.0","assert-plus":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","vasync":"2.2.0","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.3.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_0.1.0_1520550185059_0.18121148457416392","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"triton-metrics","version":"0.1.1","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@0.1.1","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"8654cce91a3be2958909366ecbd6596418ef84d0","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-0.1.1.tgz","fileCount":12,"integrity":"sha512-cqC8Sf2kDgBcJPmeQdx6B2Mom8bdr6V1CC7Eo7//zKxkuSO7cmSGBom5M/yglXsuVVbvS5CAvELwztgVEg7/7A==","signatures":[{"sig":"MEUCIQD39mVRCu0+8uHKCRdKonl4jzw0z8GFXMgqLahWQ+jF9QIgHOTFQ6qTSA99qKckJzyJ6+1LopXcco1nUuqQZFXKU30=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43888},"main":"./lib/index.js","gitHead":"09cf1c5df687d3f423089d54c187a7db6fb0646e","_npmUser":{"name":"dyep49","email":"dyep49@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"5.8.0","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"8.9.4","dependencies":{"artedi":"1.3.0","bunyan":"1.8.12","verror":"1.10.0","assert-plus":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","vasync":"2.2.0","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_0.1.1_1522965373686_0.4966525646426998","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"triton-metrics","version":"0.2.0","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@0.2.0","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"1fbad949d5a187b47310ffb781e3eaf04c19fdf4","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-0.2.0.tgz","fileCount":12,"integrity":"sha512-M+3+MPXQP7M/KhrF906jOZqUIsPdoMO52gvWUZbjsPExKqjoE1pOD9gOz4Afq1CygWpOTrh6OzETUPp+DGRzmg==","signatures":[{"sig":"MEYCIQDtPYJ6DXcVjjU1jaeXg5facYd+12OG/+m1Z/f87cWtUQIhAN9STQSanel+AmNdH8AmGLGesmwXt3seCYMLPkOKzMUW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMXbMCRA9TVsSAnZWagAACqQP/j9TWGTAVlL6bLIUpy8o\ng/W87Dsi8xKGbJWIdY8o2argawVkrJmgk3UyTnNunmlL/qhHsbxImkVsYaAv\nMAgOaWQ0IuHZ08R2Valqo7jd/5f3Pjx+50mW2IMeRkD43dXdsLvtj9mvI/Nh\nkj/lbabrWWF5EPSEqYdU1swTabEQ9i3NUSHOiW5NVmaLTcYnRwhfbQ2fRzjb\n2/eRlApW74X3FieFJBlF1+MawRQXh5So670AMaksBOjBO60FRnvYFgqLLURa\ncooLEkQFInFi0wzLdVd6c9dh9V3AdXkq63PSAVCMgDGFmbIzDAQ6M3Mw9/YY\nz+zxgN8FZw1PM/+adTYMOZVTqtAFIroxP5D08GZgPGE6MoTv0OYvH3W2SWY5\njA2lVvIS6l1hGOFt7E5cpxUMclU5gBxk9rrIRnrKM3MMOSoV/v5fTwqM7+Y1\ngjcKVnSTDPIQ2LJXmJ7hsjK24WaaMbQqWn/SDapKLIsezmNtN1I3LYaijf2I\nrMwdskoCtsT1LQO4SsYyQgMTiU4SCaX6+seBU3dXRp0RLxTNIvR30H8b27mt\nFZnbr2hX8oTiBL/r4JteKiMm6t8FfyqzuMyS5IlwkMKDDSoojpdJ8yYN60+W\nw8tQWT/Nx/i7wCsZIC2QP0TNWPgA4j3jGc7E6S4r9x1kcNSehsrRXHEUQsYC\no83b\r\n=WTkc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"20acda65679f67e4b1bb5d24b94423cb480cd763","_npmUser":{"name":"dyep49","email":"dyep49@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"5.8.0","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"8.9.4","dependencies":{"artedi":"1.3.0","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","assert-plus":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_0.2.0_1529968332774_0.07642087322668267","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"triton-metrics","version":"0.3.0","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@0.3.0","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"7dc89c5a209774e54811391fa10e25727ac66766","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-0.3.0.tgz","fileCount":14,"integrity":"sha512-/cCI3ZOV6M//NbfUSp4OlSdaTWDBMz9A+QMOLn0nbn9CQ4IpZpj0okzrnNSIDxruVNxyk7LJ8wF/Chq8I9jEmw==","signatures":[{"sig":"MEUCIGk3YUunrI6xWBVfcJ+B1ZvOgxTERPPDjJ9lAT5m5/WpAiEA+C1HxTMQCiMlL6Y3EAvoN5Gxp720jHPrM/LtTvD/17s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY1rICRA9TVsSAnZWagAANvkQAJu4Y/R8E0IUppw0YYEb\n8rSBVcD6TprG6LUsxb4vlANaVF/uD2+zqIbXnijepdR5uP5s55o/DwCnYSFq\nrCpeI7Vy3IaQU+XBARAOTsxkp+Calnpfu8KGVbn4H2MDF75ALwygSRf+7vd9\nGvPvP/BKs8rbU4zi07XleUnHUGdiad4PueMt5hXZfEPoPCEIEtKoJDm4PXpC\nH8abpXfxCOyqurL/F05rrWTaF/EaJfitVHdRkooVWPbM42niKtQppgdUR7qJ\nPLYS05MjCLdfvReaRNL1YP2VLvon0dvqmxYkZjZUEy2S7PxtANGYiG613opq\n55oa7PsVWlM9eYny7LFfn0n41OjaAVL3m9J4DEpX9gg2G4K9im4miWv9t/Kh\nAXpuJ1lVlI7j7iCdvjHmlZuerPIztrxL5ykWJ4ivtW62dycqRrJag3+090We\n3g6T38gLBeb7iRwoLcwU1gwtJ93ZA3RKPtcuqgA9wju76SFloP0YOgYX/SE4\nyZOqPigk5mFlcNeNriHWkIqVPmPP4vvnkslHTZ364CJb6do/GolwI8NYSK5I\nXYRm0xNcz+Nx9CeFVRmr9CprRZyr2lPEc4DlNuVxNNlipOfVtEyRa/lr/liN\nPyCeF1HNpCQVszbkrOVo3/I9NFPPjatUUw/hpLlqQo4G6ys60PP9Bpplj5qu\n4YoZ\r\n=UfTt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"f13227f0b1a4a8428876c432687f847f165b9738","_npmUser":{"name":"dyep49","email":"dyep49@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.2.0","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"8.9.4","dependencies":{"artedi":"1.4.1","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_0.3.0_1533237959934_0.6859042723265028","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"triton-metrics","version":"0.3.1","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@0.3.1","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"91bc2101d580a402d055e1e59b73b1d2048f0768","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-0.3.1.tgz","fileCount":14,"integrity":"sha512-+JC4wt703XeIJVIr7s3F3SrXlgh8/7qdBzJ8uO5ZLWFPX01EdjR/hvtNZAv4ORqgyenyw0H7VDq+EgMR2pKuNA==","signatures":[{"sig":"MEYCIQCmAumnNxNWN894hOunnFtwunCrsAWXICT0QwbVfyWbgwIhAM1VJgLiTaCUvxrZF4YtbkmAIfV7SxEk6zs9/Q4fIx0m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbNnXCRA9TVsSAnZWagAAgm4P/0S//XGNxFNrwQEIiiQ6\nyx9e3Dv5pHJecXHvwAMcES1I9/uRO3yEmLeFwpjy29e1W1sZL/SlcdryI6+/\nwWLUWF6OM0MNyhhkbj72gNHkwhm+a3ZPGYH3IcPUkL1m9lB/cLVB+esEP/lT\nfb7GbMmwhiPaG0fdOD2o2eggB7xwJHF3Su1UQCbwcseTbgbRAKe3wpI0hNu7\noNDqaHXwksaJfjTOJKO4yQwLcYJUctTj34JGIAQ3yPE1NgU2AFWRLhiiQiv/\n+a9erVJFaeeyKO3GQNq/8DJ2BDJVh7dYSyiT5ZbVTAi45//3/gmPXfVwNyNE\nU7OicpfT2D/9naZ8+MjuDsLjjs/hZ1+h9ZsKk5Y0O55SVL7EIZsZEogckW1s\nOIIM4Msz2QK+Em8n9eIzGGrB5gK0BfvOVo3OJ4oXWeFMmyRD87rtLYja54Ks\nMISOHMOJnngbkNQo/qXqV85QcfQs0w91HhctcEZoXkVIt3z5MYjX8Lk7hha4\nYesXDGbXcvynuDMMxIlDXMqx1vzv3uiBWZCN23tyl4+7mRlXAJKV4bkFM9D8\njcCKPRnjdfrxtMFIU2ZiqzuzZKstJf70IQw6kYZX5gtoB7q6WjL4Yi4baOnJ\nKoekKtvXM35UAHzKAnVUR/c88opcryxSeI8W4cDWgd5iAg9/ADGxAc2QLmiH\nEPO3\r\n=cySR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"df7bca9a90197aee4619ddfffd9ca0ceb4151999","_npmUser":{"name":"dyep49","email":"dyep49@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.2.0","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"8.9.4","dependencies":{"artedi":"1.4.1","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","gc-stats":"1.2.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_0.3.1_1533860310872_0.044420518254670416","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"triton-metrics","version":"0.4.0","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@0.4.0","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"3927eada1e9236f51e2e0c791f2a3185503683e9","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-0.4.0.tgz","fileCount":14,"integrity":"sha512-0KEBdgxeQm1OPcDO6FbonPReRlvWpDKrmaAxrvN+xTQD+qUC5FIhXpZF2mpr6c4jCOOfWipNsJncPzqrVJQwgg==","signatures":[{"sig":"MEUCICT/oVf0LCQZPdLNd82DZ+IK8EO4XADSNdqor7tW2AZ6AiEAhHFlNelfdTOBWiRY6vd3OOlGTHogJ8m+p4qGqmH0Vc4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdFyOCRA9TVsSAnZWagAAVJYP/RMBS3CnqS3MO1Eqs3Zl\nPkrzB86dVUOxpvWTJVTiipwe0BEK/pEWb99Nt4nXWvBtkhF7/0cF0lxPtaTY\nHSQY1FwpPRVHo3mVRplMaMefVT2EAleBWTdrJSdhKsSJQiNyTregiWbkQUiS\ndR+LCPQGBH1VBOaJssNDgTSA+xuBtmvzF2LhixCZgpwR0cfPDyIap+kSCMou\nxhD+0yNadyZVWy+HoNZX6qisdjzuJfbY5ZY/kGuGstzAVRpo4w6tVnWmeNyK\nUmIWRUF9xJO8Ubg6jAeVnzWwJ9q8Yhz4g3kGMzJzd4EJetq4GNzun7t9oU22\nsQIqFH0W284YNeW2lbkEI7K32yMfvTLwbzmeI9x9JzOUhCC/0gx0Nn9WkPtq\nGuemnGrRmyJ+fn39eFHtnKtNDriXeHkht9zmble3uM1pRMt+uKis2JhngaQJ\nmWgs55Q3xXnJeZIzr9Ihtpsm7pYoohY+cpSSOfIpyRrnMnGYhFC8TCNVu25R\nELfWfMC0y4qCUoHdXnF9yIu5nBDLuYwBIGFQtinnLDyGpSCu15VffWAYkVm1\nRRL/XQ7v8rHBq0anpcubOMn8TnEI+EkRxBbFHYYqUivD2ZyFf0rP+Fq7ciYK\n3JDZ9z3xkzNhjxnFtviuvnegsh90ZCtbRDmPcPxxx4jIm0Gh5fFLi6oDy/M1\nVGAz\r\n=lsrm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"5a194900f43ffc72a17da2b6f3207adddb8835d2","_npmUser":{"name":"dyep49","email":"dyep49@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.2.0","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"8.9.4","dependencies":{"artedi":"1.4.1","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","gc-stats":"1.2.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_0.4.0_1534352526849_0.7053942953962797","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"triton-metrics","version":"1.0.0","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@1.0.0","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"f1ce463697f203c7607a2fa79f3443dfe413be0f","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-1.0.0.tgz","fileCount":35,"integrity":"sha512-Zom+w7dM78YkAg94CDZqdC3dE3iT6Qw6tyYAsFk2JuU/kcKCU8pnZ8KlUf9oNcHJNmr+IZv0aeBS8J/eXhLeUg==","signatures":[{"sig":"MEYCIQCufbRVVtfKwYyRlfc2HxwB4544jmS9mSb91+n6Ip1d6gIhAOGgJ84lumQLy3Gc54Ny9Piafm4H0ZfqmrNmQ21OFno8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9GKKCRA9TVsSAnZWagAAdrMP/2vzXlSTGa/UY2RTZ2x8\n2R4McorAr5ztt3A75mvQNeQH8dJr3zh6eUlTq9vcRCunR/nMUpDCIQUGmlLq\n9i4VX8QMPg34VcSQdL16Vd4icSVCx35sCvfK+NqsAwZUsU/QO91w7kQ1/pd2\nLQ+nhoCEg8sKi21FsJ3OPmEhc5Pcv2ZBphpJNsfUO2an8c/vN4U8Fnj9XDSg\nWryxcSL0pmG/ojWOFZNHzTDmKrl2IxcMRpdgfkQGrtZzRMMiG4QSQWfbC73X\nCW15oXG3IZUfhMnpgQ4gZkwlRBIYCO/Jc+etDBPWmVeE5Yo5eLny8VFfxZBj\n7r+bSxQjWSAu88KyIlc6+TZzPCRLsHQ5Chpm7GZqPK7TckFAa8qfqfqIA/sv\nwPLcTYSZDj1nFZMkghw6MU/mtQWIbx4/zM3f84r/eHBTQVBAUZ6CzV7GaC2W\nq3N8cGdQDD7TGuoFKTjLvkaWmFAPcejtrSdQl7YUvKt82a4NSF9ruKsGVr2u\nJB7TcZyZJnE5bJUJqCIcBrdO1Vpbqize6KSIwo7XLDIuo43xAiV05ccch/35\nQvAzbG7IhEwtygnKLDT3qtqHDkryduMwNFR6Wy31T4T4RmLuptRq1Fo0aMui\nlPzb/b8ZlqL26nxClSbphGFO+OCTCU18FZyfqOCOT+NTX8kS7WR2BfuVyCOD\nbDhw\r\n=3bue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"c0411130f6c4c5c292ef7f81b691ae77a31acb3e","_npmUser":{"name":"trentm","email":"trentm@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.4.1","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"10.13.0","dependencies":{"artedi":"2.0.0","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","gc-stats":"1.2.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_1.0.0_1542742665534_0.1567250843260457","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"triton-metrics","version":"1.0.1","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@1.0.1","maintainers":[{"name":"dyep49","email":"dyep49@gmail.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"2fd4132b64ce1aac7727dd69085bb732c572b2b1","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-1.0.1.tgz","fileCount":35,"integrity":"sha512-3Q7vxOOVoDk1/OnXO+kIxjOxuR1NLq71kH5Z1U33XXtc/98+4ER84+P4BPlJFfLpfAkUJLG3gw7xVweI/Qze1w==","signatures":[{"sig":"MEQCIDuy5iuC5XkPq/tO7QeNSZcKM+PRUJ9IKqLfXlcsmrjoAiBqixJ3BVc0JUMmUY4dt04+lhcLYuL58zR4N79ulRejxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5ChICRA9TVsSAnZWagAAS7QP/AxEaoqRQo7BxKWpmdps\nmixxNmZ706XrwLXtzCVK+B4J4Cq6D2P3tw594/MSIuszSG1rplKoNLWSGlaD\n6nZc6bltevGiNvvSmKPO0oSE6ELtP4QS366fpkcIMpSZR2sV6zDxeB2RLKly\n8V2Zrk4xOzcp/n732zaQTXcm8LPXCVkbuv4YK+IG8D+w6XHIqN8WigkMqMWZ\nsJ5uDucFKAfaUM8qOOMbU7MGk4vH4VFzPXDy/lDVUf/S/XHokfKUPGOiYT2K\ni80gUhX9VbMxJy+1ubNp0+QRJij14578s66aH0P5cGtwtF97kZQdSz6Iyjgg\nWekNBswafOBIE1ZWrAY7at6nC9zPsz0wfYzL1SMl0tDSWQ/RtiATIMNAahqW\nADBgjEz+GaTCJ+6N/S51nPbroIdenadDJx97wRVW3CGa+SjmH265KPl6sRZx\nnLsJtgC2C9N8AyRgp6BeWyNSkqgH2+42mXCAO9svIQYf5pNKmPlHZOTNhJzN\nABurAw3a+1xMMwD9BclVdLtZ714DBjjN5nqlmCU9FI6hxa2TZqR704I1ieEj\n1CIe365BHsMRQh/z7Onb29+iwrRIOkpGjvdk5ILX8csT2E5yNyJA6AC/A3nH\nJEY3jNy4QeVxgpeFeN5EDoVX3rhpN+doSiIaTTxooqDF17w60BQKve0BFSuc\nwU91\r\n=nxsj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"167e1766bdbe50f2e5af0003eb7bd81735353e0f","_npmUser":{"name":"trentm","email":"trentm@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.4.1","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"10.15.3","dependencies":{"artedi":"2.0.0","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","gc-stats":"1.2.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_1.0.1_1558456391541_0.6693897388832064","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"triton-metrics","version":"1.0.2","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@1.0.2","maintainers":[{"name":"melloc","email":"cody.mello@joyent.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"9c1dbaeb11211c6c7a5064d7a479fd4a8cb52d86","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-1.0.2.tgz","fileCount":7,"integrity":"sha512-ypbvwyAjEHgtIHX0CoVed17IOEKC0/Slfdc8VJjsTrzek9bmXuQDlq0oyy3LuDjFImHi2CtYWm8CTd3sQF3vmA==","signatures":[{"sig":"MEUCIQDTlVGSk/oCmNVuicmjaU3yPI1/CUjT5zHZZ7jHG3tcFQIgL8y1T51yV7j+uVtlBOu7i7jDd7bA0YxsvHJH6TR81Es=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5DCnCRA9TVsSAnZWagAA5vYP/2D/FhNCp88C+44kuUxn\nQp0vRHpk/P58hBFz2HV3uNq1y/Vgq5y2SwiinIWAqkJho+8oCJIPQ/5FmKAL\n6PfY+zdIy2WNZUHXep1ROCl7bV2ybEkv+J93/q6YqsUAaap+gHDKpQKS/7ZD\nStyWSM9+NOxupbvzAOkBfn5pjqLVe97uqgHQKNmH4ytANMfzWlB8chFcaALS\nNk5BwJsTmMdbT1PQZmpsfKDUgTsiI8ne66H+1sIt7FrGoJtAhNPTTH84bt6o\nxGYPxzEu4rfZReV5G9VaXsIgd5mxctcG7YlI4Ox+uLxJskhHLQNIZ8RgcX9g\nEsq/W5qTUSDdyiBx5rkxvDp9GcKZsqsyJKKOBjmXOtUuDX7h6ywkRlbo2HyP\nNHaD7j/N6m3zFC6kmWbm/3FBeMTTRQsgN+kWdtzm1X/JbtUFAZunQXz8OPUD\nufDbYVaID+nU3WND4CDmLU+rdVjpTKVtd0hfgYt3c8HglY6WV2m2vBNtzkJZ\nkTFtMMKTAEnPS1TZxIxBTaR4VGSFKLeSd5QzEDwtojpT4y1ETRP3Ea4RdpPk\nAz7oPHprNTeBq0liuhzf9ASpYo1x4uuPGwCQTpdu9P9t6kpejqR8Qj8DUdVr\n8JilTasvM7oYDUL0zJ3E+gfV03NvmxAISKieJxvbnKT+SNlPbFtQVPqp6aVG\nYye7\r\n=v4H/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"ffa5a32fa1ce7f8ca2b577ef1e3594203b9502b6","_npmUser":{"name":"trentm","email":"trentm@gmail.com"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.4.1","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"10.15.3","dependencies":{"artedi":"2.0.0","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","gc-stats":"1.2.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_1.0.2_1558458534299_0.4182418708242335","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"triton-metrics","version":"1.0.3","author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","_id":"triton-metrics@1.0.3","maintainers":[{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"kkantor","email":"kody.kantor@joyent.com"},{"name":"kusor","email":"kusorbox@gmail.com"},{"name":"wyatt","email":"wpreul@gmail.com"},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"bahamat","email":"bahamat@digitalelf.net"},{"name":"chudley","email":"aguycalledrichard@gmail.com"},{"name":"mark.brooks","email":"mark.brooks@joyent.com"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"melloc","email":"cody.mello@joyent.com"}],"homepage":"https://github.com/joyent/node-triton-metrics","bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"dist":{"shasum":"c0ca3cbb6fee896bd1eef9353b0a2a9d3f1dd800","tarball":"https://registry.npmjs.org/triton-metrics/-/triton-metrics-1.0.3.tgz","fileCount":7,"integrity":"sha512-tBeL1UDct5toqkbAvqOWKVwADqqy0ZW0IFantCRE04VmH8N7X3zG/kinhlj4RPTRhQGPEWkx5dQr0LAdmtlGSQ==","signatures":[{"sig":"MEUCIHjTeSU3MZzERYLnk6/IxMaXdHMjfYklSyRXqVUkuACNAiEA3CxygyVuHMfNJQQ/g1FxUc6xALgz+5iLkp87mx3x6ts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRQb5CRA9TVsSAnZWagAAVkEP/iCkbwwvWsDZPj5Eiejj\nTWhim+ybJs/2ELIqEw+c8rVNz8e0yJBsdKK7dMED4Ya9bJhbPHMgAL9cL0Jq\nBATERoj7kFQ61r5mpFrPue+0XoPx0YwpPs6KoYtSvYd6ULCuU5ZmpUq/Cvg6\nx6/ClMgtvIWS+B7BpXIi+Tbnncg5wTw3Lb2YfyjItMZ/udE8sUN2IXme4649\nYYfVx+unTIpq6cGVyDcToR42JpPjnxjucpMsreW/FSkKcWIfd7dS1a4NHnW3\nF8KE0QMiqdufspyAk6klR5+pjxDlOtgEV3wYf2flsdaDpZaJOKZfcBcYP1xq\nuP/oWIfhGmEiZ7GlujbBUdAqx6FH/qbm/6WYjef29Vc9X4q1SWNNReNLIA2V\nt7gfodxryOK8IffOv+ksDf2xCiiwyJcUsnZ+FysgGaWX2VKZrNRFPhjCInXL\nnJ3kSGaUUkL4xS+PDd9GqiBAaLG5/zeWv13ZnQv2JTW7udancLgnXt3WobIw\ngBobLNUjAHn0+mtiBN7quHSP+TwWC+JLEJJOfth7r/f+c3iiR3aCF/TMTbw5\ntTBr2XQ8IxSvwy7ncXg2g/aV/jSNyVzPP9eUXyGOnQAGY9IrigoaQMD9Wr+s\nGgFg9Rd5ZO2LzqeAPuoOXTOBQWcUbNjt0fTcWBJRui9BCR+CotDGPsix6EcF\ncg7c\r\n=Y4Sr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"7e709d02c2f2a41974dbbf88a79cd4a6f4c48967","_npmUser":{"name":"bahamat","email":"bahamat@digitalelf.net"},"repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"_npmVersion":"6.14.9","description":"Artedi-based metrics manager for Triton core services","directories":{},"_nodeVersion":"12.19.1","dependencies":{"artedi":"2.0.3","bunyan":"1.8.12","vasync":"2.2.0","verror":"1.10.0","gc-stats":"1.2.0","assert-plus":"1.0.0","event-loop-stats":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4.9.0","eslint":"4.13.1","restify":"4.3.2","prettier":"1.9.1","restify-clients":"2.0.0","eslint-plugin-joyent":"~2.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{"restify":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/triton-metrics_1.0.3_1615136505427_0.8788659774700018","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-03-08T23:03:05.058Z","modified":"2025-11-26T18:16:05.957Z","0.1.0":"2018-03-08T23:03:05.126Z","0.1.1":"2018-04-05T21:56:13.796Z","0.2.0":"2018-06-25T23:12:12.871Z","0.3.0":"2018-08-02T19:26:00.062Z","0.3.1":"2018-08-10T00:18:31.014Z","0.4.0":"2018-08-15T17:02:06.952Z","1.0.0":"2018-11-20T19:37:45.676Z","1.0.1":"2019-05-21T16:33:11.677Z","1.0.2":"2019-05-21T17:08:54.517Z","1.0.3":"2021-03-07T17:01:45.640Z"},"bugs":{"url":"https://github.com/joyent/node-triton-metrics/issues"},"author":{"url":"joyent.com","name":"Joyent"},"license":"MPL-2.0","homepage":"https://github.com/joyent/node-triton-metrics","repository":{"url":"git+https://github.com/joyent/node-triton-metrics.git","type":"git"},"description":"Artedi-based metrics manager for Triton core services","maintainers":[{"email":"todd.whiteman@joyent.com","name":"todd.whiteman"},{"email":"kusorbox@gmail.com","name":"kusor"},{"email":"michael.hicks@joyent.com","name":"michael.hicks"},{"email":"bahamat@digitalelf.net","name":"bahamat"},{"email":"Tr@visPaul.me","name":"tpaul"},{"email":"danmcd@edgecast.io","name":"kebesays"},{"email":"trentm@gmail.com","name":"trentm"},{"email":"melloc@writev.io","name":"melloc"}],"readme":"# node-triton-metrics\n\nThis library provides a metrics manager to aid in collecting and exposing Triton service metrics.\nIt unifies the metric collection library, [artedi](https://github.com/joyent/node-artedi), \nand a Restify server that exposes those metrics in the [Prometheus](https://prometheus.io/) format.\n\n# Install\n\n```\nnpm install triton-metrics\n```\n\n# Examples\n\nThis library has only been tested with Restify 4.x, but may work with other versions.\n\nCreate the `MetricsManager` object:\n```js\nvar createMetricsManager = require('triton-metrics').createMetricsManager;\nvar restify = require('restify') // This has only been tested with Restify 4.x\n\nvar metricsManager = createMetricsManager({\n    address: config.address,\n    log: config.log,\n    staticLabels: {\n        datacenter: config.datacenter,\n        instance: config.instanceUuid,\n        server: config.serverUuid,\n        service: config.serviceName\n    },\n    port: config.port,\n    restify: restify\n});\n\n```\nStart the metrics server:\n```js\nmetricsManager.listen(callback);\n```\nIf you are measuring a restify server, a helper is provided to add restify related collectors to the `MetricsManager`:\n\n```js\nmetricsManager.createRestifyMetrics();\n```\nThese restify collectors include a counter that counts requests completed and a histogram that collects the time to process requests.\nThese metrics can be collected in the \"after\" hook of a restify server:\n```js\nvar server = require('restify').createServer();\nserver.on('after', metricsManager.collectRestifyMetrics.bind(metricsManager));\n```\nTo create custom collectors, add them to `MetricsManager#collector` according to the [artedi API](https://github.com/joyent/node-artedi/blob/master/docs/API.md):\n```js\nmetricsManager.collector.counter({\n    name: 'foo',\n    help: 'foo help'\n});\n\nvar labels = {\n    bar: 'baz'\n}\n\nmetricsManager.collector.getCollector('foo').increment(labels);\n\n// or\n\ncounter.increment(labels);\n```\nIn addition, metrics can be added to groups and can be collected with a user defined function:\n```js\nvar counter = metricsManager.collector.counter({\n    name: 'foo',\n    help: 'foo help'\n});\n\nvar histogram = metricsManager.collector.histogram({\n    name: 'bar',\n    help: 'bar help'\n});\n\nvar collectMetrics = function(baz, num) {\n    var labels = {\n        baz: baz\n    }\n\n    counter.increment(labels);\n    histogram.observe(num, labels);\n}\n\nmetricsManager.createMetrics('arbitraryGroup', collectMetrics);\nmetricsManager.collectMetrics('arbitraryGroup', 'test', 42);\n```\nThe server exposes a /metrics endpoint which returns the metrics in the Prometheus [v0.0.4 format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#format-version-004).\n\nExample curl of the /metrics endpoint:\n\n```shell\n$ curl http://<address>:<port>/metrics\n\n# HELP http_requests_completed count of requests completed\n# TYPE http_requests_completed counter\nhttp_requests_completed{route=\"getconfigs\",method=\"GET\",user_agent=\"restify/2.8.5\",status_code=\"304\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\"} 1\nhttp_requests_completed{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\"} 1\n# HELP http_request_duration_seconds total time to process requests\n# TYPE http_request_duration_seconds histogram\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.01\"} 0\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.02\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.03\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.04\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.05\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.06\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.07\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.08\"} 1\nhttp_request_duration_seconds{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\",le=\"0.09\"} 1\nhttp_request_duration_seconds{le=\"+Inf\",route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\"} 1\nhttp_request_duration_seconds_count{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\"} 1\nhttp_request_duration_seconds_sum{route=\"ping\",method=\"GET\",user_agent=\"curl/7.47.0\",status_code=\"200\",datacenter=\"coal\",instance=\"83c07804-0ecf-460a-8cad-5b8b1cdbe1bc\",server=\"564dc035-64a5-6420-88ce-59e1d1fbe100\",service=\"sapi\"} 0.011\n```\n\n# Usage\n\n#### `createMetricsManager(options)`\nAccepts an options object and returns a new `MetricsManager` object.\n\n* `options` -- Object. All options are required unless noted otherwise.\n    * `log`: A [bunyan](https://github.com/trentm/node-bunyan) logger.\n    * `restify`: Restify library. Support is only guaranteed for version 4.x.\n    * `staticLabels`: An object that includes labels to be attached to every collector.\n        * `datacenter`: String, datacenter name.\n        * `instance`: String, instance UUID.\n        * `port`: Number, optional, metrics server port. Helpful when multiple instances of a service are running in the same zone.\n        * `server`: String, server UUID.\n        * `service`: String, service name.\n    * `metricOpts`: An object containing additional labels and/or buckets for the specified metrics. Keys must be metric names, values are objects with:\n        * `buckets`: Array of numbers (buckets), only used for histograms\n        * `labels`: Object containing additional labels (key: value) that will be added for this specific metric.\n    * `address`: String, required if port is defined, the metrics server address.\n    * `path`: String, required if port is not defined, the metrics server socket path.\n    * `port`: Number, required if path is not defined, the metrics server port number.\n\n#### `linearBuckets(min, width, count)`\n\nThis is just exposing the node artedi bucket generator function. See: [https://github.com/joyent/node-artedi/blob/master/docs/API.md#bucket-generators](https://github.com/joyent/node-artedi/blob/master/docs/API.md#bucket-generators)\n\n#### `exponentialBuckets(min, factor, count)`\n\nThis is just exposing the node artedi bucket generator function. See: [https://github.com/joyent/node-artedi/blob/master/docs/API.md#bucket-generators](https://github.com/joyent/node-artedi/blob/master/docs/API.md#bucket-generators)\n\n#### `logLinearBuckets(base, lowPower, highPower, bucketsPerMagnitude)`\n\nThis is just exposing the node artedi bucket generator function. See: [https://github.com/joyent/node-artedi/blob/master/docs/API.md#bucket-generators](https://github.com/joyent/node-artedi/blob/master/docs/API.md#bucket-generators)\n\n#### `MetricsManager.listen(callback)`\nStarts the metrics server.\n\nParameters\n* callback -- Function to run after the server has started\n\n#### `MetricsManager.close(callback)`\nStops the metrics server.\n\nParameters\n* callback -- Function to run after the server has stopped.\n\n#### `MetricsManager.createMetrics(name, collectMetrics)`\nCreates a group of metrics.\n\nParameters\n* name -- String, a name to reference the metrics group.\n* collectMetrics -- Function, accepts an arbitrary number of arguments and handles metric collection for the metrics group.\n\n#### `MetricsManager.collectMetrics(name, ...args)`\nCollects metrics for a metrics group.\n\nParameters\n* name -- String, the name of the metrics group.\n* ...args -- An arbitrary number of arguments to be passed to the `collectMetrics` function specified in `createMetrics`.\n\n#### `MetricsManager.createNodejsMetrics()`\n\nImportant: These metrics are considered experimental/uncommitted. The specific\nmetrics exposed are expected to change without separate notice. Do not be\nsurprised if you build things relying on this data when some keys disappear in a\nfuture version, keys are renamed, or new metrics are added.\n\nRunning this function adds several metrics indicating internal state of the node\nprocess. These include currently:\n\n* nodejs_V8_heap_size_executable_bytes\n* nodejs_V8_heap_size_limit_bytes\n* nodejs_V8_total_available_size_bytes\n* nodejs_V8_total_heap_size_bytes\n* nodejs_V8_total_physical_size_bytes\n* nodejs_V8_used_heap_size_bytes\n* nodejs_active_handles_count\n* nodejs_active_requests_count\n* nodejs_eventloop_lag_seconds_total\n* nodejs_eventloop_max_lag_seconds\n* nodejs_eventloop_max_tick_count\n* nodejs_eventloop_max_time_seconds\n* nodejs_eventloop_min_lag_seconds\n* nodejs_eventloop_min_tick_count\n* nodejs_eventloop_min_time_seconds\n* nodejs_eventloop_samples_total\n* nodejs_eventloop_tick_count_total\n* nodejs_eventloop_time_seconds_total\n* nodejs_gc_execution_count_total\n* nodejs_gc_pause_seconds_total\n* nodejs_memory_external_bytes\n* nodejs_memory_heapTotal_bytes\n* nodejs_memory_heapUsed_bytes\n* nodejs_memory_rss_bytes\n* nodejs_process_start_time_seconds\n* nodejs_system_cpu_seconds_total\n* nodejs_user_cpu_seconds_total\n\n#### `MetricsManager.createRestifyMetrics()`\nAdds a `restify` metrics group that includes common metrics to be collected from a Restify server -- a [counter](lib/metrics-manager.js#L119) to track http requests and a [histogram](lib/metrics-manager.js#L124) to track the time to process requests\n\n#### `MetricsManager.collectRestifyMetrics(req, res, route)`\nCollects `restify` metrics. Typically called in the \"after\" hook of a restify server.\n\nParameters\n* req -- Restify request object.\n* res -- Restify response object.\n* route -- Restify route object.\n\nThese collectors collect the following metrics\n* http_requests_completed\n* http_request_duration_seconds\n\nBoth metrics add the following labels:\n* method (e.g. 'PUT')\n* status_code (e.g. 200)\n* route (e.g. 'listvms')\n* user_agent (only the first token e.g. restify/1.5.2) \n\n#### `MetricsManager.addPreCollectFunc(function (callback))`\n\nAdds a function with the signature `function (callback)` to the list of\nfunctions that will be called just before collecting the metrics. This is\nintended to be used for things like `gauge.set(value)` to set a value just\nbefore collection in cases where setting the value constantly might be otherwise\nexpensive.\n\nThe function provided *must* call callback() when completed *with no arguments*.\n\n#### `MetricsManager#collector`\nArtedi collector. Each metric needs to be added to this collector\n\n# Histogram buckets and versioning\n\nIt is expected that if you are adding custom buckets in your application, you'll\nwant to eventually also be able to change those buckets. In order to do this it\nis recommended that you do something like:\n\n```\nmetricsManager = tritonMetrics.createMetricsManager({\n    ...\n    metricOpts: {\n        http_request_duration_seconds: {\n            buckets: [1, 2, 3, 4],\n            labels: {\n                buckets_version: 'myapi.1'\n            }\n        }\n    },\n    ...\n});\n```\n\nwhen setting the buckets for your histogram. Then you should increment the\n`buckets_version` value every time you change your buckets. This way, you can\nwrite your queries for prometheus as:\n\n```\nhistogram_quantile(0.95, sum(rate(http_request_duration_seconds{buckets_version=\"myapi.1\"}[5m])) by (le))\n```\n\nand in doing so you can be sure that you're always doing a quantile on the same\nbuckets. When you introduce `buckets_version=\"myapi.2\"` you can then add this as\na separate query on your graphs (each instance will only have data for one or\nthe other) and you will not need to delete all old data in the prometheus store\nbut will still avoid the problems discussed in\n[node-artedi#17](https://github.com/joyent/node-artedi/pull/17).\n\n# Development\n\nThere is automated code formatting (using `eslint --fix` and `prettier`):\n\n    make fmt\n\nThere is lint/style checking (using `eslint` and `prettier --list-different`):\n\n    make check\n\nPlease be sure to run all of the above prior to submitting changes. One\neasy way to remember that is to run the following once for a clone to run\nthem automatically prior to `git commit`:\n\n    make git-hooks\n\nTo run the test suite:\n\n    make test\n","readmeFilename":"README.md"}