Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including newman-reporter-influxdb with all npm packages installed. Try it out:

var newmanReporterInfluxdb = require("newman-reporter-influxdb")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

newman-reporter-influxdb v1.1.0

Newman Reporter for InfluxDB


InfluxDB reporter for Newman that sends the test results information to InfluxDB which can be used from Grafana to build dashboard.

npm version npm downloads code license npm publish

Getting Started

  1. Install newman
  2. Install newman-reporter-influxdb
  3. Install InfluxDB (Get the server address, port, database name, etc)


  1. node and npm
  2. newman - npm install -g newman
  3. InfluxDB


npm install -g newman-reporter-influxdb

Installation should be done globally if newman is installed globally, otherwise install without -g option


Specify -r influxdb option while running the collection

newman run <collection-url> -r influxdb \
  --reporter-influxdb-server <server-ip> \
  --reporter-influxdb-port <server-port> \
  --reporter-influxdb-name <database-name> \
  --reporter-influxdb-measurement <measurement-name>


newman run -r influxdb \
--reporter-influxdb-server localhost \
--reporter-influxdb-port 8086 \
--reporter-influxdb-name newman_reports \
--reporter-influxdb-measurement api_results


--reporter-influxdb-serverIP Address or Host of InfluxDB
--reporter-influxdb-portPort no. (Usually 8086)
--reporter-influxdb-nameDatabase name
--reporter-influxdb-measurementMeasurement Point name (If not provided, then reporter will create measurement with prefix newman_results-<timestamp>)
--reporter-influxdb-username (Optional)Username created for InfluxDB (e.g. newman_user)
--reporter-influxdb-password (Optional)Password of the user (e.g. p@ssw0rd)
--reporter-influxdb-modeTransmission Mode http, udp (default: http)




  • This reporter currently uses InfluxDB HTTP APIs to send data

To Do

  • [x] Convert to ES6 based version
  • [x] Folder Structure
  • [x] Username and Password support
  • [x] Include UDP Reporter as well
  • [ ] Add batch operation
  • [ ] ESLint / StandardJS
  • [x] CI/CD with Github Actions
  • [ ] HealthCheck to InfluxDB
  • [ ] Remove axios to make it lightweight


  • npm pack
  • npm i -g newman-reporter-<name>.<version>.tgz

Development Notes

npm publish --access public

- name: npm publish
        run: |
          LATEST=`npm view . version`
          CURRENT=`cat package.json | jq -r .version`
          if [ "$LATEST" != "$CURRENT" ]
            npm ci
            npm publish

    "scripts": {
        "postpublish" : "PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag $PACKAGE_VERSION && git push --tags"

PACKAGE_VERSION=$(cat package.json \
  | grep version \
  | head -1 \
  | awk -F: '{ print $2 }' \
  | sed 's/[",]//g' \
  | tr -d '[[:space:]]')


<a href=""><img src="" alt="npm version"></a>
<a href=""><img src="" alt="npm downloads"></a>

<img alt="GitHub All Releases" src="">

  enabled = true
  bind-address = ":8086"
  database = "newman_reports_udp"
  batch-size = 1000
  batch-timeout = “1s”

To write, just send newline separated line protocol over UDP.  Can send one point at a time (not very performant) or send batches.

$ echo "newman_results value=1" > /dev/udp/localhost/8086
$ echo "select * from newman_results" | influx -database newman_reports_udp
Connected to http://localhost:8086 version 1.7
InfluxDB shell 0.9
name: newman_results
time                value
2020-26-06T11:25:15.321527811Z    1

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free