Skip to content

Conversation

@ozarrouki
Copy link

@ozarrouki ozarrouki commented Nov 25, 2024

Summary:

Support for Query Types: Added support for querying user macro names and user macro values.
Filtering Hosts: Implemented the ability to filter hosts in Zabbix using user macro names and values.
Regex Filtering: Enhanced filtering capabilities by adding support for regular expression (regex) filtering on user macro names and values.
These changes aim to improve the flexibility and precision of host filtering in Zabbix, making it easier to manage and visualize data in Grafana.

Changes:

Added query types for user macro names and values.
Implemented filtering logic for hosts based on user macros.
Added regex support for user macro filtering in Variable settings.

Screeshots:

image

image

image

image

Fixes #1926

@ozarrouki ozarrouki requested a review from a team as a code owner November 25, 2024 17:07
@CLAassistant
Copy link

CLAassistant commented Nov 25, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@zoltanbedi
Copy link
Member

Can you please open an issue for this first where you describe the problem that you are trying to solve?

@ozarrouki
Copy link
Author

Hello

here is the linked issue to this request :
#1926

@zoltanbedi
Copy link
Member

Also you need to accept the CLA.

@ozarrouki ozarrouki force-pushed the include-macro-filtering-for-hosts branch from e196872 to 4fb5863 Compare December 10, 2024 14:41
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files show as modifed when they were not i added a space to see the contents

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files show as modifed when they were not i added a space to see the contents

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files show as modifed when they were not i added a space to see the contents

@krisavi
Copy link
Contributor

krisavi commented Mar 6, 2025

src/datasource/zabbix/zabbix.ts L213 that extra 'n' before comment seems not good.

Copy link
Member

@zoltanbedi zoltanbedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the code again but I'd like to have a better understanding on what we want to achieve here before we go into implementation details.

return this.request('usermacro.get', params);
}

getMacrosByGroup(groupids) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the need for 2 different functions. The other one only misses 3 fields.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also why don't you use the getMacros function above and extend that with the groupids?

@zoltanbedi
Copy link
Member

Also it would be best to try to create smaller PRs that only focus on one aspect at a time. It would help us reviewing the code faster.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2025

This pull request has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions!

@github-actions github-actions bot added the stale label Jun 7, 2025
@zoltanbedi zoltanbedi removed the stale label Jun 10, 2025
@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions!

@github-actions github-actions bot added the stale label Aug 10, 2025
@github-actions
Copy link
Contributor

This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions!

@github-actions github-actions bot closed this Aug 25, 2025
@github-project-automation github-project-automation bot moved this to Complete in OSS Big Tent Aug 25, 2025
@zoltanbedi zoltanbedi reopened this Aug 25, 2025
@github-actions github-actions bot removed the stale label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

filtering hosts variable using user macros

5 participants