Hygieia: Hygieia - tyring first time, not able to see collector data showing up on dashboard, tried with jenkins first as collector

Created on 15 Oct 2018  Â·  5Comments  Â·  Source: hygieia/hygieia

hey, i am in process of setting up the Hygieia dashboard and collectors.
i can get these working -
however i am not able to see any thing on the dashboard from collectors...

http://...:8080/api/dashboard - returning empty - []
i can see in the jenkins collector logs (in debug mode) - the jobs names and etc, however i am not able to understand why these are not showing up in the dashboard.
2018-10-15 17:15:03,509 DEBUG c.c.d.collector.DefaultHudsonClient - buildNumber: 3
2018-10-15 17:15:03,509 DEBUG c.c.d.collector.DefaultHudsonClient - Adding Build: http:///job/wrapper_deploy_docker_st/3/
2018-10-15 17:15:03,509 DEBUG c.c.d.collector.DefaultHudsonClient - buildNumber: 2
2018-10-15 17:15:03,509 DEBUG c.c.d.collector.DefaultHudsonClient - Adding Build: http:///job/wrapper_deploy_docker_st/2/
2018-10-15 17:15:03,509 DEBUG c.c.d.collector.DefaultHudsonClient - buildNumber: 1
2018-10-15 17:15:03,509 DEBUG c.c.d.collector.DefaultHudsonClient - Adding Build: http:///job/wrapper_deploy_docker_st/1/
2018-10-15 17:15:03,509 INFO c.c.d.collector.CollectorTask - Fetched jobs 3s
2018-10-15 17:15:03,552 INFO c.c.d.collector.CollectorTask - New jobs 0 0s
2018-10-15 17:15:03,555 INFO c.c.d.collector.CollectorTask - New builds 0 0s
2018-10-15 17:15:03,558 INFO c.c.d.collector.CollectorTask - New configs 0 0s
2018-10-15 17:15:03,558 INFO c.c.d.collector.CollectorTask - Finished 3s

Please note that i have not set up any ldap authentication, i am using standard authentication post sign up.

sonar collector issue:
018-10-15 17:15:00,252 WARN o.a.h.c.p.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: AWSALB=MLAAhi0tymi5qD+JZmgWXZCasXhU0diqdRDgHHcsA2/C38Kxm8EtbklCVXhk8dDrRSPjVrZJxoZDDGbj1nNK3DAC86FVaCWdKrXT1iTaEmDrjzkAJYe3psBQQstE; Expires=Mon, 22 Oct 2018 06:15:00 GMT; Path=/". Invalid 'expires' attribute: Mon, 22 Oct 2018 06:15:00 GMT
2018-10-15 17:15:00,252 ERROR c.c.d.collector.DefaultSonar6Client - org.springframework.web.client.HttpClientErrorException: 404
2018-10-15 17:15:00,252 INFO c.c.d.collector.CollectorTask - Fetched projects 0 0s
2018-10-15 17:15:00,252 INFO c.c.d.collector.CollectorTask - New projects 0 0s
2018-10-15 17:15:00,254 INFO c.c.d.collector.CollectorTask - Updated 0 0s

Dashboard -
2018-10-15 16:30:35,878 ERROR c.c.d.rest.RestApiExceptionHandler - An Authentication object was not found in the SecurityContext

Really appreciate if someone helps here. tell me where i am going wrong. i have worked on these for the last four days...not able to show data on the dashboard from collectors....

Most helpful comment

@yadurajshakti - this is great information! Thank you for taking the time to help others. I do want to point out though that you don't need the jenkins plugin AND the jenkins collector. Both get you the same data so you just need to pick the one that suits you best. The jenkins plugin has better overall performance since it is push based as opposed to pull based like the collector. I would say the only time you should bother with the collector is if you are using a jenkins instance managed by someone else and you don't have the ability to install the plugin.

All 5 comments

Hi, As I can understand you are trying to fetch Build status of a job from Jenkins to Hygieia.
In order to integrate Hygieia with Jenkins you need to do some configurations.

http://hygieia.github.io/Hygieia/hygieia-jenkins-plugin.html

Jenkins side

  1. Upload .hpi file from your "Hygieia\hygieia-jenkins-plugin" folder to Jenkins plugin section then you will be able to see the Hygieia Publisher in Job's Post Build action.
  2. You need to set "Hygieia Server URL" in Global Hygieia Publisher Settings. For that Goto Manage Jenkins > configure system > Global Hygieia Publisher Settings

Now in Hygieia side

  1. Set application.properties ( I guess you already did) in your (\Hygieia\collectors\build\jenkins\target) folder.
  2. Follow step from http://hygieia.github.io/Hygieia/jenkins.html to Run or Deploy Jenkins collector in separate cmd prompt.
    Use cmd:
    java -jar [your-jenkins-build-collector].jar --spring.config.name=jenkins --spring.config.location=application.properties

Make sure your MongoDB client and Hygieia API is running. To check if Hygieia API is running use http://localhost:8080/api/ping, it should return true in browser.

Hope it helps!

@yadurajshakti - this is great information! Thank you for taking the time to help others. I do want to point out though that you don't need the jenkins plugin AND the jenkins collector. Both get you the same data so you just need to pick the one that suits you best. The jenkins plugin has better overall performance since it is push based as opposed to pull based like the collector. I would say the only time you should bother with the collector is if you are using a jenkins instance managed by someone else and you don't have the ability to install the plugin.

@matthewbeasley - Thank you so much!!! Now I have understood.

So yeah, We need to configure either Jenkins side (Push-based) OR Hygieia side (Pull-based) based on your need.

Reopen if you are still facing issues.

@matthewbeasley So i beleive either should use pull or push ? what will happen if we use both (jenkkins collector & jenkins publisher )
have installed jenkins collector & am able to pull all the data, but i want to publish code quality,security & some other reports to hygieia..in this case what would be the best option ?

Was this page helpful?
0 / 5 - 0 ratings