vs4vijay / newman-reporter-influxdb Goto Github PK
View Code? Open in Web Editor NEWNewman Reporter for InfluxDB
License: MIT License
Newman Reporter for InfluxDB
License: MIT License
Hi,
Do you have any plans to support influxdb 2.0?
The influx reporter pushes the data nicely to InfluxDB.
I want to visualize the data in Grafana and wondered if you had a dashboard that can be used as a starting point?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/npm-publish.yml
actions/checkout v2
actions/setup-node v2
actions/checkout v2
actions/setup-node v2
actions/checkout v2
actions/setup-node v2
package.json
axios ^0.21.1
Influx 1.8.4
newman 5.2.2
Follow steps provided in repo, is not successful returned status code 400
newman run .\collection.json -r influxdb --reporter-influxdb-server localhost --reporter-influxdb-port 8086 --reporter-influxdb-name postman --reporter-influxdb-measurement testing --reporter-influxdb-username admin --reporter-influxdb-password admin
[+] Starting collection: test 1618250141484-0.08094263785491762
[1] Running httpbin post
[+] Finished collection: test (1618250141484-0.08094263785491762)
[-] ERROR: while sending data to InfluxDB Request failed with status code 400
Can query influx from command line
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=postman" --data-urlencode "q=show measurements" { "results": [ { "statement_id": 0 } ] }
Hi @vs4vijay, hope you are doing well. Currently i am facing an issue while running a postman collection using newman-influxdb-reporter.
I have used the below command:
newman run \Downloads\OrderServ\Basket\BasketCollection -e \Downloads\OrderServ\Basket\BasketEnvDesktopWeb -r influxdb --reporter-influxdb-server {server-ip-address}} --reporter-influxdb-mode http --reporter-influxdb-port 8086 --reporter-influxdb-org {org-name} --reporter-influxdb-version 2 --reporter-influxdb-username {user-name} --reporter-influxdb-password {password} --reporter-influxdb-name {bucket} --reporter-influxdb-measurement api_results
but i am getting the below error:
Starting collection: Orderserv Basket Management 1706014994995-0.031766501297362026
[+] Signing In to InfluxDB
\AppData\Roaming\npm\node_modules\newman-reporter-influxdb\src\influxdb-reporter.js:96
status: args.response.status,
^
TypeError: Cannot read properties of undefined (reading 'status')
at InfluxDBReporter.request \AppData\Roaming\npm\node_modules\newman-reporter-influxdb\src\influxdb-reporter.js:96:29)
at EventEmitter. (\AppData\Roaming\npm\node_modules\newman-reporter-influxdb\src\influxdb-reporter.js:28:105)
at EventEmitter.emit (node:events:525:35)
at Function.callbacks. [as request] (\AppData\Roaming\npm\node_modules\newman\lib\run\index.js:213:34)
at afterRequest (\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\extensions\http-request.command.js:86:35)
at \AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\extensions\http-request.command.js:173:25
at onEnd (\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\requester\requester.js:274:24)
at Request._callback (\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\requester\requester.js:449:24)
at self.callback (\AppData\Roaming\npm\node_modules\newman\node_modules\postman-request\request.js:311:12)
at Request.emit (node:events:513:28)
at Request.onRequestError (\AppData\Roaming\npm\node_modules\newman\node_modules\postman-request\request.js:1199:8)
at ClientRequest.emit (node:events:513:28)
at Socket.socketErrorListener (node:_http_client:481:9)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
Kindly assist in resolving the issue.
Hey @vs4vijay
I would like to suggest you adding this following feature :
I have actually forked with your repository to add this feature but it would be nice if we can have it directly from yours :
Here's a proposal :
in influxdb.reporter.js
this.context.identifier = this.reporterOptions.influxdbIdentifier || this.reporterOptions.identifier;
Then used here in request event method :
const data = {
collection_name: this.options.collection.name,
id: this.context.identifier,
// ....
}
Hey @vs4vijay
I would like to suggest you adding those following features :
I have actually forked with your repository to add this feature but it would be nice if we can have it directly from yours :
Here's a proposal :
in http.service.js
const axiosOptions = {
baseURL: `${this.context.mode === "https" ? "https" : "http"}://${this.context.server}:${this.context.port}`
};
-> It could be done in a different service js file like https.service.js but it would lot of duplicates only to change the protocol
Hello
As it is said in the official doc :
"All requests to the InfluxDB v2 API must include an InfluxDB API token."
Therefore, i'm unable to connect with this reporter to my DB.
Is there a workaround?
Thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.