-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: [vmagent] added push data with zabbix connector #6087
base: master
Are you sure you want to change the base?
Conversation
…magent Signed-off-by: Sinotov Vladimir <vladimir@sinot.xyz>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @SinotQ, thank you for the PR!
Please, see a few comments/questions.
Disclaimer: I'm not very familiar with Zabbix, so there are mostly questions about logic in parser which might be specific to Zabbix.
Also, it would be great if you could update documentation to include an instruction on how to use this integration with Zabbix. This is not mandatory, but will be much appreciated.
See this part of documentation for an example - https://docs.victoriametrics.com/single-server-victoriametrics/#how-to-send-data-from-newrelic-agent
tag = r.addTag() | ||
tag.Key = append(tag.Key[:0], k...) | ||
if len(v) == 0 { | ||
tag.Value = append(tag.Value[:0], EMPTYVALUE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you share a use-case when empty labels must be kept?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zabbix allows tags without values. Various filtering rules and conditions in Zabbix also support tags without values. Perhaps someone might use this feature and want to see similar tags as labels in VicotriaMetrics.
I missed something when implementing Zabbix Connector support. Zabbix supports the same tag names with different values for the same element. For example:
service
service: mysql
service: critical
How could this be implemented in VicotriaMetrics? (service: empty,mysql,critical
)
https://www.zabbix.com/documentation/current/en/manual/config/tagging
https://www.zabbix.com/documentation/current/en/manual/config/notifications/action/conditions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For such tags I would suggest creating separate labels:
tag_service_mysql: "present"
tag_service_critical: "present"
# or
# this is similar to how k8s discovery handles such cases
tag_present_service_mysql: "true"
tag_present_service_critical: "true"
Co-authored-by: Zakhar Bessarab <me@zekker-dev.tk>
Co-authored-by: Zakhar Bessarab <me@zekker-dev.tk>
Signed-off-by: Sinotov Vladimir <vladimir@sinot.xyz>
…ector' into feature/zabbix-connector
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6087 +/- ##
==========================================
- Coverage 60.37% 58.20% -2.18%
==========================================
Files 411 612 +201
Lines 76609 83144 +6535
==========================================
+ Hits 46253 48393 +2140
- Misses 27794 31530 +3736
- Partials 2562 3221 +659 ☔ View full report in Codecov by Sentry. |
Description
Support receiving data from the Zabbix connector. (vmagent)
Added
/zabbixconnector/api/v1/history
-zabbixconnector.maxLineLen
(similar to the-import.maxLineLen
flag)-zabbixconnector.addGroups
(Enable adding Zabbix host groups to labels (group_name="1"))-zabbixconnector.addEmptyTags
(Enable adding Zabbix tags without values to labels (tag_name="1"))Note
__name__
label.host
label.hostname
label.Otherwise, I tried to adhere to the functionality of
/api/v1/import
Useful links: