-
Notifications
You must be signed in to change notification settings - Fork 113
Check if the options are not empty if specified by cacti #48
base: master
Are you sure you want to change the base?
Conversation
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.
That should work for username, password, and port. How does the the script behave if --server-id is passed with an empty string? Looks like if it is present it will trigger the heartbeat delay check. It doesn't look like it would break anything, but it is an unneeded query.
The script behaves fine because we actually don't use |
Think that takes care of the matter at hand. Tested and working. |
@deniskin82 @dbmiller validation of the input takes place in @deniskin82 please apply the following patch to your branch and test:
That will produce the following:
|
Wow, if that function were a snake it would have bit me ... @cezmunsta The input method specification in Cacti takes the entire command line and has the placeholders for the option values. It appears that Cacti does a simple replacement for the placeholder, but has changed how it handles unspecified values. In 0.8.x, Cacti would send the unquoted string Use of the patch "as-is" would remove the ability to use the .conf or in-script specification of options common to all monitored instances using the default input method specification. Additionally, the changes to the input method required to use the in-script data would remove the ability to have exceptions to the defaults. This may be desireable to bring the script in line with the Cacti documentation, but it will require changes for all users which have opted to store certain data in the script instead of within Cacti, regardless of Cacti version, as well as require changes to the documentation for the plugin (see the Configuration section on Installing Percona Monitoring Plugins for Cacti. So I guess the larger issue at hand is whether the project should continue to support the documented configuration process, likely by moving the variable assignment decisions for |
What's the status on this, I really, really need to be able to graph MySQL stats for a couple of critical DBs. |
@cezmunsta the only requirement is
That's what I have in data method input in Cacti:
|
Been having the same issue in 1.1.7 with MariaDB.. Looks like it was still trying to pass the empty values rather than skipping them I suspect that if you specifiy these values from within Cacti you'll be fine, but if you do it from config files, you'll need to clear those lines. |
I was also having trouble with Cacti 1.1.28 passing empty parameters to the 1.1.7 ss_get_mysql_stats.php script, using PHP 5.6.32 and MariaDB 10.1.29. The script was checking them in the ss_get_mysql_stats() function with isset(), which returned true even though they were blank. I changed those isset() lines to use !empty() instead and the variables are now being correctly assigned from the configuration values.
|
Is there a reason this has not been introduced yet? I spent several hours trying to figure out why all my cacti MySQL graphs stopped working after updating to 1.1.8 (since we needed MySQL 5.7 support and 1.1.7 and prior do not support 5.7 apparently) and finally found this and the changes in the PR fixed the graphing. We too are using the ss_get_mysql_stats.php.cnf to pass in the mysql credentials. We're using Cacti 1.1.38 from the Debian Stretch backports. |
The empty parameter problem affects a few of the scripts from persona when called from cacti. I created a PR myself but hadn’t seen this one back in August. They have not answered EITHER of these PRs it would seem. |
@netniV Cacti support is likely to be removed from this project very soon. The Percona monitoring offering is now PMM - you can view an online demo |
Can I ask why the support will be removed? There are plenty of users who use both. |
I have now closed my PR since that support appears to have been removed though we have had users raise the issue. Slightly disappointed there was no response to the previous question, but if there is no support, this issue should also be closed. |
No description provided.