Skip to content
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

python.d: merge user/stock plugin configuration files #11217

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

ilyam8
Copy link
Member

@ilyam8 ilyam8 commented Jun 1, 2021

Summary

This PR changes loading stock/user python.d.plugin configuration files logic (python.d.conf).

❗ yes, the changes concern only plugin configuration loading, not its modules (e.g.: apache.conf, mysql.conf)

Current:

  • load user config if it exists.
  • if not load stock config.

After this PR:

  • load user config if it exists.
  • load stock config file.
  • merge user into stock.

In addition, python.d.plugin no longer fails to start if there are any problems on loading configuration files (e.g.: invalid YAML syntax), it starts and uses internal defaults.


Motivation: the feature/change was requested on our forum. See the following topics:

Component Name

collectors/python.d.plugin

Test Plan

Manual tests 😐

  • check that user config get merged into stock
  • check the plugin doesn't stop if there are any errors during config loading (invalid YAML syntax)
Additional Information

@ilyam8 ilyam8 marked this pull request as draft June 1, 2021 20:50
@github-actions github-actions bot added area/collectors Everything related to data collection area/external/python labels Jun 1, 2021
@netdata-community-bot
Copy link

This pull request has been mentioned on Netdata Community. There might be relevant details there:

https://community.netdata.cloud/t/local-support-for-on-off-plugins/1003/11

@netdata-community-bot
Copy link

This pull request has been mentioned on Netdata Community. There might be relevant details there:

https://community.netdata.cloud/t/override-config-files/1342/14

@ilyam8 ilyam8 marked this pull request as ready for review June 1, 2021 21:11
@ilyam8 ilyam8 merged commit becf726 into netdata:master Jun 8, 2021
@ilyam8 ilyam8 deleted the pythond_config_merge branch June 8, 2021 09:28
k0ste added a commit to k0ste/ansible-role-netdata that referenced this pull request Sep 13, 2022
@k0ste
Copy link
Contributor

k0ste commented Sep 13, 2022

Sorry for late reply, just confirms that feature works as expected 🤝
Support for '.local' pythond.d.conf also added in netdata ansible-role here: k0ste/ansible-role-netdata@ed04600
Works fine with CentOS8-Stream EPEL packages 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants