Ensure compatibility between versions of plugins

  • 29 July 2022
  • 6 replies
  • 93 views

Badge +4

Hi,

I just imported the data I have on our current 20.04 platform (configuration only) to a brand new 22.04 (22.04.1, updated this morning !). Things were right but…

I haven’t checked all the packs/plugins but the first one I looked to has a compatibility issue :
 


(Unknown option: warning at /usr/lib/centreon/plugins//centreon_protocol_tcp.pl line 597)

I can’t understand how removing an option is a good idea… 😕

I know it has been decided to have options such as --warning-foo or --critical-bar, which is nice, but why not keep the simple --warning and --critical options, and makes them match one of the real option? I looked to the version of the plugin I have on my 20.04 platform (centreon-plugin-Applications-Protocol-Tcp-20210622-151444), un-suffixed --warning et --critical don’t appear in the help of the plugin, so I guess it has been deprecated before that time. The thing is, it’s still working in this version (like in centreon-plugin-Applications-Protocol-Tcp-20210915-070550), and I still have commands/services which use it.

What was the cost of keeping a “--warning” option which matches “--warning-time” and a “--critical” option that maches “--critical-time”?

It seems it’s like breaking things on purpose at the level!

What do you folks think? Am I the only one pissed by such questionable changes?

Have a nice (monitored) day.


6 replies

Userlevel 3
Badge +9

Hi @Stéphane,

 

I can’t copy paste code for some reasons but I tested it and these options stil work with the lastet version (centreon-plugin-Applications-Protocol-Tcp-20220727-130028).

 

Which OS are you using, and what is your TCP plugin version?

 

Regards.​

Badge +4

Hi,

The 20.04 is on CentOS 7, the 22.10 on RHEL 8.

The versions of the TCP plugin are the ones I already mentioned.

Regards.

Userlevel 3
Badge +9

Hi @Stéphane,

 

Sorry for the late answer,

Try updating your plugin. It should work with the latest version.

 

Regards.

Badge +4

Thank you @itoussies 

The check is now OK because the template and command have been modified, but no: the --warning option still isn’t supported no more.
 

$ /usr/lib/centreon/plugins//centreon_protocol_tcp.pl --plugin=apps::protocols::tcp::plugin --mode=response-time  --hostname='10.221.106.33' --port='22' --packets='5' --timeout='20' --warning-rta='' --critical-rta='' --warning-rtmax='' --critical-rtmax='' --warning-rtmin='' --critical-rtmin='' --warning-pl='' --critical-pl=''  --warning=''
Unknown option: warning at /usr/lib/centreon/plugins//centreon_protocol_tcp.pl line 597.


Adapting Centreon’s service templates is the minimum you can do. But I’d appreciate plugin’s options to not be dropped without prior notice, as was --warning in this case.

Making the Centreon plugins to work only with Centreon’s templating is locking up users, which is bad imho…

I hope the Centreon’s developpers will be more careful regarding backward compatibility in the future.

Have a nice day
 

Userlevel 3
Badge +9

Oooh I should have asked about the mode you were using. I was testing on another mode, connection-status. This one still works with --warning and --critical. 

 

If there is any breaking change on a template and its related command, you will be informed by the Release Notes, the blog or the newsletter. 

 

Moreover, Centreon plugins are not locked with Centreon’s templates. You can use them with any template you created or directly on a host or on a service.

 

Regards.

Badge +4


Hi,

« Centreon plugins are not locked with Centreon’s templates. You can use them with any template you created or directly on a host or on a service. »

Except then you have defined a command and an option becomes unsupported suddenly. That was the point…

I’d have a lot to say about the Centreon plugins but I’m too busy on the 20.04 → 22.04 migration to do so now.

Regards.

Reply