{"action":"opened","issue":{"url":"https://api.github.com/repos/capitalone/Hygieia/issues/1627","repository_url":"https://api.github.com/repos/capitalone/Hygieia","labels_url":"https://api.github.com/repos/capitalone/Hygieia/issues/1627/labels{/name}","comments_url":"https://api.github.com/repos/capitalone/Hygieia/issues/1627/comments","events_url":"https://api.github.com/repos/capitalone/Hygieia/issues/1627/events","html_url":"https://github.com/capitalone/Hygieia/issues/1627","id":250570132,"number":1627,"title":"Jenkins collector does not fetch builds","user":{"login":"pasan96","id":19402786,"avatar_url":"https://avatars2.githubusercontent.com/u/19402786?v=4","gravatar_id":"","url":"https://api.github.com/users/pasan96","html_url":"https://github.com/pasan96","followers_url":"https://api.github.com/users/pasan96/followers","following_url":"https://api.github.com/users/pasan96/following{/other_user}","gists_url":"https://api.github.com/users/pasan96/gists{/gist_id}","starred_url":"https://api.github.com/users/pasan96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasan96/subscriptions","organizations_url":"https://api.github.com/users/pasan96/orgs","repos_url":"https://api.github.com/users/pasan96/repos","events_url":"https://api.github.com/users/pasan96/events{/privacy}","received_events_url":"https://api.github.com/users/pasan96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-16T09:48:36Z","updated_at":"2017-08-16T09:48:36Z","closed_at":null,"body":"I've pulled the latest code and configured the Jenkins collector, but the collector is not fetching/storing the builds in the DB, but the collector information is present in the \"collectors\" collection, that means it's connecting to the DB.\r\n\r\nProperties file:\r\n```\r\n# Database Name\r\ndbname=dashboarddb\r\n\r\n# Database HostName - default is localhost\r\ndbhost=localhost\r\n\r\n# Database Port - default is 27017\r\ndbport=27017\r\n\r\n# MongoDB replicaset\r\ndbreplicaset=false\r\ndbhostport=localhost:27017,127.0.0.1:27017,ip-172-31-26-184:27017\r\n\r\n# Database Username - default is blank\r\ndbusername=dashboarduser\r\n\r\n# Database Password - default is blank\r\ndbpassword=dbpassword\r\n\r\n# Collector schedule (required)\r\njenkins.cron=0 0/1 * * * *\r\n\r\n# The page size\r\njenkins.pageSize=1000\r\n\r\n# The folder depth - default is 10\r\njenkins.folderDepth=10\r\n\r\n# Jenkins server (required) - Can provide multiple\r\njenkins.servers[0]=http://admin:83212caf8b414b89a4f9c4fdf87d3711@localhost:8082/jenkins\r\n#jenkins.servers[0]=http://jenkins.company.com\r\n#jenkins.servers[0]=http://localhost:8082/jenkins\r\n#jenkins.niceNames[0]=[YourJenkins]\r\n#jenkins.environments[0]=[DEV,QA,INT,PERF,PROD]\r\n\r\n# If using username/token for api authentication\r\n#   (required for Cloudbees Jenkins Ops Center) see sample\r\n#jenkins.servers[1]=http://username:token@jenkins.company.com\r\n\r\n# Another option: If using same username/password Jenkins auth,\r\n#   set username/apiKey to use HTTP Basic Auth (blank=no auth)\r\n#jenkins.usernames[0]=admin\r\n#jenkins.apiKeys[0]=83212caf8b414b89a4f9c4fdf87d3711\r\n\r\n# Determines if build console log is collected - defaults to false\r\njenkins.saveLog=true\r\n\r\n#debug\r\nlogging.level.com.capitalone.dashboard.collector=DEBUG\r\nlogging.level.com.capitalone.dashboard=DEBUG\r\n```\r\nI've tried using\r\n ```\r\n#jenkins.usernames[0]=admin\r\n#jenkins.apiKeys[0]=83212caf8b414b89a4f9c4fdf87d3711\r\n```\r\ntoo, but no luck. I have 4 builds in the job..\r\n\r\nLogs:\r\n\r\n```\r\n2017-08-16 15:14:09,657 INFO  o.s.j.e.a.AnnotationMBeanExporter - Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.spri\r\nngframework.cloud.context.properties:name=configurationPropertiesRebinder,context=1ddb1228,type=ConfigurationPropertiesRebinder]\r\n2017-08-16 15:14:09,756 INFO  com.capitalone.dashboard.Application - Started Application in 14.406 seconds (JVM running for 16.468)\r\n2017-08-16 15:14:59,997 INFO  c.c.d.collector.CollectorTask - Running Collector: Hudson\r\n2017-08-16 15:15:00,165 INFO  c.c.d.collector.CollectorTask - -----------------------------------\r\n2017-08-16 15:15:00,174 INFO  c.c.d.collector.CollectorTask - http://psumanaratne:83212caf8b414b89a4f9c4fdf87d3711@localhost:8082/jenkins\r\n2017-08-16 15:15:00,174 INFO  c.c.d.collector.CollectorTask - -----------------------------------\r\n2017-08-16 15:15:00,175 DEBUG c.c.d.collector.DefaultHudsonClient - Enter getInstanceJobs\r\n2017-08-16 15:15:00,175 DEBUG c.c.d.collector.DefaultHudsonClient - Enter makeRestCall http://psumanaratne:83212caf8b414b89a4f9c4fdf87d3711@localhost:8082/jenkins/api/j\r\nson?tree=jobs\r\n2017-08-16 15:15:00,231 DEBUG c.c.d.collector.DefaultHudsonClient - Number of jobs 1\r\n2017-08-16 15:15:00,232 DEBUG c.c.d.collector.DefaultHudsonClient - Enter makeRestCall http://psumanaratne:83212caf8b414b89a4f9c4fdf87d3711@localhost:8082/jenkins/api/j\r\nson?tree=jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,date,hasConfig,job,ol\r\ndName,operation,user,userID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,\r\ndate,hasConfig,job,oldName,operation,user,userID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfi\r\ngHistory[currentName,date,hasConfig,job,oldName,operation,user,userID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,buil\r\ntOn],actions[jobConfigHistory[currentName,date,hasConfig,job,oldName,operation,user,userID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],las\r\ntBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,date,hasConfig,job,oldName,operation,user,userID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[t\r\nimestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,date,hasConfig,job,oldName,operation,user,userID]],jobs[name,url,builds[number,url],\r\nlastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,date,hasConfig,job,oldName,operation,user,userID]],jobs[name,ur\r\nl,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,date,hasConfig,job,oldName,operation,user,\r\nuserID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,date,hasConfig,job,ol\r\ndName,operation,user,userID]],jobs[name,url,builds[number,url],lastSuccessfulBuild[timestamp,builtOn],lastBuild[timestamp,builtOn],actions[jobConfigHistory[currentName,\r\ndate,hasConfig,job,oldName,operation,user,userID]]]]]]]]]]]]%7B0%2C1000%7D\r\n2017-08-16 15:15:00,240 DEBUG c.c.d.collector.DefaultHudsonClient - Process jobName Helloworld-3 jobURL http://localhost:8082/jenkins/job/Helloworld-3/ jobClass hudson.\r\nmodel.FreeStyleProject\r\n2017-08-16 15:15:00,241 DEBUG c.c.d.collector.DefaultHudsonClient - recursiveGetJobDetails: jobName Helloworld-3 jobURL: http://localhost:8082/jenkins/job/Helloworld-3/\r\n\r\n2017-08-16 15:15:00,241 DEBUG c.c.d.collector.DefaultHudsonClient -  buildNumber: 4\r\n2017-08-16 15:15:00,241 DEBUG c.c.d.collector.DefaultHudsonClient -  Adding Build: http://localhost:8082/jenkins/job/Helloworld-3/4/\r\n2017-08-16 15:15:00,242 DEBUG c.c.d.collector.DefaultHudsonClient -  buildNumber: 3\r\n2017-08-16 15:15:00,242 DEBUG c.c.d.collector.DefaultHudsonClient -  Adding Build: http://localhost:8082/jenkins/job/Helloworld-3/3/\r\n2017-08-16 15:15:00,242 DEBUG c.c.d.collector.DefaultHudsonClient -  buildNumber: 2\r\n2017-08-16 15:15:00,242 DEBUG c.c.d.collector.DefaultHudsonClient -  Adding Build: http://localhost:8082/jenkins/job/Helloworld-3/2/\r\n2017-08-16 15:15:00,242 DEBUG c.c.d.collector.DefaultHudsonClient -  buildNumber: 1\r\n2017-08-16 15:15:00,243 DEBUG c.c.d.collector.DefaultHudsonClient -  Adding Build: http://localhost:8082/jenkins/job/Helloworld-3/1/\r\n2017-08-16 15:15:00,245 INFO  c.c.d.collector.CollectorTask - Fetched jobs                     0s\r\n2017-08-16 15:15:00,245 INFO  c.c.d.collector.CollectorTask - New jobs                0        0s\r\n2017-08-16 15:15:00,308 INFO  c.c.d.collector.CollectorTask - New builds              0        0s\r\n2017-08-16 15:15:00,310 INFO  c.c.d.collector.CollectorTask - New configs             0        0s\r\n2017-08-16 15:15:00,311 INFO  c.c.d.collector.CollectorTask - Finished                         0s\r\n```\r\n"}}
{"actor":{"display_login":"pasan96"}}