Skip to main content
Encore un cassage de la compatibilité dans un plugin Centreon 🙁
 
Version 20.04 - centreon-plugin-Applications-Monitoring-Centreon-Central-20210915-070550.el7.centos.noarch (OK) :
 
$ /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=10.221.11.62 --mode=broker-stats --broker-stats-file='/var/lib/centreon-engine/*-module-stats.json' --filter-name='' --warning-speed-events='' --critical-speed-events='' --warning-queued-events='' --critical-queued-events='' --warning-unacknowledged-events='' --critical-unacknowledged-events='' --warning-status='' --critical-status='%{type} eq "output" and %{queue_file_enabled} =~ /true|yes/i' --verbose --remote --ssh-option='-l=centreon'
OK: Endpoint output 'poller2-module-master-output' state : connected estatus : reading event from multiplexing engine] gqueue file enabled : false], Speed Events: 27.9333333333333/s, Queued Events: 238, Unacknowledged Events: 0 | 'speed_events'=27.9333333333333events/s;;;0; 'queued_events'=238events;;;0; 'unacknowledged_events'=0events;;;0;
Endpoint output 'poller2-module-master-output' state : connected estatus : reading event from multiplexing engine] gqueue file enabled : false], Speed Events: 27.9333333333333/s, Queued Events: 238, Unacknowledged Events: 0
 
Version 22.10 - centreon-plugin-Applications-Monitoring-Centreon-Central-20221215-102705.el8.noarch (NOK) :
 
$ /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=10.221.11.62 --mode=broker-stats --broker-stats-file='/var/lib/centreon-engine/*-module-stats.json' --filter-name='' --warning-speed-events='' --critical-speed-events='' --warning-queued-events='' --critical-queued-events='' --warning-unacknowledged-events='' --critical-unacknowledged-events='' --warning-status='' --critical-status='%{type} eq "output" and %{queue_file_enabled} =~ /true|yes/i' --verbose --remote --ssh-option='-l=centreon'
Unknown option: remote at /usr/lib/centreon/plugins//centreon_centreon_central.pl line 2230.
 
$ /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=10.221.11.62 --mode=broker-stats --broker-stats-file='/var/lib/centreon-engine/*-module-stats.json' --filter-name='' --warning-speed-events='' --critical-speed-events='' --warning-queued-events='' --critical-queued-events='' --warning-unacknowledged-events='' --critical-unacknowledged-events='' --warning-status='' --critical-status='%{type} eq "output" and %{queue_file_enabled} =~ /true|yes/i' --verbose --ssh-option='-l=centreon'
Unknown option: ssh-option at /usr/lib/centreon/plugins//centreon_centreon_central.pl line 2230.
 
À priori, il faut retirer les options --remote et --ssh-option, et remplacer par l’option --ssh-username=centreon :
 
$ /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=10.221.11.62 --mode=broker-stats --broker-stats-file='/var/lib/centreon-engine/*-module-stats.json' --filter-name='' --warning-speed-events='' --critical-speed-events='' --warning-queued-events='' --critical-queued-events='' --warning-unacknowledged-events='' --critical-unacknowledged-events='' --warning-status='' --critical-status='%{type} eq "output" and %{queue_file_enabled} =~ /true|yes/i' --verbose --ssh-username=centreon
OK: Endpoint output 'poller2-module-master-output' state : connected estatus : reading event from multiplexing engine] equeue file enabled : no], Speed Events: 40.2333333333333/s, Queued Events: 816, Unacknowledged Events: 0 | 'speed_events'=40.2333333333333events/s;;;0; 'queued_events'=816events;;;0; 'unacknowledged_events'=0events;;;0;
Endpoint output 'poller2-module-master-output' state : connected estatus : reading event from multiplexing engine] equeue file enabled : no], Speed Events: 40.2333333333333/s, Queued Events: 816, Unacknowledged Events: 0
 
Je trouve que lutilisation d’options nommées --ssh-* est en effet plus clair (que --ssh-option=…) mais pourquoi ne laissez-vous pas les anciennes options afin que le plugin fonctionne sans modification suite à une migration 20.04 → 22.10 ? C’est incompréhensible, ça ajoute une charge de travail non négligeable lors d’une migration : en plus de positionner la clé publique du nouveau poller pour l’authentification SSH il faut aussi modifier la configuration de tous les checks de ce type.

Ayant trouvé une solution je n’ouvre pas de ticket auprès du support, mais serait-il possible d’éviter ce genre de désagrément à l’avenir ? C’est de la qualité globale des plugins Centreon dont il s’agit. Là encore on a l’impression que Centreon privilégie les nouveaux utilisateurs/clients au détriment des utilisateurs/clients actuels. C’est très décevant.

Que pense la communauté de ces pratiques ?

Hi @Stéphane, Please ask your problem in English. This will help all other non french speaking users to take part in the discussion and maybe even give you some answers. Thank you for your understanding : )


Hi @Fabrix, I‘ll do that for my next post. But What do you think is the proportion of french/English speakers here and in Centreon users in general? Do you have some statistics about your customers?


Hi @Stéphane I agree with your first post, in our organization, we are strict in terms of updating our platforms and it is often a problem to maintain our Centreon platform following updates...


Once again…

Unknown option: namespace at /usr/lib/centreon/plugins//centreon_kubernetes_api.pl line 141.

This is very annoying (to be polite).

centreon-plugin-Cloud-Kubernetes-Api-20230117-074217.el8.noarch

And the pack still refers to this --namespace option ! 

 


Plus, I search in plugin’s help without finding what the name of the new option.

​​​​​​​WTF?


It’s look like this error is due to the data migration process from 20.04. I don’t know exactly how it lead to this error but it looks like there has never been any --namespace option in this plugin.


In the Monitoring Details > Service page, when clicking on the service I have a “Error: Service not found”, but I can click on “configuration” and it leads me to the configuration of the service.

On the Resource Status page I don’t have the same issue…

This is another problem, not related to this discussion, that was to provide some information.

As a conclusion, there is no problem with the centreon_kubernetes_api.pl script, but from a strict end-user point of view : migrating from 20.04 to 22.10 breaks a lot of things :(


I don’t know why I have a “--namespace='$_HOSTKUBERNETESAPINAMESPACE$'”  in the “Cloud-Kubernetes-Api-Node-Status” command in 22.10. It’s not the case in 20.04. It’s a locked command so I know I’ve not modified it. So finally I don’t know if it’s an error in the pack or an error in the migration process.

I’ll unlock and fix the command but I really wonder what’s wrong. I can’t reinstall the pack without deleting some services (an option to force it would be welcome…) but I’ll look in the RPM to check.


After verification I can tell that’s the 23.02 version of the plugin which introduces the --namespace option:

(from the centreon-pack-cloud-kubernetes-api-23.02.2-1.el8.noarch.rpm file)

        {
            "line": "\\\"$CENTREONPLUGINS$\\\\/centreon_kubernetes_api.pl --plugin=cloud::kubernetes::plugin --mode=node-status --custommode=\\'$_HOSTKUBERNETESAPICUSTOMMODE$\\' --hostname=$_HOSTKUBERNETESAPIHOSTNAME$ --port=\\'$_HOSTKUBERNETESAPIPORT$\\' --proto=\\'$_HOSTKUBERNETESAPIPROTO$\\' --token=\\'$_HOSTKUBERNETESAPITOKEN$\\' --config-file=\\'$_HOSTKUBECTLCONFIGFILE$\\' --proxyurl=\\'$_HOSTPROXYURL$\\' --namespace=\\'$_HOSTKUBERNETESAPINAMESPACE$\\' --timeout=\\'$_HOSTTIMEOUT$\\' $_HOSTEXTRAOPTIONS$ --filter-name=\\'$_SERVICEFILTERNODENAME$\\' --warning-status=\\'$_SERVICEWARNINGSTATUS$\\' --critical-status=\\'$_SERVICECRITICALSTATUS$\\' $_SERVICEEXTRAOPTIONS$\\\"",
            "name": "Cloud-Kubernetes-Api-Node-Status",
            "type": "2"
        }

But as stated before, there isn’t such an option:

$  /usr/lib/centreon/plugins//centreon_kubernetes_api.pl --plugin=cloud::kubernetes::plugin --mode=node-status --custommode=api --namespace='foo'
Unknown option: namespace at /usr/lib/centreon/plugins//centreon_kubernetes_api.pl line 141.


Another example, with the plugin for MSSQL databases.

In “dead-locks” mode. The --warning and --critical options have been renamed --warning-deadlocks and --critical-deadlocks.

In this case, for this mode, there isn’t even multiple kind of thresholds!

This is easy to fix but seriously, what’s the point to break things like this?


Another remaks, stille about hte MSSQL plugin, this time about homogeneity in the naming:

For the “dead-locks” mode, threshold options are named --critical-deadlocks

But for the “connected-users” mode, threshold options area named --critical-connected-user

So, in the first case, threshold options are name after the mode name, with the dash removed

But in the second case, threshold options are also named after the mode name, but with the dash not removed ! Plus, the final s is missing (ie: mode name and threshold options mismatch on this final s.

This is highly disappointing.


Reply