centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 274 forks source link

[apps::wallix::bastion::snmp::plugin] System check returns "unreachable" instead of OK #4400

Closed dids50x closed 1 year ago

dids50x commented 1 year ago
Bug report summary

When trying to use the System check from the Wallix bastion plugin, I get the following error:

# /usr/lib/centreon/plugins/centreon_wallix_bastion_snmp.pl --plugin=apps::wallix::bastion::snmp::plugin --mode=system --hostname='<hostname>' --snmp-version='3' --snmp-community='<snmp-community>' --snmp-username='wabsnmp' --authpassphrase='<authpassphrase>' --authprotocol=<authprotocol> --privpassphrase='<privpassphrase>' --privprotocol=<privprotocol> --warning-sessions-total='' --critical-sessions-total='' --warning-sessions-primary='' --critical-sessions-primary='' --warning-sessions-secondary='' --critical-sessions-secondary='' --warning-sessions-ghost='' --critical-sessions-ghost='' --warning-requests-pending='' --critical-requests-pending='' --warning-services-status='' --critical-services-status='%{status} eq "unreachable"' --verbose
CRITICAL: services status: unreachable | 'sessions.total.count'=19;;;0; 'sessions.primary.count'=10;;;0; 'sessions.secondary.count'=9;;;0; 'sessions.ghost.count'=0;;;0; 'requests.pending.count'=0;;;0;
checking system
    services status: unreachable
    sessions total: 19 primary: 10 secondary: 9 ghost: 0
    requests pending: 0
#

The issue happens for all of our Wallix Admin Bastions that are in version 10. The check works well for one of our Wallix Admin Bastions that still is in version 9.

Could you provide help or fix the check for the version 10 of Wallix Admin Bastion?

Thank you.

Regards,

OS / Environment
/etc/os-release:NAME="Red Hat Enterprise Linux Server"
/etc/os-release:VERSION="7.9 (Maipo)"
/etc/os-release:ID="rhel"
/etc/os-release:ID_LIKE="fedora"
/etc/os-release:VARIANT="Server"
/etc/os-release:VARIANT_ID="server"
/etc/os-release:VERSION_ID="7.9"
/etc/os-release:PRETTY_NAME="OpenShift Enterprise"
/etc/os-release:ANSI_COLOR="0;31"
/etc/os-release:CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
/etc/os-release:HOME_URL="https://www.redhat.com/"
/etc/os-release:BUG_REPORT_URL="https://bugzilla.redhat.com/"
/etc/os-release:
/etc/os-release:REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
/etc/os-release:REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
/etc/os-release:REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
/etc/os-release:REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
/etc/redhat-release:Red Hat Enterprise Linux Server release 7.9 (Maipo)
/etc/system-release:Red Hat Enterprise Linux Server release 7.9 (Maipo)
Centreon version

On central server :

centreon-release-22.10-1.el7.centos.noarch
centreon-22.10.7-1.el7.noarch
centreon-pack-applications-wallix-bastion-snmp-3.0.0-1.el7.centos.noarch

On remote server :

centreon-release-22.10-1.el7.centos.noarch
centreon-22.10.7-1.el7.noarch
centreon-plugin-Applications-Wallix-Bastion-Snmp-20211215-090334.el7.centos.noarch
Component Name
apps::wallix::bastion::snmp::plugin
Steps To Reproduce

See Bug report summary

Expected behavior
# /usr/lib/centreon/plugins/centreon_wallix_bastion_snmp.pl --plugin=apps::wallix::bastion::snmp::plugin --mode=system --hostname='<hostname>' --snmp-version='3' --snmp-community='<snmp-community>' --snmp-username='wabsnmp' --authpassphrase='<authpassphrase>' --authprotocol=<authprotocol> --privpassphrase='<privpassphrase>' --privprotocol=<privprotocol> --warning-sessions-total='' --critical-sessions-total='' --warning-sessions-primary='' --critical-sessions-primary='' --warning-sessions-secondary='' --critical-sessions-secondary='' --warning-sessions-ghost='' --critical-sessions-ghost='' --warning-requests-pending='' --critical-requests-pending='' --warning-services-status='' --critical-services-status='%{status} eq "unreachable"' --verbose
OK: system is ok | 'sessions.total.count'=19;;;0; 'sessions.primary.count'=10;;;0; 'sessions.secondary.count'=9;;;0; 'sessions.ghost.count'=0;;;0; 'requests.pending.count'=0;;;0;
checking system
    services status: running
    sessions total: 19 primary: 10 secondary: 9 ghost: 0
    requests pending: 0
#
dids50x commented 1 year ago

I found why Centreon says unreachable instead of OK.
The value at OID .1.3.6.1.4.1.30373.1.2.3.0 is 2 instead of 1 on all of our WAB in v10.0.3.
So the centreon plugin works as expected.