jenkinsci / github-autostatus-plugin

Jenkins plugin to provide automatic status for multibranch jobs
https://plugins.jenkins.io/github-autostatus/
MIT License
53 stars 34 forks source link

"job" MEASUREMENT not found in influxDB #40

Closed Massukio closed 5 years ago

Massukio commented 5 years ago

I setup the influxDB and Grafana exactly the same as tutorial said. Then I trigger my pipeline job, but only 'stage' MEASUREMENT and stage data is sent to my DB.

I check the Grafana board (5786) which requires 'job' MEASUREMENT to get status data but I failed to find it in my DB, is there any other setting I missed?

> show measurements
name: measurements
name
----
stage
jeffpearce commented 5 years ago

Are there any errors in the Jenkins log? I’ll take a look today to see if somethings broken, but it’s possible it’s data specific, so the error log might help figure that out.

Also, which version of the plugin are you using?

jeffpearce commented 5 years ago

@timmy8526 , I verified that the job measurement is flowing with the latest release (3.4.2), so I suspect that the bug is that the data isn't being encoded correctly before sending it. If this is the case, there should be a warning that it couldn't be sent in the system log.

Massukio commented 5 years ago

I was using ver 3.4, and the error logs did send. I am going to update the version to 3.4.2 and try again later today, and will update status here.

Processing build daily_test 2019-05-15 09:41:39 CST
May 15, 2019 9:41:46 AM INFO org.jenkinsci.plugins.workflow.job.WorkflowRun finish
daily_test #48 completed: FAILURE
May 15, 2019 9:41:46 AM WARNING hudson.model.listeners.RunListener report
RunListener failed
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
    at org.jenkinsci.plugins.githubautostatus.notifiers.InfluxDbNotifier.getLong(InfluxDbNotifier.java:186)
    at org.jenkinsci.plugins.githubautostatus.notifiers.InfluxDbNotifier.notifyFinalBuildStatus(InfluxDbNotifier.java:163)
    at org.jenkinsci.plugins.githubautostatus.notifiers.BuildNotifierManager.lambda$notifyFinalBuildStatus$1(BuildNotifierManager.java:114)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.jenkinsci.plugins.githubautostatus.notifiers.BuildNotifierManager.notifyFinalBuildStatus(BuildNotifierManager.java:113)
    at org.jenkinsci.plugins.githubautostatus.BuildStatusAction.updateBuildStatusForJob(BuildStatusAction.java:227)
    at org.jenkinsci.plugins.githubautostatus.BuildStatusJobListener.onCompleted(BuildStatusJobListener.java:74)
    at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:586)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$900(WorkflowRun.java:133)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:998)
    at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1452)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:435)
    at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

UPDATE: The issue is somehow resolved after upgrade ver 3.4.2!

> show measurements
name: measurements
name
----
job
stage

Thanks for your help:)

jeffpearce commented 5 years ago

Yeah, this was issue #38 , which fortunately was quickly reported and fixed. Sorry about the confusion, but I'm glad it's working for you!