{"_id":"@christiangalsterer/node-postgres-prometheus-exporter","_rev":"6-61d27a4fc98a146f35c359ad47d713ac","name":"@christiangalsterer/node-postgres-prometheus-exporter","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"@christiangalsterer/node-postgres-prometheus-exporter","version":"1.0.0","keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","opentelemetry","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/node-postgres-prometheus-exporter@1.0.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"dist":{"shasum":"fa0c58da695688660a38ad3ed058630a6a5070fa","tarball":"https://registry.npmjs.org/@christiangalsterer/node-postgres-prometheus-exporter/-/node-postgres-prometheus-exporter-1.0.0.tgz","fileCount":30,"integrity":"sha512-f8q1oZtoThJRcl4tN3p+4JcQa3TckZXWVj+y5ndEjq0U7KwRS8vguyme02EzV/qFor9tooi4x+/XcI/j0/KkWg==","signatures":[{"sig":"MEQCIEGY0JfK31RkrC1ON3K5+M5p+nNDa1Nvl2TBDE/wXeg/AiBLztkRyc+kSPEKjDQg510ZGxEpJ/94El77ASTKoXpcsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41771},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"0401806331951518f1e69f7339767fdb9106cb13","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","publish":"npm publish --access=public","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","release:major":"npm run release:prepare && npm version major -m 'build:release %s'","release:minor":"npm run release:prepare && npm version minor -m 'build:release %s'","release:patch":"npm run release:prepare && npm version patch -m 'build:release %s'","test:coverage":"jest --forceExit --coverage --verbose","publish:dry-run":"npm publish --access=public --dry-run","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git","type":"git"},"_npmVersion":"9.7.2","description":"A prometheus exporter for node-postgres","directories":{"test":"test"},"_nodeVersion":"20.4.0","dependencies":{"pg":"^8.11.3","prom-client":"^15.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.1","prettier":"3.2.4","renovate":"37.140.0","@types/pg":"8.10.9","typescript":"5.3.3","@types/jest":"29.5.11","@jest/globals":"29.7.0","eslint-plugin-jest":"27.6.3","eslint-config-standard-with-typescript":"43.0.0"},"_npmOperationalInternal":{"tmp":"tmp/node-postgres-prometheus-exporter_1.0.0_1705582880046_0.1640110996435198","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@christiangalsterer/node-postgres-prometheus-exporter","version":"1.1.0","keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/node-postgres-prometheus-exporter@1.1.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"dist":{"shasum":"6a581935857e48639555b779abb32bdf17afceb1","tarball":"https://registry.npmjs.org/@christiangalsterer/node-postgres-prometheus-exporter/-/node-postgres-prometheus-exporter-1.1.0.tgz","fileCount":3,"integrity":"sha512-Kz5ZTMlknLHMRAPT6pVXkybdBZsMGccH63s924L4vbjnVQxpx53OvKOc+mVqJwzF9x67rHHn0VRn38WzgfPTKQ==","signatures":[{"sig":"MEYCIQC2sJAu1Oo8hoJnC73+Gqdedrgq2iSHL0OUOSq13i3nbQIhALuFXWPKSC04eZuF7tUoFIDuRxHaD7OtozD6ayqdXdkt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13338},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"f2b839e64a7fafcd2d993e4505112e1bf16ba28c","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","publish":"npm publish --access=public","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","publish:dry-run":"npm publish --access=public --dry-run","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git","type":"git"},"_npmVersion":"10.5.0","description":"A prometheus exporter for node-postgres","directories":{"test":"test"},"_nodeVersion":"21.7.3","dependencies":{"pg":"^8.11.3","prom-client":"^15.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.2.5","renovate":"37.306.1","@types/pg":"8.11.5","typescript":"5.4.5","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-plugin-jest":"28.2.0","eslint-plugin-simple-import-sort":"12.1.0","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/node-postgres-prometheus-exporter_1.1.0_1713531851142_0.7089458660413135","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@christiangalsterer/node-postgres-prometheus-exporter","version":"1.2.0","keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/node-postgres-prometheus-exporter@1.2.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"dist":{"shasum":"134dab530b76f20740b3d6a447999543764330b0","tarball":"https://registry.npmjs.org/@christiangalsterer/node-postgres-prometheus-exporter/-/node-postgres-prometheus-exporter-1.2.0.tgz","fileCount":30,"integrity":"sha512-F65sQwKmNluwpxDIV/redQuceeOrA4w0uVIOhlPDFn34lQAYYTirJP3th6Glbfx/lmLewx23oKtgdTwz/DTYfw==","signatures":[{"sig":"MEUCIQD7oTmLYIvcYxZK5GE7n0hi4lO5dPcxxfWIxEtL+JXb1wIgZe3yTYaK7VLqz15Lad6+V0CudLfXfUwXI1hrGFk92Ew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42827},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"8e0177d660b31819750d71d4afcb7aefcdcc5411","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","publish-npm":"npm publish --access=public","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator","publish-npm:dry-run":"npm publish --access=public --dry-run"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git","type":"git"},"_npmVersion":"9.7.2","description":"A prometheus exporter for node-postgres","directories":{"test":"test"},"_nodeVersion":"20.4.0","dependencies":{"pg":"^8.11.3","prom-client":"^15.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.2.5","renovate":"37.313.1","@types/pg":"8.11.5","typescript":"5.4.5","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-config-love":"47.0.0","eslint-plugin-jest":"28.2.0","eslint-plugin-simple-import-sort":"12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/node-postgres-prometheus-exporter_1.2.0_1713701297209_0.041179762403667164","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@christiangalsterer/node-postgres-prometheus-exporter","version":"1.3.0","keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/node-postgres-prometheus-exporter@1.3.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"dist":{"shasum":"ec32bc7dffa7d4e141e75f2a9e035a5f54fe5c40","tarball":"https://registry.npmjs.org/@christiangalsterer/node-postgres-prometheus-exporter/-/node-postgres-prometheus-exporter-1.3.0.tgz","fileCount":30,"integrity":"sha512-VJCzHXKy1aaJPeq3PjF04xUqg9phOHLja5Al85G+TLixj8LNMGHYCx9awynaOYwP0S5Cnw6HfOBrwa5rYZwjYg==","signatures":[{"sig":"MEUCIQDoxJeAZbwinkAKw1H1OQCJav+ZWc9U67YDMUYruFojkAIgYCvaFL7eFPOd3ZrWBXn6zh5saB3gBaHfMJppgeaw9Vg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46387},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"858416c04a44efaf7ec1d54e0e2dd56e85c03f18","scripts":{"ci":"npm i --save-dev && npm run format && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","format":"prettier --check .","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","format:fix":"prettier --write .","publish-npm":"npm run ci && npm publish --access=public","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run format && npm run lint && npm run build && npm run test","renovate:config":"npx renovate-config-validator","publish-npm:dry-run":"npm run ci && npm publish --access=public --dry-run"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git","type":"git"},"_npmVersion":"10.5.0","description":"A prometheus exporter for node-postgres","directories":{"test":"test"},"_nodeVersion":"21.7.3","dependencies":{"pg":"^8.11.3","prom-client":"^15.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.2.3","prettier":"3.3.3","renovate":"37.437.3","@types/pg":"8.11.6","typescript":"5.5.3","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-config-love":"56.0.0","eslint-plugin-jest":"28.6.0","eslint-plugin-simple-import-sort":"12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/node-postgres-prometheus-exporter_1.3.0_1721547519293_0.2404457913310274","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@christiangalsterer/node-postgres-prometheus-exporter","version":"1.3.1","keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/node-postgres-prometheus-exporter@1.3.1","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"dist":{"shasum":"2bf8711ecf45f4c89ad00ba13f1c6b7f290bbf80","tarball":"https://registry.npmjs.org/@christiangalsterer/node-postgres-prometheus-exporter/-/node-postgres-prometheus-exporter-1.3.1.tgz","fileCount":30,"integrity":"sha512-rBqBlr9flrodNBiMJLJMMAbHLJA6i2Cs3ZDqrGCBUXBH/QXsJe6U7Aif4O8bcxAVLZor9/tdkGNHXYskdtn1lw==","signatures":[{"sig":"MEYCIQCwwXYC/bLJgHWE3GXcRHmn8G6b5PRXjWUelVfoW4rmpQIhAMMJ3AAmZlfSlIXLoV856zDoXijwTvZqhmfTR+dkgDu9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49384},"main":"dist/src/index.js","types":"dist/src/index.d.ts","engines":{"node":"20 || >=22"},"gitHead":"8818c116f377457f1b5aca80b78783fad1113ffb","scripts":{"ci":"npm i --save-dev && npm run format && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","format":"prettier --check .","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules && rm -rf package-lock.json && npm run deps","clean:dist":"rm -rf ./dist","format:fix":"prettier --write .","publish-npm":"npm run ci && npm publish --access=public","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run format && npm run lint && npm run build && npm run test","renovate:config":"npx renovate-config-validator","publish-npm:dry-run":"npm run ci && npm publish --access=public --dry-run"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git","type":"git"},"_npmVersion":"10.9.2","description":"A prometheus exporter for node-postgres","directories":{"test":"test"},"_nodeVersion":"22.15.0","dependencies":{"pg":"^8.11.3","prom-client":"^15.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.3.4","prettier":"3.5.3","renovate":"40.14.3","@types/pg":"8.15.2","typescript":"5.8.3","@types/jest":"29.5.14","@jest/globals":"29.7.0","eslint-config-love":"120.0.0","eslint-plugin-jest":"28.11.0","eslint-plugin-simple-import-sort":"12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/node-postgres-prometheus-exporter_1.3.1_1747586827994_0.7592384458285089","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@christiangalsterer/node-postgres-prometheus-exporter","version":"1.4.0","description":"A prometheus exporter for node-postgres","repository":{"type":"git","url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git"},"main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"tsc","ci":"npm ci --save-dev && npm run format && npm run lint && npm run build && npm run test && npm run renovate:config","clean":"npm run clean:dist && npm run clean:deps","clean:dist":"rm -rf ./dist","clean:deps":"rm -rf ./node_modules && rm -rf package-lock.json && npm i --package-lock-only && npm run deps","deps":"npm ci --save-dev && npm audit fix","format":"prettier --check .","format:fix":"prettier --write .","lint":"eslint .","lint:fix":"eslint . --fix","test":"jest --forceExit --verbose","test:coverage":"jest --forceExit --coverage --verbose","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run format && npm run lint && npm run build && npm run test","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","publish-npm":"npm run ci && npm publish --access=public","publish-npm:dry-run":"npm run ci && npm publish --access=public --dry-run","renovate:config":"npx renovate-config-validator"},"keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","dependencies":{"pg":"^8.11.3","prom-client":"^15.0.0"},"devDependencies":{"@jest/globals":"30.2.0","@types/jest":"30.0.0","@types/pg":"8.15.6","eslint-config-love":"134.0.0","eslint-plugin-jest":"29.2.1","eslint-plugin-simple-import-sort":"12.1.1","jest":"30.2.0","prettier":"3.6.2","renovate":"42.19.3","ts-jest":"29.4.5","typescript":"5.9.3"},"engines":{"node":"20 || >=22"},"bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","directories":{"test":"test"},"gitHead":"b807072b1ed26e4078449ffaabff6b564ce73f40","_id":"@christiangalsterer/node-postgres-prometheus-exporter@1.4.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-EHGaW+Rq4NiI7kYdeW6xxgvQGyAt7A0nf8bAqf385C6FI9Zf0EeLEiYZHEfPxwikNB1+8bmJ7GVrL/DImHUIFA==","shasum":"431b32e403cd58cca28f5b435232d4bd57c48e78","tarball":"https://registry.npmjs.org/@christiangalsterer/node-postgres-prometheus-exporter/-/node-postgres-prometheus-exporter-1.4.0.tgz","fileCount":30,"unpackedSize":50258,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAgvOBeU4j61O3Jd21en60VX6iScHlKb+YYPzdCBO7czAiAS32Ac9RX81z4zYyprtcqQbE6pK5OgugEe822iyNCtHA=="}]},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-postgres-prometheus-exporter_1.4.0_1764188385820_0.7722720070841351"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-18T13:01:19.911Z","modified":"2025-11-26T20:19:46.183Z","1.0.0":"2024-01-18T13:01:20.183Z","1.1.0":"2024-04-19T13:04:11.286Z","1.2.0":"2024-04-21T12:08:17.375Z","1.3.0":"2024-07-21T07:38:39.533Z","1.3.1":"2025-05-18T16:47:08.181Z","1.4.0":"2025-11-26T20:19:45.998Z"},"bugs":{"url":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter/issues"},"author":{"name":"Christian Galsterer"},"license":"MIT","homepage":"https://github.com/christiangalsterer/node-postgres-prometheus-exporter#readme","keywords":["pg","node-postgres","postgres","prometheus","monitoring","metrics","pg prometheus","pg monitoring","pg metrics","node-postgres prometheus","node-postgres monitoring","node-postgres metrics","postgres prometheus","postgres monitoring","postgres metrics"],"repository":{"type":"git","url":"git+https://github.com/christiangalsterer/node-postgres-prometheus-exporter.git"},"description":"A prometheus exporter for node-postgres","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"readme":"[![GitHub Actions CI Status](https://github.com/christiangalsterer/node-postgres-prometheus-exporter/actions/workflows/build.yaml/badge.svg)](https://github.com/christiangalsterer/node-postgres-prometheus-exporter/actions/workflows/build.yaml)\n[![codecov](https://codecov.io/gh/christiangalsterer/node-postgres-prometheus-exporter/graph/badge.svg?token=2KFRFMXSGS)](https://codecov.io/gh/christiangalsterer/node-postgres-prometheus-exporter)\n[![Coverage Status](https://coveralls.io/repos/github/christiangalsterer/node-postgres-prometheus-exporter/badge.svg?branch=main)](https://coveralls.io/github/christiangalsterer/node-postgres-prometheus-exporter?branch=main)\n[![Known Vulnerabilities](https://snyk.io/test/github/christiangalsterer/node-postgres-prometheus-exporter/badge.svg)](https://github.com/christiangalsterer/node-postgres-prometheus-exporter/security/advisories)\n[![npm downloads](https://img.shields.io/npm/dt/@christiangalsterer/node-postgres-prometheus-exporter.svg)](https://www.npmjs.com/package/@christiangalsterer/node-postgres-prometheus-exporter)\n[![npm version](https://img.shields.io/npm/v/@christiangalsterer/node-postgres-prometheus-exporter.svg)](https://www.npmjs.com/package/@christiangalsterer/node-postgres-prometheus-exporter?activeTab=versions)\n[![npm license](https://img.shields.io/npm/l/@christiangalsterer/node-postgres-prometheus-exporter.svg)](https://www.npmjs.com/package/@christiangalsterer/node-postgres-prometheus-exporter)\n[![semver](https://img.shields.io/badge/semver-2.0.0-green)](https://semver.org)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://developer.mend.io/github/christiangalsterer/node-postgres-prometheus-exporter)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n![github stars](https://img.shields.io/github/stars/christiangalsterer/node-postgres-prometheus-exporter.svg)\n\n# Prometheus Exporter for node-postgres\n\nA prometheus exporter exposing metrics for [node-postgres](https://node-postgres.com/).\n\n## Available Metrics\n\nThe exporter provides the following metrics.\n\n### pg.Client Metrics\n\n|Metric Name|Description|Labels|Since|\n|---|---|---|---|\n|pg_client_errors_total|The total number of connection errors with a database|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n|pg_client_disconnects_total|The total number of disconnected connections|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n\n### pg.Pool Metrics\n\n|Metric Name|Description|Labels|Since|\n|---|---|---|---|\n|pg_pool_connections_created_total|The total number of created connections|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n|pg_pool_size|The current size of the connection pool, including active and idle members|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n|pg_pool_active_connections|The total number of active connections|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n|pg_pool_errors_total|The total number of connection errors with a database|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n|pg_pool_connections_removed_total|The total number of removed connections|<ul><li>_host_: The host of the database.</li><li>_database_: The database name</li><ul>|1.0.0|\n\n## Example Output\n\nHere an example output in the prometheus format of the provided metrics.\n\n```sh\n# HELP pg_client_errors_total The total number of connection errors with a database.\n# TYPE pg_client_errors_total counter\npg_client_errors_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_client_disconnects_total The total number of disconnected connections.\n# TYPE pg_client_disconnects_total counter\npg_client_disconnects_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_pool_connections_created_total The total number of created connections.\n# TYPE pg_pool_connections_created_total counter\npg_pool_connections_created_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 19\n\n# HELP pg_pool_size The current size of the connection pool, including active and idle members.\n# TYPE pg_pool_size gauge\npg_pool_size{host=\"localhost:5432\",database=\"node_postgres_test1\"} 10\n\n# HELP pg_pool_max The maximum size of the connection pool.\n# TYPE pg_pool_max gauge\npg_pool_max{host=\"localhost:5432\",database=\"node_postgres_test1\"} 10\n\n# HELP pg_pool_active_connections The total number of active connections.\n# TYPE pg_pool_active_connections gauge\npg_pool_active_connections{host=\"localhost:5432\",database=\"node_postgres_test1\"} 10\n\n# HELP pg_pool_waiting_connections The total number of waiting connections.\n# TYPE pg_pool_waiting_connections gauge\npg_pool_waiting_connections{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_pool_idle_connections The total number of idle connections.\n# TYPE pg_pool_idle_connections gauge\npg_pool_idle_connections{host=\"localhost:5432\",database=\"node_postgres_test1\"} 0\n\n# HELP pg_pool_errors_total The total number of connection errors with a database.\n# TYPE pg_pool_errors_total counter\npg_pool_errors_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_pool_connections_removed_total The total number of removed connections.\n# TYPE pg_pool_connections_removed_total counter\npg_pool_connections_removed_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 9\n```\n\n# Usage\n\n## Add Dependency\n\nAdd the following dependency to your project to download the package from [npm](https://www.npmjs.com/package/@christiangalsterer/node-postgres-prometheus-exporter).\n\n```sh\nnpm i @christiangalsterer/node-postgres-prometheus-exporter\n```\n\n## TypeScript\n\nThe following example illustrates how to use the exporter to enable monitoring for the node-postgres.\n\n```ts\nimport { Client, Pool } from 'pg'\nimport { Registry, collectDefaultMetrics } from 'prom-client'\nimport { monitorPgClient, monitorPgPool } from '@christiangalsterer/node-postgres-prometheus-exporter'\n\n...\n\n// set up a pg.Client\nconst client = new Client()\n\n// set up a pg.Pool\nconst pool = new Pool()\n\n// set up the prometheus client\nconst register = new Registry();\ncollectDefaultMetrics({ register })\n\n// monitor the pg.Client\nmonitorPgClient(client, register)\n\n// monitor the pg.Pool\nmonitorPgPool(pool, register)\n\n...\n\n// connect to PostgreSQL *after* calling monitorPgClient() / monitorPgPool()\nawait client.connect()\nawait pool.connect()\n```\n\n## JavaScript\n\nThe following example illustrates how to use the exporter to enable monitoring for node-postgres.\n\n```js\nconst pg = require('pg')\nconst promClient = require( 'prom-client');\nconst postgresExporter = require('@christiangalsterer/node-postgres-prometheus-exporter')\n\n// set up a pg.Client\nconst client = new pg.Client()\n\n// set up a pg.Pool\nconst pool = new pg.Pool()\n\n// set up the prometheus client\nconst collectDefaultMetrics = promClient.collectDefaultMetrics;\nconst Registry = promClient.Registry;\nconst register = new Registry();\ncollectDefaultMetrics({ register });\n\n// monitor the pg.Client\npostgresExporter.monitorPgClient(client, register)\n\n// monitor the pg.Pool\npostgresExporter.monitorPgPool(pool, register)\n\n// connect to Postgres *after* calling monitorPgClient() / monitorPgPool()\nawait client.connect()\nawait pool.connect()\n```\n\n# Configuration\n\nThe exporter can be configured via properties specified on the optional parameter of type\n_PgClientExporterOptions_  and _PgPoolExporterOptions_ respectively.\n\n## PgClientExporterOptions\n\n|property|Description|Example|Since |\n|---|---|---|---|\n| defaultLabels | Default labels added to each metrics. | {'foo':'bar', 'alice': 3} | 1.0.0 |\n\n## PgPoolExporterOptions\n\n|property|Description|Example|Since |\n|---|---|---|---|\n| defaultLabels | Default labels added to each metrics. | {'foo':'bar', 'alice': 3} | 1.0.0|\n\n# Grafana Dashboard\n\nAn example dashboard for Grafana is available [here](/docs/grafana/dashboard.json) displaying the provided metrics by the exporter.\n\nHere an example for node-postgres client metrics:\n![Grafana:node-postgres Client Metrics](/docs/images/grafana_node_postgres_client_1.png \"Grafana: node-postgres Client Metrics\")\n\nHere an example for node-postgres pool metrics:\n![Grafana:node-postgres Pool Metrics](/docs/images/grafana_node_postgres_pool_1.png \"Grafana: node-postgres Pool Metrics\")\n\n# Changelog\n\nThe changes to project can be found in the [changelog](/CHANGELOG.md).\n\n# Compatibility\n\nThe following table list the compatibility of exporter versions with different node-postgres and prom-client versions.\n\n|Exporter Version|node-postgres Version|prom-client version|\n|---|---|---|\n|^1.0.0|^8.11.0|^15.0.0|\n\n# Contributions\n\nContributions are highly welcome. If you want to contribute to this project please follow the steps described in the [contribution guidelines](/CONTRIBUTING.md).\n\n# Projects Using The Exporter\n\nIf you want to support this project, please add a link to your project and/or company when you use this exporter.\n\n# Related Projects\n\nIf you are looking for a way to monitor your MongoDB Driver for Node.js you may have a look at <https://github.com/christiangalsterer/mongodb-driver-prometheus-exporter>.\n\nIf you are looking for a way to monitor KafkaJs for Node.js you may have a look at <https://github.com/christiangalsterer/kafkajs-prometheus-exporter>.\n","readmeFilename":"README.md"}