Open taejoonmoon opened 6 years ago
Hey sorry for the late response, let me review the code real quick to verify but that looks fairly reasonable to me.
So that works but I think that it would be better to fix the defaults to not be a string in the first place. We see in multiple locations we know we want to convert it to a float but then we set the default to a string which makes no sense. My conclusion is that the proc block does not run on the default value.
Your fix is totally valid but I think we should remove the quotes from the default and confirm that it works with default and non default values. I look forward to reviewing and getting this fixed.
That's right, putting real number instead of string on default value did the trick
I'm not familiar with ruby.
When I run check-mysql-disk.rb, I found this error. "CheckMysqlDisk CRITICAL: comparison of Float with String failed"
If I add "to_f" to disk_size, critical_usage, warning_usage, it works well. Is this the right way? If then, I will make a pull request.