Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(err-msg): attempt to fix #4678 #4726

Closed
wants to merge 24 commits into from

Conversation

omercier
Copy link
Contributor

@omercier omercier commented Nov 5, 2023

Description

Same type of personal challenge as #4725 but much more simple.

Tested with the user's data

.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.2.112.58.14.202.173.210 = STRING: AP Sala Tuxca
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.2.112.58.14.202.175.120 = STRING: AP2 Piso 2
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.2.112.58.14.203.129.170 = STRING: AP Sotano
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.2.112.58.14.203.129.172 = STRING: AP Centro Copiado Piso 1
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.2.112.58.14.203.130.124 = STRING: AP Piso 2
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.3.112.58.14.202.173.210 = STRING: 10.167.10.242
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.3.112.58.14.202.175.120 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.3.112.58.14.203.129.170 = STRING: 10.167.10.237
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.3.112.58.14.203.129.172 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.3.112.58.14.203.130.124 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.4.112.58.14.202.173.210 = STRING: CNBNHMV51G
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.4.112.58.14.202.175.120 = STRING: CNBNHMV588
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.4.112.58.14.203.129.170 = STRING: CNBVHMV1Y6
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.4.112.58.14.203.129.172 = STRING: CNBVHMV1Y7
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.4.112.58.14.203.130.124 = STRING: CNBVHMV21L
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.5.112.58.14.202.173.210 = STRING: .1.3.6.1.4.1.14823.1.2.59
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.5.112.58.14.202.175.120 = STRING: .1.3.6.1.4.1.14823.1.2.59
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.5.112.58.14.203.129.170 = STRING: .1.3.6.1.4.1.14823.1.2.59
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.5.112.58.14.203.129.172 = STRING: .1.3.6.1.4.1.14823.1.2.59
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.5.112.58.14.203.130.124 = STRING: .1.3.6.1.4.1.14823.1.2.59
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.6.112.58.14.202.173.210 = 225
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.6.112.58.14.202.175.120 = 225
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.6.112.58.14.203.129.170 = 225
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.6.112.58.14.203.129.172 = 225
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.6.112.58.14.203.130.124 = 225
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.7.112.58.14.202.173.210 = 3
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.7.112.58.14.202.175.120 = 18
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.7.112.58.14.203.129.170 = 4
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.7.112.58.14.203.129.172 = 11
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.7.112.58.14.203.130.124 = 18
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.8.112.58.14.202.173.210 = 311316480
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.8.112.58.14.202.175.120 = 307572736
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.8.112.58.14.203.129.170 = 309555200
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.8.112.58.14.203.129.172 = 305328128
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.8.112.58.14.203.130.124 = 307843072
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.9.112.58.14.202.173.210 = 1570716300
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.9.112.58.14.202.175.120 = 1595908000
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.9.112.58.14.203.129.170 = 1597074100
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.9.112.58.14.203.129.172 = 1596571900
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.9.112.58.14.203.130.124 = 1596534300
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.10.112.58.14.202.173.210 = 527028224
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.10.112.58.14.202.175.120 = 527028224
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.10.112.58.14.203.129.170 = 527028224
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.10.112.58.14.203.129.172 = 527028224
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.10.112.58.14.203.130.124 = 527028224
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.11.112.58.14.202.173.210 = 1
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.11.112.58.14.202.175.120 = 1
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.11.112.58.14.203.129.170 = 1
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.11.112.58.14.203.129.172 = 1
.1.3.6.1.4.1.14823.2.3.3.1.2.1.1.11.112.58.14.203.130.124 = 1
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.0.145.158.234.114.37 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.4.229.152.224.53.169 = STRING: 10.167.10.242
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.16.81.7.176.5.174 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.30.63.236.117.207.223 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.40.36.255.214.15.147 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.46.15.242.8.164.80 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.50.22.145.81.97.83 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.52.46.183.70.11.124 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.52.46.183.221.30.84 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.60.33.156.223.106.221 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.70.155.69.122.199.46 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.78.8.226.31.141.40 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.78.143.165.222.161.99 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.82.172.165.68.121.186 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.84.141.90.181.16.123 = STRING: 10.167.10.242
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.86.66.20.39.209.29 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.96.165.226.9.33.133 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.96.227.43.121.175.174 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.96.227.43.124.21.200 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.102.89.253.243.33.77 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.116.151.121.3.223.205 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.128.56.251.132.10.48 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.130.90.58.66.254.161 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.130.149.171.102.123.164 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.134.68.105.106.252.193 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.140.122.61.222.227.173 = STRING: 10.167.10.237
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.140.141.40.46.226.198 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.140.141.40.67.165.48 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.140.200.75.74.178.97 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.146.41.79.160.128.182 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.152.141.70.158.56.11 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.152.141.70.158.58.249 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.164.48.122.232.152.104 = STRING: 10.167.10.242
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.164.52.217.15.238.32 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.166.202.58.48.78.95 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.168.100.241.110.171.34 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.202.181.74.221.105.239 = STRING: 10.167.10.242
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.204.217.172.175.157.118 = STRING: 10.167.10.237
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.210.110.215.242.4.25 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.214.9.12.120.46.26 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.218.135.18.246.213.114 = STRING: 10.167.10.237
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.218.152.170.55.73.204 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.220.169.4.146.112.229 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.224.204.248.59.20.91 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.228.179.24.50.2.98 = STRING: 10.167.10.245
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.236.240.14.86.117.226 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.242.143.242.6.82.50 = STRING: 10.167.10.239
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.242.215.0.49.149.20 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.244.179.1.147.100.228 = STRING: 10.167.10.238
.1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4.248.89.113.128.32.190 = STRING: 10.167.10.237 

Fixes #4678

Result without fix

$ perl centreon_plugins.pl --plugin=network::aruba::instant::snmp::plugin  --mode=ap-usage --hostname=192.168.59.1 --snmp-port=8161 --snmp-community=issue_4678 --snmp-version=2c --filter-name='AP Centro Copiado Piso 1' --filter-counters='clients' 
Use of uninitialized value in concatenation (.) or string at /var/lib/centreon-engine/centreon-plugins/src/network/aruba/instant/snmp/mode/apusage.pm line 51.
OK: All access points are ok | 'AP Centro Copiado Piso 1#clients.current.count'=11;;;0;

Reason: the "clients" not matching the "--filter-name" pattern were counted in the "default" AP instance, but this instance was only set with the "default" display when no AP was found.

Result with fix

$ perl centreon_plugins.pl --plugin=network::aruba::instant::snmp::plugin  --mode=ap-usage --hostname=192.168.59.1 --snmp-port=8161 --snmp-community=issue_4678 --snmp-version=2c --filter-name='AP Centro Copiado Piso 1' --filter-counters='clients' 
OK: Access Point 'AP Centro Copiado Piso 1' Current Clients: 11 | 'AP Centro Copiado Piso 1#clients.current.count'=11;;;0;

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

garnier-quentin and others added 23 commits January 8, 2024 18:08
…mp mode input-lines, no perfdata and thresholds when value equal 0 (#4751)

Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-P-PF3DNAR1>
@omercier omercier requested review from a team as code owners January 8, 2024 17:09
@omercier omercier closed this Jan 8, 2024
@omercier omercier deleted the MON-24263-fix-uninitialized-value branch January 8, 2024 17:10
@omercier omercier mentioned this pull request Jan 8, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants