I am using Grafana Alertmanager and have multiple data sources. Now, I want to query two of them, merge the results of each query, and use the merged result as a condition. If both data sources return the same result, the condition works fine and triggers an alert:
$A || $B
However, if the data sources return different results or if one of them has no data at that time, the query does not work or trigger an alert. Instead, I see the following message in the alert configuration:
1 item dropped from union(s): ["$A || $B": ($B: {instance=test, job=unix})]
One of my queries on the data sources is as follows:
max_over_time(up{job="unix"}[24h]) unless up
How can I handle this case to ensure the alert works even when one data source has no data or when their results differ?