[MXS-1531] check_maxscale_resources.pl does not report listeners Created: 2017-11-20  Updated: 2020-08-25  Resolved: 2017-12-27

Status: Closed
Project: MariaDB MaxScale
Component/s: Plugin
Affects Version/s: None
Fix Version/s: 2.1.12

Type: Bug Priority: Minor
Reporter: Immo Goltz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 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
}}



 Comments   
Comment by markus makela [ 2017-11-20 ]

If you have a fix for it, feel free to submit a pull request on GitHub to the 2.1 branch. This way you'll get the acknowledgement for fixing the bug and the appreciation of the Maxscale community.

Comment by markus makela [ 2017-12-27 ]

Pull request merged.

Generated at Thu Feb 08 04:07:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.