kenahrens / nr-synthetics-plugin

Query New Relic Synthetics and publish new metrics as Plugin
9 stars 4 forks source link

Not able to setup new relic plugin using node.js #3

Open rajun29it opened 7 years ago

rajun29it commented 7 years ago

Not able to install new relic plugin using node.js. npm-debug.zip

kenahrens commented 7 years ago

@rajun29it - I don't have a windows system to test this with. What is the output of just running this command (when inside the nr-synthetics-plugin directory): node index.js

Please paste the output of the command.

rajun29it commented 7 years ago

C:\myData\Soft\NewRelic\plugin\node_modules\config\lib\config.js:913 throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3); ^

Error: Cannot parse config file: 'C:\myData\Soft\NewRelic\plugin\config\custom-e nvironment-variables.json': SyntaxError: Unexpected token N at util.parseFile (C:\myData\Soft\NewRelic\plugin\node_modules\config\lib\co nfig.js:913:11) at C:\myData\Soft\NewRelic\plugin\node_modules\config\lib\config.js:1292:26 at Array.forEach (native) at util.getCustomEnvVars (C:\myData\Soft\NewRelic\plugin\node_modules\config \lib\config.js:1290:12) at util.loadFileConfigs (C:\myData\Soft\NewRelic\plugin\node_modules\config\ lib\config.js:749:28) at new Config (C:\myData\Soft\NewRelic\plugin\node_modules\config\lib\config .js:122:27) at Object. (C:\myData\Soft\NewRelic\plugin\node_modules\config\li b\config.js:1735:31) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32)

rajun29it commented 7 years ago

Thank you for the quick response. I have pasted the requested information in the github ticket.

Regards, Raju

On Mon, Apr 17, 2017 at 10:45 PM, Ken Ahrens notifications@github.com wrote:

@rajun29it https://github.com/rajun29it - I don't have a windows system to test this with. What is the output of just running this command (when inside the nr-synthetics-plugin directory): node index.js

Please paste the output of the command.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kenahrens/nr-synthetics-plugin/issues/3#issuecomment-294532191, or mute the thread https://github.com/notifications/unsubscribe-auth/AaJsFZYWuWE9yK0XL44r_yD70kgN8Xuwks5rw55LgaJpZM4M_KMB .

kenahrens commented 7 years ago

@rajun29it - OK it's not able to read the file custom-environment-variables.json. That's strange since it's a standard JSON file. Would you mind moving that file to another directory and running the node index.js command again? I suspect it will fail on reading the file default.json but I'd like to confirm. Also what OS are you running? And how did you download the project?

eshwarg commented 7 years ago

Hello,

This is the output when i run "node index.js" . FYI, I am using mac machine.

Thu, 20 Apr 2017 09:28:24 GMT - info: Frequency is every 30s, cron: (/30 ) Thu, 20 Apr 2017 09:28:24 GMT - info: Running as a single config. Thu, 20 Apr 2017 09:28:30 GMT - info: Starting poll cycle with NODE_ENV Environment: default Thu, 20 Apr 2017 09:28:30 GMT - info: getMonitorList for config: newrelic Thu, 20 Apr 2017 09:28:31 GMT - error: Error on Insights monitor list call Thu, 20 Apr 2017 09:28:31 GMT - error: Error: self signed certificate in certificate chain at TLSSocket. (_tls_wrap.js:1088:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:188:7) at TLSSocket._finishInit (_tls_wrap.js:610:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38) Thu, 20 Apr 2017 09:29:01 GMT - info: Starting poll cycle with NODE_ENV Environment: default Thu, 20 Apr 2017 09:29:01 GMT - info: getMonitorList for config: newrelic Thu, 20 Apr 2017 09:29:01 GMT - error: Error on Insights monitor list call Thu, 20 Apr 2017 09:29:01 GMT - error: Error: self signed certificate in certificate chain at TLSSocket. (_tls_wrap.js:1088:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:188:7) at TLSSocket._finishInit (_tls_wrap.js:610:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)

kenahrens commented 7 years ago

@eshwarg I believe you have a different issue, so I opened a separate issue in GitHub: https://github.com/kenahrens/nr-synthetics-plugin/issues/4

kenahrens commented 7 years ago

@rajun29it - were you able to get this working by moving the custom-environment-variable.json file to another directory?

kenahrens commented 7 years ago

@rajun29it - I think the tool you used the clone or download the repo may have modified the JSON file. For example are you sure that the double-quotes are correct in the JSON files?