[Bug]: Alert page, displays a zero, when Latest time/value is not present
Bug description
Alert page, displays a zero, when Latest time/value is not present
Expected behavior
Not show the weird zero?
Steps to reproduce
Screenshots
Error Logs
N/A
Desktop
N/A
Additional context
No response
was trying to dig into see why this happens but can't pinpoint where the latest value is mapped from, maybe @netdata/cloud-fe or @car12o can help on this one
the payload of the /alert_transitions for this a case like this - current alert on Netdata People space:
{
"api": 2,
"transitions": [
{
"transition_id": "3aeca29c-c698-4cc6-a7e7-5cd90fd691c9",
"node_id": "fa3217e1-2e7d-4b39-9619-c95c94cba8f7",
"alert": "10min_disk_backlog",
"instance": "disk_backlog.mmcblk0",
"instance_n": "disk_backlog.mmcblk0",
"context": "disk.backlog",
"when": 1699334164,
"new": {
"status": "WARNING",
"value": 9044.362181813924
},
"old": {
"status": "CLEAR",
"value": 3.0783333280000007
},
"summary": "Disk mmcblk0 backlog",
"info": "Average backlog size of the mmcblk0 disk over the last 10 minutes",
"src": "158@/usr/lib/netdata/conf.d/health.d/disks.conf",
"exec": "/usr/libexec/netdata/plugins.d/alarm-notify.sh",
"config_hash_id": "823565b5-4a9e-ed82-4876-fee349d6b67c",
"units": "ms",
"component": "Disk",
"classification": "Latency",
"to": "silent"
}
],
"timings": {
"routing_ms": 0,
"node_max_ms": 0,
"total_ms": 1
}
}
@hugovalente-pm they come from /alerts endpoint on keys v (value) t (time), they represent the current values for these variables.
the values for when it was triggered are on keys tr_v (triggered value) tr_t (triggered time).
{
"api": 2,
"nodes": ...,
"alerts": ...,
"alert_instances": [
{
"ni": 9,
"ati": 0,
"sum": "Disk / space usage",
"info": "Total space utilization of disk /",
"nm": "disk_space_usage",
"ch": "disk_space._",
"ch_n": "disk_space._",
"ctx": "disk.space",
"st": "WARNING",
"v": 94.2504901,
"t": 1699436372,
"tr_i": "8035b1b9-62e6-4560-82ab-637f12747b41",
"tr_v": 90.07800719809327,
"tr_t": 1698453197,
"units": "%",
"cfg": "f4eca216-632b-0ea8-2252-890c59ca2d1c",
"src": "12@/usr/lib/netdata/conf.d/health.d/disks.conf",
"exec": "/usr/libexec/netdata/plugins.d/alarm-notify.sh",
"tp": "System",
"cl": "Utilization",
"cm": "Disk",
"to": "sysadmin",
"slc": {
"state": "NONE"
}
}
],
"timings": ...
}
bear in mind if the alert is not raised anymore we have no current values for it.