SpotiByeAds icon indicating copy to clipboard operation
SpotiByeAds copied to clipboard

Docker installation of Hygiea.

Open SuriDotInc opened this issue 6 years ago • 12 comments

Hi, I did docker images Mongo, UI, API, and Jenkins Collector,

The Mongo, UI, API are up with no issues, they are connected OK.

But when I introduce the Jenkins collector, The problem started, I am seeing the following track trace.

Factory.java:1574) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE] ... 35 common frames omitted Caused by: com.mongodb.MongoCommandException: Command failed with error 85: 'Index with name: unique_mdata_key_type already exists with different options' on server 10.40.11.193:27017. The full response is { "ok" : 0.0, "errmsg" : "Index with name: unique_mdata_key_type already exists with different options", "code" : 85, "codeName" : "IndexOptionsConflict" } at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:77) ~[mongo-java-driver-3.0.2.jar!/:na] at com.mongodb.connection.CommandProtocol.createCommandResult(CommandProtocol.java:140) ~[mongo-java-driver-3.0.2.jar!/:na]

I also did the following: I have tried to stop the API, then start the Jenkins collector, The Jenkins collector runs without issues, now if I bring UP the API, the API errors out with the same issue. How can I get around of this issue, Can some one please give some guidance.

my api docker container.

docker run -d -t -p 8080:8080 --name api --link=mongodb:mongo -v /logs:/hygieia/logs -e "SPRING_DATA_MONGODB_HOST=10.40.11.193" myhygapi:latest

my jenkins collector command:

docker run -d -t --link=mongodb:mongo -v /logs/jenkins:/hygieia/logs -e "MONGO_PORT=tcp://10.40.11.193:27017" -e "JENKINS_MASTER=http://35.xxx.xxx.xxx/jenkins" -e "JENKINS_USERNAME=readonly" -e "JENKINS_API_KEY=readonly" myhygjenkinscollector:latest

SuriDotInc avatar Sep 10 '19 19:09 SuriDotInc

@SuriDotInc As of this moment we are working on streamlining the docker setup for Hygieia. If you have any thoughts please let us know so that we can incorporate the same.

rvema avatar Sep 11 '19 13:09 rvema

Hello @rvema, Thank you for the reply and your time addressing the client needs. I was able to use the Docker starter kit to stand up the all the collectors with data persistence to local.

I have two questions further,

  1. I have a need to read the data from new relic APM tool, Do you know if any collector available for New relic ?
  2. How can we add another collector like hygieia-scm-subversion-collector to the same service ? Download the jar from maven central and add to the Docker file, service enable and etc ? What are the parameters goes into the docker-compose file ? any where idea I can look up ?

SuriDotInc avatar Sep 11 '19 20:09 SuriDotInc

I would advise against trying to extend the starter kit further than what it was intended to be. But if this is something you really want to do then you can look at the base image and see how it is pulling the artifacts, update it, and then build your own. You could then see how the compose file is building the property file in the starter kit image and update it and properties builder script to add the properties for subversion.

The parameters required would be pretty close to the same ones used as if you were just running the collector standalone.

Sbrenthughes avatar Sep 12 '19 23:09 Sbrenthughes

Hi, Thank you for the reply and your valuable suggestions, I just need to know what parameters are expected by the collector, Can you please let me know where to look up those expected parameters and I can take it from there, I see , it's hard for me to decode the expected parameters (What param are Mandatory vs Optional) and not trying to reinvent the wheel. can you please guide me where to look up the properties that is expected by collector.

Also, I have another question about a new collector for newrelic APM tool, Are you planning to build one any time soon.

Again, thanks for the reply, Hygieia is very good tool and my counterparts really liked it.

Thanks,

SuriDotInc avatar Sep 13 '19 00:09 SuriDotInc

The example properties file is here for subversion https://github.com/Hygieia/hygieia-scm-subversion-collector. It is also important to note that that collector is not as up to date as the other scm collectors. As such your dashboard will be missing some metrics.

Sbrenthughes avatar Sep 13 '19 18:09 Sbrenthughes

This initial issue is not only isolated to the Starter Kit or Docker. I downloaded and built the various Hygieia repos, with some of the new collectors. I am running this locally without Docker (MongoDB, API, Jenkins Collector, Gulp all from separate Powershell windows). I was successful at getting the UI to come up and getting the Jenkins widget to work. However I am having the same issue when I try to start the GitHub collector for the code repo widget: "errmsg" : The full response is { "ok" : 0.0, "errmsg" : "Index with name: unique_mdata_key_type already exists with different options", "code" : 85, "codeName" : "IndexOptionsConflict" } Note: Temporary fix is to delete the offending index in the MongoDB

TonyMorrison avatar Sep 16 '19 20:09 TonyMorrison

hi there, I am trying to get github collector working and getting the same error as mentioned by TonyMorrison. Any suggestion as to how to resolve this please?

hammad-bbc avatar Sep 17 '19 12:09 hammad-bbc

@hammad-bbc A workaround is to delete the offending index when the error pops up. It will allow you to start the failing application.

@Sbrenthughes Is there a reason why the api and any other collector would have a different way of setting the indices for the metadata collection in the database? This seems to be a problem perhaps spawned by breaking the collectors out from the monolithic Hygieia, that when starting the apps, maybe Spring is setting the unique_mdata_key_type differently. I have been deleting the index when any one of the collectors wont start after a previous one has set the index, which could lead to other problems downstream.

TonyMorrison avatar Sep 17 '19 17:09 TonyMorrison

@TonyMorrison @hammad-bbc we are putting the fix in. The reason behind the problem was with competing versions of model embedded within the components. I will get the starter pack fixed today as well.

rvema avatar Sep 17 '19 18:09 rvema

Any updates?

drewkhoury avatar Feb 08 '20 23:02 drewkhoury

hey all I was curious where this was at currently, and if there was anyway I could help out. :)

not to deter too much from this thread, but i've heard the starter pack mentioned but can't seem to find any information around that. is there any that has been made publicly available?

daelious avatar Jul 30 '20 03:07 daelious

https://github.com/Hygieia/Hygieia/pull/3326

gliptak avatar Nov 09 '20 00:11 gliptak