ndelitski / rancher-alarms

Will kick your ass if found unhealthy service in Rancher environment
85 stars 20 forks source link

Fixed retrieval of project id (environment id) #21

Closed guzmo closed 7 years ago

guzmo commented 7 years ago

I wasn't able to run this as an agent because it tried to call http://rancherurl/accounts which will never work. When I changed /account to /v1/projects/ it worked because it retrieved correct projectId. I haven't tested this without using the image as an agent ( internal envs for CATTLE_URL etc )

ndelitski commented 7 years ago

ok thx for your help! I'll check it soon with my environment. Which version of Rancher do you use?

guzmo commented 7 years ago

1.1.3 if I remember correct ( Longing for 1.2 :P )

courcelm commented 7 years ago

Is this branch will be merged anytime soon?

ndelitski commented 7 years ago

@courcelm Sorry mate! Just pushed a new version with a fix, please check

courcelm commented 7 years ago

Thanks for your quick reply. I got an issue about module 'line-numbers'

11/01/2017 15:37:55> rancher-alarms@0.1.5 start /usr/src/app 11/01/2017 15:37:55> node bin/rancher-alarms.js 11/01/2017 15:37:55 11/01/2017 15:37:56module.js:327 11/01/2017 15:37:56 throw err; 11/01/2017 15:37:56 ^ 11/01/2017 15:37:56 11/01/2017 15:37:56Error: Cannot find module 'line-numbers' 11/01/2017 15:37:56 at Function.Module._resolveFilename (module.js:325:15) 11/01/2017 15:37:56 at Function.Module._load (module.js:276:25) 11/01/2017 15:37:56 at Module.require (module.js:353:17) 11/01/2017 15:37:56 at require (internal/module.js:12:17) 11/01/2017 15:37:56 at Object. (/usr/src/app/node_modules/babel-core/lib/helpers/code-frame.js:8:20) 11/01/2017 15:37:56 at Module._compile (module.js:409:26) 11/01/2017 15:37:56 at Object.Module._extensions..js (module.js:416:10) 11/01/2017 15:37:56 at Module.load (module.js:343:32) 11/01/2017 15:37:56 at Function.Module._load (module.js:300:12) 11/01/2017 15:37:56 at Module.require (module.js:353:17) 11/01/2017 15:37:56 at require (internal/module.js:12:17) 11/01/2017 15:37:56 11/01/2017 15:37:56npm ERR! Linux 4.4.0-57-generic 11/01/2017 15:37:56npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" 11/01/2017 15:37:56npm ERR! node v4.4.7 11/01/2017 15:37:56npm ERR! npm v2.15.9 11/01/2017 15:37:56npm ERR! code ELIFECYCLE 11/01/2017 15:37:56npm ERR! rancher-alarms@0.1.5 start: node bin/rancher-alarms.js 11/01/2017 15:37:56npm ERR! Exit status 1 11/01/2017 15:37:56npm ERR! 11/01/2017 15:37:56npm ERR! Failed at the rancher-alarms@0.1.5 start script 'node bin/rancher-alarms.js'. 11/01/2017 15:37:56npm ERR! This is most likely a problem with the rancher-alarms package, 11/01/2017 15:37:56npm ERR! not with npm itself. 11/01/2017 15:37:56npm ERR! Tell the author that this fails on your system: 11/01/2017 15:37:56npm ERR! node bin/rancher-alarms.js 11/01/2017 15:37:56npm ERR! You can get information on how to open an issue for this project with: 11/01/2017 15:37:56npm ERR! npm bugs rancher-alarms 11/01/2017 15:37:56npm ERR! Or if that isn't available, you can get their info via: 11/01/2017 15:37:56npm ERR! 11/01/2017 15:37:56npm ERR! npm owner ls rancher-alarms 11/01/2017 15:37:56npm ERR! There is likely additional logging output above. 11/01/2017 15:37:56 11/01/2017 15:37:56npm ERR! Please include the following file with any support request: 11/01/2017 15:37:56npm ERR! /usr/src/app/npm-debug.log

ndelitski commented 7 years ago

My bad... A bit changed docker image build, should help!

courcelm commented 7 years ago

It solved that issue but I'm having the toLowerCase issue. I will post my log in the other issue.

ndelitski commented 7 years ago

Rancher version? On Thu, 12 Jan 2017 at 16:58, courcelm notifications@github.com wrote:

It solved that issue but I'm having the toLowerCase issue. I will post my log in the other issue.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ndelitski/rancher-alarms/pull/21#issuecomment-272169405, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7ZWjAsanUh4E9YrO7ZMVU8brGAGeqaks5rRjGSgaJpZM4KP3Qb .

courcelm commented 7 years ago

Rancher 1.2.2