I’m trying to get the Datadog dashboard to display the last result of a Jenkins job. The problem I’m having it’s displaying both the last successful and last failed result.
I’m using Metrics on jenkins.job.completed and have set the ‘reduce values in timeframe to’ last. As I want to display the result of the jenkins job I have aggregated on result field, but it shows all results success/fail of the same jenkins job.
"queries": [
{
"data_source": "metrics",
"name": "query1",
"query": "avg:jenkins.job.completed{host:$jenkins_executor_hostname.value,job:*smoke*prod*, $jenkins_build_number} by {job,result}.as_count()",
"aggregator": "last"
}
],
If I don’t aggregate on result, I have not found a way to display the job result.
Any ideas would be appreciated.