Why am I getting different behavior running the same check using the ccm console versus CLI?
Console
[]$ /usr/local/nagios/libexec/check_mysql_query -u readonly -p'xxx' -d performance_schema -q " select variable_value from global_status where Variable_name='Max_used_connections' " -c :1000
QUERY CRITICAL: Error with query - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'Max_used_connections\'' at line 1
CLI
[]$ /usr/local/nagios/libexec/check_mysql_query -u readonly -p'xxx' -d performance_schema -q " select variable_value from global_status where Variable_name='Max_used_connections' " -c :1000
QUERY OK: ' select variable_value from global_status where Variable_name='Max_used_connections' ' returned 157.000000 | result=157.000000;;1000.000000;
Inconsistent plugin behavior.
-
matson-itops
- Posts: 133
- Joined: Wed Nov 18, 2015 11:19 pm
Inconsistent plugin behavior.
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Inconsistent plugin behavior.
Hi @matson-itops,
That's a known issue right now, due to security hardening the Run Check Command button used from the Core Config Manager doesn't always pass the arguments correctly, especially if there are nested quotes or special characters. Since it's returning proper from the CLI the service check should be once the configuration has been applied.
If it's failing, I would recommend cutting and pasting the command from the GUI and running a check from the CLI.
Reference
Nagios XI - How To Test Check Commands From The Command-line
Hope that helps clear that up and let us know if you have any questions or comments.
Benjamin
That's a known issue right now, due to security hardening the Run Check Command button used from the Core Config Manager doesn't always pass the arguments correctly, especially if there are nested quotes or special characters. Since it's returning proper from the CLI the service check should be once the configuration has been applied.
If it's failing, I would recommend cutting and pasting the command from the GUI and running a check from the CLI.
Reference
Nagios XI - How To Test Check Commands From The Command-line
Hope that helps clear that up and let us know if you have any questions or comments.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
matson-itops
- Posts: 133
- Joined: Wed Nov 18, 2015 11:19 pm
Re: Inconsistent plugin behavior.
I literally did cut and paste from GUI to cli
And also tested from CLI to GUI and also
same issue. GUI fails. CLI works.
And also tested from CLI to GUI and also
same issue. GUI fails. CLI works.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Inconsistent plugin behavior.
Hi,
Once you apply the configuration, it should be working correctly. It's a known issue with testing the check command vis the GUI.
Benjamin
Once you apply the configuration, it should be working correctly. It's a known issue with testing the check command vis the GUI.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!