Improve the mk_mysql agent plugin script - allow alias per line#585
Improve the mk_mysql agent plugin script - allow alias per line#585flybyray wants to merge 2 commits intoCheckmk:masterfrom
Conversation
example cfg section for check_mk with alias= entries. aliases should work too when alias= is not present socket= is only moved to its corresponding alias= improved the mk_mysql logic should allow what was previously configured too
|
Hi flybyray, thank you for contributing to Checkmk. It's currently possible to specify a socket, even though the alias is missing. Is there another problem your PR is tackling? |
The PR just would allow both configurations. The current configuration format is just awefull for reading
When bakery tries to make configuration human unreadable. I will fear the bakery until it dies. ;-) |
example cfg section for check_mk with alias= entries. aliases should work too when alias= is not present socket= is only moved to its corresponding alias=
improved the mk_mysql logic
should allow what was previously configured too
Thank you for your interest in contributing to Checkmk!
Consider looking into Readme regarding process details.
General information
Update agent plugin
mk_mysqlto allowalias=per line instead of onealiases=with each alias as an item of a comma seperated list.This makes it easier to provision
"$MK_CONFDIR"/mysql{.local,}.cfgwith ansible module block in file.Bug reports
no bug report.
the previous solution was not useful for a lot of galera cluster instances.
Proposed changes
The new code should work with old config.
But now also allows to write a check_mk cfg file in the following stile.
If it's not obvious from the above: In what way does your patch change the current behavior?
If there is no
alias=entry but if there is thealiases=Alias1,Alias2the code should still work.Consider writing a unit test that would have failed without your fix.
There is no fix. The previous behaviour should work too.
Is this a new problem? What made you submit this PR (new firmware, new device, changed device behavior)?
It allows/provides a cleaner structure for cfg files with a lot of mysql instances.
Actually it fixes even some issues with parsing sockets from running mysqld processes where the
--socket=path/to/sockis not at the end.