Commit Graph

31 Commits

Author SHA1 Message Date
Zoltán Bedi
05ab443cef fix(zabbix): prevent silent removal of itemTagFilter when no tags match regex (#2248)
Added a test to ensure that when a regex itemTagFilter does not match
any tags, the GetItems function returns an empty list instead of all
items. This addresses a bug where an empty tag filter would lead to
unintended behavior by removing the filter silently.

Fixes #2247
2026-01-26 09:50:49 +01:00
Jocelyn Collado-Kuri
0d64736e86 Adds support for host tags (#2140)
## 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-902cc657c014


https://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>
2026-01-05 05:30:55 -08:00
Jocelyn Collado-Kuri
89ae290942 Move health check to the backend (#2120)
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
2025-11-25 14:54:18 -08:00
github-actions[bot]
b13d567eee chore: bump @grafana/create-plugin configuration to 5.26.4 (#2082)
Bumps
[`@grafana/create-plugin`](https://github.com/grafana/plugin-tools/tree/main/packages/create-plugin)
configuration from 4.2.1 to 5.26.4.

**Notes for reviewer:**
This is an auto-generated PR which ran `@grafana/create-plugin update`.
Please consult the create-plugin
[CHANGELOG.md](https://github.com/grafana/plugin-tools/blob/main/packages/create-plugin/CHANGELOG.md)
to understand what may have changed.
Please review the changes thoroughly before merging.

---------

Co-authored-by: grafana-plugins-platform-bot[bot] <144369747+grafana-plugins-platform-bot[bot]@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2025-09-17 20:33:12 +02:00
yesoreyeram
374c83d17d initial fix 2025-01-03 09:18:37 +00:00
Ivana Huckova
dbcc008489 Fix querying and authentication for Zabbix v7.0+ (#1931)
* Fix querying for Zabbix v7.2+

* Update check from 7.2 to 7.0

* Fix also select acknowledges key

* Remove unsused methods

* release commit 4.6.0

---------

Co-authored-by: yesoreyeram <153843+yesoreyeram@users.noreply.github.com>
2024-12-17 01:02:43 +00:00
Muhammad Iqbal Alaydrus
dfe360bf1d item.get cache won't be hit if tags order are different (#1745)
* cache won't be hit if tags order are not the same

* unit test for get items with tags
2023-12-04 13:46:11 +01:00
Alexander Zobnin
c06683cd37 Fix backend linter errors 2023-08-30 12:48:38 +02:00
Alexander Zobnin
cef0a2e157 Fix app filter returning all items in case of wrong app, #1597 2023-08-01 13:13:51 +02:00
Alexander Zobnin
24285a9483 Fix item tag filter, #1594 2023-03-23 14:40:22 +01:00
Alexander Zobnin
dd6798834a Improve tags performance (#1526)
Co-authored-by: Erik De Neve <erik.de.neve@telenet.be>
2023-03-21 12:28:34 +01:00
Alexander Zobnin
799875866a Fix matching 2022-09-01 10:30:55 +03:00
Alexander Zobnin
459722d0e4 Merge branch 'regexp2' of github.com:thetuxkeeper/grafana-zabbix into thetuxkeeper-regexp2 2022-09-01 09:38:40 +03:00
Alexander Zobnin
5777c2dd0f Query object ids explicitly 2022-07-12 09:18:16 +03:00
Alexander Zobnin
d2645a43b2 Fix fetching host groups, #1470 2022-07-08 14:48:57 +03:00
Daniel Poßmann
70055b0682 switch to regexp2 for parsed filter 2022-07-07 14:28:55 +02:00
Alexander Zobnin
c0a33f2e7e Fix show disabled items toggle, closes #1249 2022-05-04 12:08:54 +03:00
Alexander Zobnin
c70c9e9ef6 Refactor: define slices with make() 2022-04-27 14:01:42 +03:00
Alexander Zobnin
37280079ac Fix returning apps when no host found, fixes #1427 2022-04-27 13:48:20 +03:00
Alexander Zobnin
abe45790f3 Remove unused debug logging 2021-08-10 14:14:28 +03:00
Alexander Zobnin
00e33fcc49 Fix using value mapping from zabbix, closes #1222 2021-08-10 13:41:56 +03:00
Alexander Zobnin
8efc020f33 Fix filtering by application 2021-08-10 12:51:43 +03:00
Alexander Zobnin
915973829d Support item tags, fixes #1258 2021-08-09 14:57:49 +03:00
Alexander Zobnin
4855cd0122 Fix codespell 2021-08-06 14:43:03 +03:00
Alexander Zobnin
c81a6ae8c3 Use backend queries for item id mode 2021-06-01 13:01:54 +03:00
Alexander Zobnin
7d5b7cad3e Align time series data if possible 2021-05-31 17:42:24 +03:00
Alexander Zobnin
7748508a5c Use time series format internally 2021-05-24 17:11:36 +03:00
Alexander Zobnin
e7a386cf8a Refactor history/trend queries 2021-05-24 15:31:56 +03:00
Alexander Zobnin
94b5c88366 Fix item filtering 2021-05-24 11:20:14 +03:00
Alexander Zobnin
37573e0152 Refactor filters 2021-05-24 10:46:28 +03:00
Alexander Zobnin
badecc3aae Refactor: zabbix client 2021-05-19 13:17:46 +03:00