Jocelyn Collado-Kuri 3d0895c008 Fix the way we merge frontend and backend queries (#2158)
## Summary

With the new logic to merge backend and frontend query responses, some
of the frontend query responses were being lost due to early
termination.

Merging frontend and backend responses was not properly waiting for all
promises to resolve before returning this "merged" result

## Detailed explanation

In `mergeQueries` although `Promise.all` was triggered, we returned
immediately without waiting for the promises to actually resolve, now
instead of passing down promises:
- use `switchMap` so that the upstream backend response observable can
be used as an inner Observable value to be concatenated with the rest of
the responses
- Why not use `map`? To prevent out of sync results, we need to wait for
the promises to resolve **before** we pass it down to the `mergeQueries`
function, `map` does not allow that.
- use `from` and trigger `Promise.all` **before** calling `mergeQueries`
so that all promise results can be resolved and converted to observables
by the time they get passed into the function
- modify `mergeQueries` to accept `DataResponse` for arguments, clone
the existing data and return the merged result.

<img width="1700" height="398" alt="Screenshot 2025-12-29 at 1 06 05 PM"
src="https://github.com/user-attachments/assets/c07c59b1-43b8-47f9-adc6-67583b125856"
/>

## Why

To fix how frontend and backend queries are merged so that no response
gets lost in the process

## How to test
1. Create a new dashboard or go to Explore
2. For query type select `Problems` or anything that is not `Metrics` 
3. Execute the query, and you should be able to see a response.
2025-12-31 06:46:56 -08:00
2024-11-27 10:32:48 +00:00
2025-02-04 18:04:07 +07:00
2023-09-28 15:48:41 +02:00
2017-07-25 00:03:52 +03:00
2025-10-17 09:47:21 +00:00
2025-09-18 16:36:00 +02:00
2024-01-08 17:45:55 +00:00
2024-02-06 08:14:06 +00:00

Zabbix plugin for Grafana

Version Change Log Docs

Dashboard

Features

  • Select multiple metrics by using Regex
  • Create interactive and reusable dashboards with template variables
  • Show events on graphs with Annotations
  • Display active problems with Triggers panel
  • Transform and shape your data with metric processing functions (Avg, Median, Min, Max, Multiply, Summarize, Time shift, Alias)
  • Find problems faster with Alerting feature
  • Mix metrics from multiple data sources in the same dashboard or even graph
  • Discover and share dashboards in the official library

See all features overview and dashboards examples at Grafana-Zabbix Live demo site. Visit plugins page at grafana.com and check out available Grafana data sources, panels and dashboards.

Installation

Install by using grafana-cli

grafana-cli plugins install alexanderzobnin-zabbix-app

Or see more installation options in docs.

Getting started

First, configure Zabbix data source. Then you can create your first dashboard with step-by-step Getting started guide.

Documentation

Community Resources, Feedback, and Support

  • Found a bug? Want a new feature? Feel free to open an issue.
  • Have a question? You also can open issue, but for questions, it would be better to use Grafana Community portal.
Description
grafana zabbix fork
Readme Apache-2.0 18 MiB
Languages
TypeScript 68.4%
Go 22.8%
SCSS 5.3%
JavaScript 1.3%
Python 1%
Other 1.1%