aerohive / devices-details-to-csv Goto Github PK
View Code? Open in Web Editor NEWThis script will retrieve the devices list and their details (CPU/Memory load, ...)
License: GNU General Public License v3.0
This script will retrieve the devices list and their details (CPU/Memory load, ...)
License: GNU General Public License v3.0
events.js:174
throw er; // Unhandled 'error' event
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34)
at TLSSocket.emit (events.js:198:13)
at TLSSocket._finishInit (_tls_wrap.js:636:8)
Emitted 'error' event at:
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Any idea how to resolve this issue
doesn´t work on HM 12.8.1.2.
node devices.js > test.csv
REQUEST QUERY: /xapi/v1/monitor/devices?ownerId=2&page=0
REQUEST HEADERS:{"X-AH-API-CLIENT-SECRET":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","X-AH-API-CLIENT-ID":"myid","X-AH-API-CLIENT-REDIRECT-URI":"https://127.0.0.1","Authorization":"Bearer mytokenxxxxx"}
REQUEST STATUS: 200
RESPONSE DATA: {"data":[{"deviceid":8589940160,
to here all works fine
REQUEST QUERY: /xapi/v1/monitor/devices/8589940032?ownerId=2
REQUEST HEADERS:{"X-AH-API-CLIENT-SECRET":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","X-AH-API-CLIENT-ID":"myid","X-AH-API-CLIENT-REDIRECT-URI":"https://127.0.0.1","Authorization":"Bearer mytokenxxxxxx"}
REQUEST STATUS: 500
RESPONSE DATA:
undefined:1
^ SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at IncomingMessage. (C:\Users\sven\Documents\HMNG_tools\details\devices.js:155:29) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1055:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)please help thanks
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.