Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
check_maxscale_resources.pl does not report listeners
{{#check_maxscale_resources.pl -r listeners
CRITICAL: 0 listeners found}}
but of course there are some
{{#maxadmin list listeners
Listeners.
-----------------------------------------------------------------------------+-------
Name | Service Name | Protocol Module | Address | Port | State
-----------------------------------------------------------------------------+-------
Read Write Split Listener | Read Write Split Router | MySQLClient | 127.0.0.1 | 13306 | Running
Read Connection Listener | Read Connection Router | MySQLClient | 127.0.0.1 | 13307 | Running
Single Node Listener | Single Node Router | MySQLClient | 127.0.0.1 | 13308 | Running
MaxAdmin Listener | MaxAdmin Service | maxscaled | default | 0 | Running
MaxInfo JSON Listener | MaxInfo | HTTPD | * | 4007 | Running
MaxInfo Listener | MaxInfo | MySQLClient | * | 9003 | Running
-----------------------------------------------------------------------------+-------
}}
I had a look into the pl and found that there is an easy fix:
{{--- check_maxscale_resources.pl.org 2017-11-20 09:58:58.976578066 +0100
+++ check_maxscale_resources.pl 2017-11-20 11:12:39.038933471 +0100
@@ -118,7 +114,7 @@
my $resource_match = ucfirst("$resource_type Name");
if ($resource_type eq "listener")
{ - $resource_match = "Service Name"; + $resource_match = "Name"; }if ($resource_type eq "filter") {
$resource_match = "Filter";
}}
With this it reports
{{OK: 6 listeners found | listeners1=Read Write Split Listener;Read Write Split Router;MySQLClient;127.0.0.1;13306;Running listeners2=Read Connection Listener;Read Connection Router;MySQLClient;127.0.0.1;13307;Running listeners3=Single Node Listener;Single Node Router;MySQLClient;127.0.0.1;13308;Running listeners4=MaxAdmin Listener;MaxAdmin Service;maxscaled;default;0;Running listeners5=MaxInfo JSON Listener;MaxInfo;HTTPD;;4007;Running listeners6=MaxInfo Listener;MaxInfo;MySQLClient;;9003;Running
}}