Skip to content

Commit

Permalink
data: don't ignore data point when unavailable
Browse files Browse the repository at this point in the history
Ignoring the entire data point when a cURL fails (in other words, when
unavailable) leads to a panel with "no data" which is misleading.

There actually is data, and maybe it just happens it is "unavailable" to
all builds. Or it is unavailable to a single build.

To fix this, save the data points even when cURL request fails, and show
data as unavailable in the charts.

Signed-off-by: Leonardo Graboski Veiga <[email protected]>
  • Loading branch information
leograba committed Jan 20, 2024
1 parent 62fcb12 commit 173d63e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TorizonOSBuildStatusDataAcquisition/get-build-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function insert_into_influxdb() {
buildstatus="${buildstatus}${job}=\"${jobstatus}\","
echo "Element: $job | Value: $jobstatus"
else
echo "Element: $job returned an empty value, skipping this data point"
break
echo "Element: $job returned an empty value"
buildstatus="${buildstatus}${job}=\"Unavailable\","
fi
done

Expand Down
10 changes: 10 additions & 0 deletions TorizonOSBuildStatusGrafana/grafana-config/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
"index": 1,
"text": "Success"
},
"Unavailable": {
"color": "transparent",
"index": 6,
"text": "-"
},
"Unstable": {
"color": "orange",
"index": 2,
Expand Down Expand Up @@ -163,6 +168,11 @@
"index": 1,
"text": "Success"
},
"Unavailable": {
"color": "transparent",
"index": 6,
"text": "-"
},
"Unstable": {
"color": "orange",
"index": 2,
Expand Down

0 comments on commit 173d63e

Please sign in to comment.