I’m trying to build a dashboard widget in Datadog that shows whether my GitHub workflow job succeeded or failed. I want it to display green when the job passes and red when it fails.
The tricky part is that I need this widget to always show the most recent job status, regardless of when it ran. So if the last job ran 3 weeks ago, I still want to see that result even when my dashboard time range is set to show only the last hour.
I already have CI Visibility turned on for my repo in Datadog. I can see my workflow data there and I know I can filter for my specific job using something like @ci.job.name:deploy-prod.
I’ve experimented with a few different widget types but none of them seem to work the way I want. I also tried setting up a monitor to track this but that didn’t pan out either.
Has anyone successfully created this kind of status indicator widget? Would love to see how you set it up or get some tips on which widget type works best for this use case.
Had the same need for our deployment pipeline status. Use a Query Value widget with the latest aggregation instead of the usual time-based ones. Set your metric query to ci.job.status with your job filter, then pick “latest” under aggregation settings instead of “avg” or “sum”. This grabs the most recent value no matter what time window your dashboard uses. For colors, set up conditional formatting in the widget options - make it green when the value equals 1 (or whatever success looks like for you) and red for failures. You’ll probably want to set the widget’s time range to “Past 30 days” so it catches your latest run even if it was weeks back. Works great for us across multiple repos with different deployment schedules.
Honestly, just use a monitor with custom thresholds instead of widgets. Create one that tracks your @ci.job.name:deploy-prod status and set it to trigger when the latest value changes. Pin that monitor to your dashboard - it’ll auto-update with the most recent job result without dealing with aggregation settings or time windows.
I ran into this same issue a few months back. Skip Query Value and use the Table widget instead - way more reliable. Here’s what worked for me: Set up a table widget with ci.job.status as your metric, group by @ci.job.name, and filter for your specific job. Use “last” for aggregation and bump the time window to 90 days so it catches your most recent run. You’ll get a clean table with job name in one column and current status in the other. Add conditional formatting to color-code it - green for success, red for failures. This beats Query Value widgets hands down, especially when jobs don’t run often. Been using it for our production deployments and it’s solid even with weeks between releases.
The Datadog approach works but gets messy once you’re dealing with multiple repos or need complex CI logic.
I ran into this same issue managing deployment statuses across 20+ services. Rather than mess with Datadog widgets, I built automation that pulls GitHub workflow data and pushes clean status metrics to our dashboard.
It runs every few minutes, grabs the latest job status from GitHub’s API, and formats everything exactly how I want. No more fighting aggregation settings or weird conditional formatting. I can also add custom logic like ignoring cancelled jobs or handling multiple workflow steps.
Best part? When requirements change (Slack notifications, different colors, whatever), I just tweak the automation instead of reconfiguring widgets.
For your case, just pull the latest workflow run status and push it as a 1/0 metric to Datadog with timestamps. Your widget setup becomes dead simple.
Use a Timeseries widget but change the display type to “Fill” instead of the default line graph. Set up your @ci.job.name:deploy-prod filter with “last” aggregation over 30 days. The Fill mode creates solid colored blocks instead of lines - way better for status visualization. Add conditional formatting and you’ll get a clean status bar that shows green/red based on your latest job result. I’ve used this for our staging checks and it works great with sporadic deployments. The filled blocks are much easier to spot than tiny dots on regular charts.
Skip the Datadog widget wrestling. I dealt with this same headache until I stopped overcomplicating it.
Datadog widgets aren’t built for real-time status indicators - they’re made for time-series data. Fighting aggregation settings and time windows is pointless.
I set up simple automation that watches GitHub webhooks instead. When a workflow finishes, it grabs the status and pushes a clean metric to Datadog. No more “latest” aggregation hacks or weird time windows. The automation formats everything - job name, timestamp, status as 1 or 0.
My dashboard now shows current status with zero drama. Easy to extend for multiple jobs, Slack alerts, whatever.
10 minutes to set up and it actually works. Won’t break when Datadog changes their widgets.