While we are rendering Problems table for each cell we use a different
renderer. For `Age` field we didn't pass the data properly and it caused
errors. The problem is we were trying to render the whole moment object
instead of just the datatime.
Part of: https://github.com/grafana/grafana-zabbix/issues/2197
This PR will fix the issue. This happens when user wants to add a new
panel with `Age` field or try to edit a problems panel `Age` field
enabled.
Kudos to @yesoreyeram
## Sumary
When dealing with multiple hosts, it can be hard for customers filter
through and figure out which host to query metric data from. This PR
aims to make this easier by adding support for host tags so that there
is another layer of filtering / grouping applied for hosts.
## Detailed explanation
- Adds new UI components to allow adding one or more host tag filter,
and a switch to choose between `AND/OR` and `OR` operators when using
more than one filter following Zabbix's UI:
https://github.com/user-attachments/assets/c971f5eb-7e93-4238-bd6b-902cc657c014https://github.com/user-attachments/assets/5f8996de-684e-4ffa-b98e-8e205c4fc1df
- Modifies the existing `getHosts` function to make a call to the
backend with a few additional parameters to `extend` (essentially
extract) the host tags for a given selected group. No backend changes
were required for this.
## Why
To make it easier for customers to query metric data when dealing with
multiple hosts.
## How to test
- Go to explore or a dashboard and create a Zabbix query where the query
type is `Metrics`
- The easiest way to test is by selecting `/.*/` for Groups, checking
the returned `Hosts` they should all be there
- Add a host tag filter and change the keys and operators as well as
switching from `AND/OR` to `OR` you should see how the values returned
for `Host` changes
## Future work
Adding variable support for host tags once this is completed.
Fixes:
https://github.com/orgs/grafana/projects/457/views/40?pane=issue&itemId=3609900134&issue=grafana%7Coss-big-tent-squad%7C126
and https://github.com/grafana/grafana-zabbix/issues/927
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
This PR moves the health check to backend only leaving in the frontend
the functionality to test the dbconnector datasource.
Leaving the `dbconnector.testDataSource` should be fine since the
datasource types we allow for db connection with Zabbix already are
backend datasources, and so their health requests would go through the
backend.
Verified:
Clicking test and seeing a `health` request go out.
IMPORTANT: While testing this in the UI, I found a bug with the config
editor - whenever a change is made in the UI and tested, the changes
don't take effect (i.e. disabling trends, keeps `trends` set to `true`,
enabling db connection keep `dbConnectionEnabled` set to `false` and so
on.). Created a separate
[issue](https://github.com/orgs/grafana/projects/457/views/40?pane=issue&itemId=3627315751&issue=grafana%7Coss-big-tent-squad%7C132)
to fix this
Fixes https://github.com/grafana/oss-big-tent-squad/issues/124
Fixes https://github.com/grafana/grafana-zabbix/issues/2004
Zabbix 5.0.x supported filtering `Problems` feature with `applications`.
When this got removed, we removed the filter dropdown from the UI, but
failed to check whether applications were supported before sending out
the request with the parameters.
This was causing dashboards that had been created with zabbix version
`5.0.x` to fail when querying with newer versions of our plugin with
error: `Invalid params. Invalid parameter "/": unexpected parameter
"applicationids".`
These changes now ensure that we also check whether applications filter
should be supported before sending the backend request to fetch
problems.
How to test:
- use the attached JSON file. This was created using zabbix50 and
applying an `applicationids` filter for `Problems` query type OR
- run the `zabbix50` test environment:
```
cd devenv/zabbix50
docker-compose up -d
```
- create a dashboard that queries for `Problems` and filters with
applications then export the dashboard JSON
- stop the `zabbix50` test environment and start the `zabbix74` test
environment
```
docker-compose stop
cd ../zabbix74
docker-compose up -d
```
- import the dashboard you created above, it should load and work as
expected.
Bottom panel was created using zabbix50 and it used the application
filter. Both panels now load as expected:
<img width="2558" height="1018" alt="Screenshot 2025-10-21 at 2 28
25 PM"
src="https://github.com/user-attachments/assets/9613d59b-3f88-420c-9897-f8d988b3d2f0"
/>
Fixes https://github.com/grafana/grafana-zabbix/issues/1852
* Problems count mode
* Use tooltip from grafana ui
* Add editors for new modes
* Fix macro mode
* Fix bugs
* Unify editors to use one Triggers editor for all count queries
* Use time range toggle for triggers query, #918
* Add item tags suport for triggers count mode
* Fix triggers count by items
* Use data frames for triggers data, #1441
* Return empty result if no items found
* Add migration for problems count mode
* bump version to 4.3.0-pre
* Add zip task to makefile
* Add schema to query model
* Minor refactor
* Refactor: move components to separate files
* Minor refactor
* Support url in event tags
* Add tooltip with link url
* Update grafana packages
* Fix adding new problems panel
* ProblemDetails: rewrite as a functional component
* minor refactor
* Use grafana toolkit template for building plugin
* Fix linter and type errors
* Update styles building
* Fix sass deprecation warning
* Remove empty js files produced by webpack building sass
* Fix signing script
* Replace classnames with cx
* Fix data source config page
* Use custom webpack config instead of overriding original one
* Use gpx_ prefix for plugin executable
* Remove unused configs
* Roll back react hooks dependencies usage
* Move plugin-specific ts config to root config file
* Temporary do not use rst2html for function description tooltip
* Remove unused code
* remove unused dependencies
* update react table dependency
* Migrate tests to typescript
* remove unused dependencies
* Remove old webpack configs
* Add sign target to makefile
* Add magefile
* Update CI test job
* Update go packages
* Update build instructions
* Downgrade go version to 1.18
* Fix go version in ci
* Fix metric picker
* Add comment to webpack config
* remove angular mocks
* update bra config
* Rename datasource-zabbix to datasource (fix mage build)
* Add instructions for building backend with mage
* Fix webpack targets
* Fix ci backend tests
* Add initial e2e tests
* Fix e2e ci tests
* Update docker compose for cypress tests
* build grafana docker image
* Fix docker stop task
* CI: add Grafana compatibility check