8000 apcups: allow to use plugin without explicit configuration by rpv-tomsk · Pull Request #2351 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

apcups: allow to use plugin without explicit configuration #2351

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

Merged
merged 1 commit into from
Jul 8, 2017

Conversation

rpv-tomsk
Copy link
Contributor

Previously the apcups plugin could not be used without defining
an explicit configuration.

While the apcups plugin did provide a localhost fallback, it
did not however provide a 3551 port fallback in practice,
eventhough a constant for that purpose was already present.

Thanks to Pascal de Bruijn for report.

Supersedes: #2347

Previously the apcups plugin could not be used without defining
an explicit configuration.

While the apcups plugin did provide a localhost fallback, it
did not however provide a 3551 port fallback in practice,
eventhough a constant for that purpose was already present.

Thanks to Pascal de Bruijn for report.

Closes: collectd#2347
void module_register(void) {
plugin_register_complex_config("apcups", apcups_config);
plugin_register_init("apcups", apcups_init);
Copy link
Contributor

Choose a reason for hiding this comment

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

I might miss something, but why don't you do this in apcups_config?

Copy link
Contributor Author
@rpv-tomsk rpv-tomsk Jul 8, 2017

Choose a reason for hiding this comment

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

The goal is to allow plugin use without defining an explicit configuration.
Then there in config file will be LoadPlugin apcups only, without <Plugin apcups> block.
The apcups_config() will not be called at all in that case.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks for the explanation.

@rubenk rubenk merged commit e0ec7ff into collectd:master Jul 8, 2017
@rpv-tomsk rpv-tomsk deleted the apcups-defaults branch July 16, 2017 12:08
@octo octo added this to the 5.8 milestone Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0