-
Notifications
You must be signed in to change notification settings - Fork 58
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
[zabbix-community/zabbix] Agent 2 Plugin Configuration of Plugin Options #22
Comments
Hello @MaxDiOrio ! Thanks for your question. According to these documentation links... I understood that the Therefore, you can use the following helm values to add custom settings on the agent and mount a file in the pod. Creating the configmap to mount can be accomplished using the Kubernetes yaml manifest or the kubectl command. # **Zabbix Agent** configurations
zabbixagent:
# -- Enables use of **Zabbix Agent**
enabled: true
# -- Extra environment variables. A list of additional environment variables. See example: https://github.com/zabbix-community/helm-zabbix/blob/master/charts/zabbix/docs/example/kind/values.yaml
extraEnv: []
# -- additional volumeMounts to the zabbix agent container
extraVolumeMounts: [] Your need is an advanced configuration and we understand that you must have knowledge to execute. References:Zabbix-Agent2
Postgresql
Extraenv Extraparameters |
I think the solution should be easy, without having to override the entire zabbix-agent2.conf, as since Zabbix 6.0 it is possible to phase out Plugins configuration options to Included config file snippets, as with all other configuration settings. This was not possible for The entrypoint of the zabbix-agent2 image does even have a directory prepared for that: So, a working solution could look as follows (untested): kind: ConfigMap
apiVersion: v1
metadata:
name: postgresql-agent2-config
data:
postgresql.conf: |
Plugins.Postgres.CustomQueriesPath=/etc/zabbix/postgres/sql You can then define an extraVolume from within the "zabbixserver" or "zabbixproxy" section of the zabbixserver:
extraVolumes:
- name: agent-postgres-config
configMap:
name: postgresql-agent2-config This will be changed if #20 gets implemented as commented by me, then you would have to put the above into the And then you can mount this volume inside the Zabbix Agent2 container with the following in your zabbixagent:
extraVolumeMounts:
- name: agent-postgres-config
mountPath: /etc/zabbix/zabbix_agent2.d/plugins.d Together with #20 we might set a templating in zabbixagent:
extraAgentPluginConfigs:
- fileName: postgres.conf
content: |
Plugins.Postgres.CustomQueriesPath=/some/path But this is not implemented yet. Can we close this issue then? |
Closing this issue because passed a one year without feedback. You can reopen if necessary. |
There doesn't seem to be a way to modify the plugin configuration options in the helm chart. There are no helm values exposed, and no way to mount configmaps into the container.
E.g.: I am attempting to use the Postgres plugin to monitor a database. I want to use a custom query, however there is no default value set for Plugins.Postgres.CustomQueriesPath, and no way to adjust the path when the agent is deployed using the Helm chart that I can see.
The text was updated successfully, but these errors were encountered: