PB after upgrade 20.04 to 22.04 all services UPTIME are an errors Unknown option: warning at /usr/lib/centreon/plugins/centreon_linux_snmp.pl line 141.
After upgrade 20.04 to 22.04 all services UPTIME are an errors “Unknown option: warning at /usr/lib/centreon/plugins/centreon_linux_snmp.pl line 141.” whatever linux or Windows
If Linux uptime serviceError in /var/log/centreon-engine/centengine.log
/2022-09-16T09:33:00.717+02:00] 2events] einfo] i5749] INITIAL SERVICE STATE: **********;Uptime;UNKNOWN;SOFT;1;Unknown option: warning at /usr/lib/centreon/plugins/centreon_linux_snmp.pl line 141.
or if windows uptime service :
Unknown option: warning at /usr/lib/centreon/plugins/centreon_windows_snmp.pl line 141.
I have update the plugin pack “Plugin Packs Manager”
Page 1 / 1
Hi,
What’s your OS and distribution? If the Pack are up to date and plugin as well, you should not get this error.
Please mention also Pack and Plugins version it will help.
Thanks
I’m on Linux Centos 7,
Centreon Plugin Packs Manager
22.04.0
stable
Thanks
It’s strange because it's only for the service UPTIME.
You could see on this commit --warning and --critical was replaced by --warning-uptime and --critical-uptime
I think after the upgrade we updated the Centreon Plugins and Plugin Pack and you lost the macro.
You used the official Host template and service templates (Aka Plugin Pack Linux SNMP) ? Or a custom made by you ?
Regards,
Ok i understand.
If i test whith the new argument it’s now ok :
sudo /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=uptime --hostname=*********** --snmp-version='2c' --snmp-community='******' --warning-uptime=''--critical-uptime='' OK: System uptime is: 133d 2h 43m 57s | 'uptime'=11501037s;;;0;
It’s a custom template
But I can't apply this argument change in the associated service template.
If i change by warning-uptime and critical-uptime, it’s not OK. And the personnalised macro is in white.
How do I make this control "Inherited from command"?
Hello,
Could you change the template to an another, just to produce a change on the service template (more specifically the macros list), and change an another time to the old value (OS-Linux-Uptime-SNMP) you could see the right color who indicate the inheritence of the command who is updated ? The old macro WARNING and CRITICAL could be in white whitout no heritence.
Maybe the update process works better when you inherit the -custom Host template on your template. Not directly the -custom on the service template
The Idea is to inherit the Host Template from the -custom template. Like that you could benefit the change made by Centreon without loosing a functionnality. And it's Centreon who manage the update process like that. If you set a value like on your service template WARNING, CRITICAL you do switch value from the old macro to the new macro.
Other thing, you do use the centreon-engine linux account to execute plugins, because you could have right problem when centengine schedule and execute itself the plugins with the centreon-engine linux account.
Maybe a Centreonian could write a post to use the plugin pack and benefits the update process without too inconvenients.
that's right
Maybe the update process works better when you inherit the -custom Host template on your template. Not directly the -custom on the service template