{"id":15014316,"url":"https://github.com/vs4vijay/newman-reporter-influxdb","last_synced_at":"2025-08-20T12:31:25.871Z","repository":{"id":41887334,"uuid":"236327539","full_name":"vs4vijay/newman-reporter-influxdb","owner":"vs4vijay","description":"Newman Reporter for InfluxDB","archived":false,"fork":false,"pushed_at":"2024-12-02T06:37:00.000Z","size":354,"stargazers_count":19,"open_issues_count":28,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-12-02T07:29:47.507Z","etag":null,"topics":["api","api-testing","influxdb","newman","newman-reporter","newman-reporters","postman","postman-test"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vs4vijay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-26T14:58:43.000Z","updated_at":"2024-09-25T09:51:34.000Z","dependencies_parsed_at":"2023-11-10T14:19:18.258Z","dependency_job_id":"bb608cf7-b200-48c2-8836-6e62a65b6eba","html_url":"https://github.com/vs4vijay/newman-reporter-influxdb","commit_stats":{"total_commits":60,"total_committers":6,"mean_commits":10.0,"dds":"0.23333333333333328","last_synced_commit":"1929ff4fd5654b337aaf142a78f69542097be793"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2Fnewman-reporter-influxdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2Fnewman-reporter-influxdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2Fnewman-reporter-influxdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2Fnewman-reporter-influxdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vs4vijay","download_url":"https://codeload.github.com/vs4vijay/newman-reporter-influxdb/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423563,"owners_count":18223435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-testing","influxdb","newman","newman-reporter","newman-reporters","postman","postman-test"],"created_at":"2024-09-24T19:45:27.864Z","updated_at":"2024-12-19T11:12:03.387Z","avatar_url":"https://github.com/vs4vijay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# newman-reporter-influxdb\n\nInfluxDB reporter for [Newman](https://github.com/postmanlabs/newman) that sends the test results information to InfluxDB (1.x, 2.x) which can be used from Grafana to build dashboard.\n\n\u003ca href=\"https://www.npmjs.com/package/newman-reporter-influxdb\"\u003e\n  \u003cimg alt=\"npm version\" src=\"https://img.shields.io/npm/v/newman-reporter-influxdb.svg\"\u003e\n  \u003cimg alt=\"npm downloads\" src=\"https://img.shields.io/npm/dm/newman-reporter-influxdb.svg\"\u003e\n  \u003cimg alt=\"code license\" src=\"https://img.shields.io/github/license/vs4vijay/newman-reporter-influxdb\"\u003e\n  \u003cimg alt=\"npm publish\" src=\"https://github.com/vs4vijay/newman-reporter-influxdb/workflows/npm publish/badge.svg\"\u003e\n\u003c/a\u003e\n\n## Getting Started\n\n1. Install `newman`\n2. Install `newman-reporter-influxdb`\n3. Install InfluxDB (Get the server address, port, database name, etc)\n\n### Prerequisites\n\n1. `node` and `npm`\n2. `newman` - `npm install -g newman`\n3. [InfluxDB](https://github.com/influxdata/influxdb)\n\n---\n\n## Installation\n\n```console\nnpm install -g newman-reporter-influxdb\n```\n\n\u003e Installation should be done globally if newman is installed globally, otherwise install without `-g` option\n\n---\n\n## Usage\n\nSpecify `-r influxdb` option while running the collection\n\n```bash\nnewman run \u003ccollection-url\u003e -r influxdb \\\n  --reporter-influxdb-server \u003cserver-ip\u003e \\\n  --reporter-influxdb-port \u003cserver-port\u003e \\\n  --reporter-influxdb-name \u003cdatabase-name\u003e \\\n  --reporter-influxdb-measurement \u003cmeasurement-name\u003e\n```\n\n- By default, reporter consider influxdb version 1.x (i.e 1.7, 1.8)\n- In case of InfluxDB version 2, specify version, org and bucket name as well\n  - `--reporter-influxdb-version 2`\n  - `--reporter-influxdb-org \u003corg-name\u003e`\n  - `--reporter-influxdb-name \u003cbucket-name\u003e`\n\nExample:\n\n```\n# For InfluxDB version 1.x\n\nnewman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv -r influxdb \\\n--reporter-influxdb-server localhost \\\n--reporter-influxdb-port 8086 \\\n--reporter-influxdb-name newman_reports \\\n--reporter-influxdb-measurement api_results\n\n# For InfluxDB version 2.x\n\nnewman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv -r influxdb \\\n  --reporter-influxdb-server localhost \\\n  --reporter-influxdb-port 8086 \\\n  --reporter-influxdb-org viz \\\n  --reporter-influxdb-version 2 \\\n  --reporter-influxdb-username viz \\\n  --reporter-influxdb-password db123456 \\\n  --reporter-influxdb-name viz \\\n  --reporter-influxdb-measurement api_results\n```\n\n### Options:\n\n**Option** | **Remarks**\n--- | --- \n`--reporter-influxdb-server` | IP Address or Host of InfluxDB\n`--reporter-influxdb-port` | Port no. (Usually `8086`)\n`--reporter-influxdb-version` | InfluxDB Version `1`, `2` (default `1`)\n`--reporter-influxdb-org` | InfluxDB Org (For InfluxDB version 2.x)\n`--reporter-influxdb-port` | Port no. (Usually `8086`)\n`--reporter-influxdb-name` | Database name (or Bucket name for InfluxDB version 2.x)\n`--reporter-influxdb-measurement` | Measurement Point name (If not provided, then reporter will create measurement with prefix `newman_results-\u003ctimestamp\u003e`)\n`--reporter-influxdb-username` (*Optional*) | Username created for InfluxDB (e.g. `newman_user`)\n`--reporter-influxdb-password` (*Optional*) | Password of the user (e.g. `p@ssw0rd`)\n`--reporter-influxdb-identifier` (*Optional*) | An identifier to be passed to InfluxDB (default: `run-${Date.now()}`)\n`--reporter-influxdb-mode` | Transmission Mode `http`, `https`, `udp` (default: `http`)\n`--reporter-debug` | Enable debug mode (default: `false`)\n\n---\n\n## Compatibility\n\n**newman-reporter-influxdb** | **InfluxDB**\n--- | ---\nv1.0.0+ | v1.7\nv2.0.0+ | v1.8, v2.x\n\n#### Notes:\n- This reporter currently uses InfluxDB HTTP APIs / TCP Protocol to send data\n\n---\n\n## To Do\n\n- [x] Convert to ES6 based version\n- [x] Folder Structure\n- [x] Username and Password support\n- [x] Include UDP Reporter as well\n- [x] HTTPS Support\n- [ ] Add batch operation\n- [ ] ESLint / StandardJS\n- [x] CI/CD with Github Actions\n- [ ] HealthCheck to InfluxDB\n- [ ] Remove axios to make it lightweight\n- [x] Compatibility with InfluxDB 2.x\n- [ ] Tests\n\n---\n\n## Development\n\n- Install Dependencies: `npm install`\n- To Install Local Package:\n  - `npm pack`\n  - `npm i -g newman-reporter-\u003cname\u003e.\u003cversion\u003e.tgz`\n  - OR\n  - `make local-install`\n- Run Unit Tests:\n- Run Smoke Tests: \n  - `make test-v1`\n  - `make test-v2`\n\n---\n\n### Development Notes\n\n```\n\nnpm publish --access public\n\n- name: npm publish\n        run: |\n          LATEST=`npm view . version`\n          CURRENT=`cat package.json | jq -r .version`\n          if [ \"$LATEST\" != \"$CURRENT\" ]\n          then\n            npm ci\n            npm publish\n          fi\n\n{\n    \"scripts\": {\n        \"postpublish\" : \"PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\\\",]//g' | tr -d '[[:space:]]') \u0026\u0026 git tag $PACKAGE_VERSION \u0026\u0026 git push --tags\"\n    }\n}\n\nPACKAGE_VERSION=$(cat package.json \\\n  | grep version \\\n  | head -1 \\\n  | awk -F: '{ print $2 }' \\\n  | sed 's/[\",]//g' \\\n  | tr -d '[[:space:]]')\n\necho $PACKAGE_VERSION\n\nhttps://img.shields.io/npm/v/newman-reporter-influxdb.svg\n\n\u003ca href=\"https://www.npmjs.com/package/newman-reporter-influxdb\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/newman-reporter-influxdb.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/newman-reporter-influxdb\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/newman-reporter-influxdb.svg\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n\n\u003cimg alt=\"GitHub All Releases\" src=\"https://img.shields.io/github/downloads/vs4vijay/newman-reporter-influxdb/total\"\u003e\n\n\nhttps://nodejs.org/api/http.html#http_http_request_url_options_callback\nhttps://nodejs.dev/making-http-requests-with-nodejs\n\n\n\nhttps://github.com/influxdata/influxdb/blob/1.7/services/udp/README.md\nhttps://docs.influxdata.com/influxdb/v1.7/supported_protocols/udp/\n\n\n[udp]\n  enabled = true\n  bind-address = \":8086\"\n  database = \"newman_reports_udp\"\n  batch-size = 1000\n  batch-timeout = “1s”\n\n\nTo write, just send newline separated line protocol over UDP.  Can send one point at a time (not very performant) or send batches.\n\n$ echo \"newman_results value=1\" \u003e /dev/udp/localhost/8086\n$ echo \"select * from newman_results\" | influx -database newman_reports_udp\nConnected to http://localhost:8086 version 1.7\nInfluxDB shell 0.9\nname: newman_results\n---------\ntime                value\n2020-26-06T11:25:15.321527811Z    1\n\ncurl -G http://localhost:8086/query --data-urlencode \"q=CREATE DATABASE newman_reports\"\n\ndocker run --name influxdb-1.7 -p 8086:8086 influxdb:1.7\ndocker run --name influxdb-1.8 -p 8086:8086 influxdb:1.8\ndocker run --name influxdb-2 -p 8086:8086 quay.io/influxdb/influxdb:v2.0.3\n\n\nsteps:\n- uses: actions/checkout@v4\n- uses: actions/setup-node@v4\n  with:\n    node-version: '14.x'\n    registry-url: 'https://registry.npmjs.org'\n- run: npm ci\n- run: npm publish\n  env:\n    NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}\n- uses: actions/setup-node@v4\n  with:\n    registry-url: 'https://npm.pkg.github.com'\n- run: npm publish\n  env:\n    NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvs4vijay%2Fnewman-reporter-influxdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvs4vijay%2Fnewman-reporter-influxdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvs4vijay%2Fnewman-reporter-influxdb/lists"}