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

[QOS] Cisco - Bug fix proposal #792

Merged
merged 4 commits into from
May 22, 2018
Merged

Conversation

jben94
Copy link
Contributor

@jben94 jben94 commented Oct 30, 2017

Hi,

Example of Qos:

  • QOS_policy_bordeaux
    • class-map : class-default
      • service-policy : child
        • Class-map : voice_qos
        • Class-map : ...
        • Class-map : class-default

In your calculation of the total, you include the 1st level class-map and all the children. So for a QOS we have double because the class-map of the 1st level is equal to all these children.

Moreover, we have a problem on the class-map "class-default" because it is present for the first level and in children. So in traffic calculation the class-default is equal to both class-default (1st level + child)

######################################
After :

Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:voice_qos'
...
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default'
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:class-default'
Classmap 'class-default' Traffic : 7.60 Mb/s, Drop : 0.00 b/s
...
Classmap 'voice_qos' Traffic : 5.28 Kb/s, Drop : 0.00 b/s

######################################
Before :

Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:voice_qos'
...
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default'
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:class-default'
Classmap 'class-default' Traffic : 716.22 Kb/s, Drop : 0.00 b/s
...
Classmap 'child-class-default' Traffic : 714.43 Kb/s, Drop : 0.00 b/s
Classmap 'child-voice_qos' Traffic : 593.78 b/s, Drop : 0.00 b/s

Regards

@garnier-quentin
Copy link
Contributor

Thanks for the explanation.

The 'total' is more: addition of all class you selected. So it's ok for me.
You're right for 'class-map' defaul? But in your PR, you use a check on the policy name 'child'. It could be another name ? For the same classmap name, i don't know how to do it. It won't be very nice to have all the path.

@jben94
Copy link
Contributor Author

jben94 commented Nov 6, 2017

Hi,
If you're right, Sorry.
I'm correcting my changes.

@garnier-quentin
Copy link
Contributor

Could you give me result with your last PR please ?

@jben94
Copy link
Contributor Author

jben94 commented Nov 14, 2017

Hi,
Sorry, I forgot to update the Github part.
I had to modify my code because there was a problem with a model of equipment.
I will update and I will put the results

@jben94
Copy link
Contributor Author

jben94 commented Nov 14, 2017

Here are the result examples on two different CISCO devices, including two different models :

./centreon_plugins.pl --plugin=network::cisco::standard::snmp::plugin --mode=qos-usage --hostname=**** --snmp-version=2c --snmp-community=**** --filter-source='qos_policy' --debug
OK: Total Traffic : 205.71 Kb/s, Total Drop : 0.00 b/s - All interface classmaps are ok - All classmaps are ok | 'total_traffic'=205711b/s;;;0; 'total_drop'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:business-critical_qos'=0.00b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:business-critical_qos'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default'=205711.65b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:voice_qos'=0.00b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:voice_qos'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:class-default'=904.35b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:class-default'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:video-conference_qos'=0.00b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:video-conference_qos'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:collaborative-tools_qos'=0.00b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:collaborative-tools_qos'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:admin_qos'=0.00b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:admin_qos'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:worse-effort_qos'=0.00b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:worse-effort_qos'=0b/s;;;0; 'icmap_traffic_Gi0/3:qos_policy:class-default:qos_child:default_qos'=204807.30b/s;;;0;100000000 'icmap_drop_Gi0/3:qos_policy:class-default:qos_child:default_qos'=0b/s;;;0; 'cmap_traffic_class-default'=205711b/s;;;0; 'cmap_drop_class-default'=0b/s;;;0; 'cmap_traffic_qos_child-admin_qos'=0b/s;;;0; 'cmap_drop_qos_child-admin_qos'=0b/s;;;0; 'cmap_traffic_qos_child-business-critical_qos'=0b/s;;;0; 'cmap_drop_qos_child-business-critical_qos'=0b/s;;;0; 'cmap_traffic_qos_child-class-default'=904b/s;;;0; 'cmap_drop_qos_child-class-default'=0b/s;;;0; 'cmap_traffic_qos_child-collaborative-tools_qos'=0b/s;;;0; 'cmap_drop_qos_child-collaborative-tools_qos'=0b/s;;;0; 'cmap_traffic_qos_child-default_qos'=204807b/s;;;0; 'cmap_drop_qos_child-default_qos'=0b/s;;;0; 'cmap_traffic_qos_child-video-conference_qos'=0b/s;;;0; 'cmap_drop_qos_child-video-conference_qos'=0b/s;;;0; 'cmap_traffic_qos_child-voice_qos'=0b/s;;;0; 'cmap_drop_qos_child-voice_qos'=0b/s;;;0; 'cmap_traffic_qos_child-worse-effort_qos'=0b/s;;;0; 'cmap_drop_qos_child-worse-effort_qos'=0b/s;;;0;
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:business-critical_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default' Traffic : 205.71Kb/s (0.21%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:voice_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:class-default' Traffic : 904.35b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:video-conference_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:collaborative-tools_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:admin_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:worse-effort_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/3:qos_policy:class-default:qos_child:default_qos' Traffic : 204.81Kb/s (0.20%), Drop : 0.00 b/s
Classmap 'class-default' Traffic : 205.71 Kb/s, Drop : 0.00 b/s
Classmap 'qos_child-admin_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'qos_child-business-critical_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'qos_child-class-default' Traffic : 904.35 b/s, Drop : 0.00 b/s
Classmap 'qos_child-collaborative-tools_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'qos_child-default_qos' Traffic : 204.81 Kb/s, Drop : 0.00 b/s
Classmap 'qos_child-video-conference_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'qos_child-voice_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'qos_child-worse-effort_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s

./centreon_plugins.pl --plugin=network::cisco::standard::snmp::plugin --mode=qos-usage --hostname=***** --snmp-version=2c --snmp-community=**** --filter-source='qos_policy_bordeaux' --debug
OK: Total Traffic : 1.07 Mb/s, Total Drop : 0.00 b/s - All interface classmaps are ok - All classmaps are ok | 'total_traffic'=1067781b/s;;;0; 'total_drop'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:voice_qos'=138542.91b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:voice_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:bgp_qos'=0.00b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:bgp_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:video-conference_qos'=0.00b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:video-conference_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:collaborating-tools_qos'=0.00b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:collaborating-tools_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:business-critical_qos'=0.00b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:business-critical_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:worse-effort_qos'=193.96b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:worse-effort_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:admin_qos'=166.15b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:admin_qos'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default'=1067781.76b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default'=0b/s;;;0; 'icmap_traffic_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:class-default'=929640.65b/s;;;0;40000000 'icmap_drop_Gi0/0/1.212:qos_policy_bordeaux:class-default:child:class-default'=0b/s;;;0; 'cmap_traffic_class-default'=1067781b/s;;;0; 'cmap_drop_class-default'=0b/s;;;0; 'cmap_traffic_child-admin_qos'=166b/s;;;0; 'cmap_drop_child-admin_qos'=0b/s;;;0; 'cmap_traffic_child-bgp_qos'=0b/s;;;0; 'cmap_drop_child-bgp_qos'=0b/s;;;0; 'cmap_traffic_child-business-critical_qos'=0b/s;;;0; 'cmap_drop_child-business-critical_qos'=0b/s;;;0; 'cmap_traffic_child-class-default'=929640b/s;;;0; 'cmap_drop_child-class-default'=0b/s;;;0; 'cmap_traffic_child-collaborating-tools_qos'=0b/s;;;0; 'cmap_drop_child-collaborating-tools_qos'=0b/s;;;0; 'cmap_traffic_child-video-conference_qos'=0b/s;;;0; 'cmap_drop_child-video-conference_qos'=0b/s;;;0; 'cmap_traffic_child-voice_qos'=138542b/s;;;0; 'cmap_drop_child-voice_qos'=0b/s;;;0; 'cmap_traffic_child-worse-effort_qos'=193b/s;;;0; 'cmap_drop_child-worse-effort_qos'=0b/s;;;0;
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:voice_qos' Traffic : 138.54Kb/s (0.35%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:bgp_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:video-conference_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:collaborating-tools_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:business-critical_qos' Traffic : 0.00b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:worse-effort_qos' Traffic : 193.96b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:admin_qos' Traffic : 166.15b/s (0.00%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default' Traffic : 1.07Mb/s (2.67%), Drop : 0.00 b/s
Interface classmap 'Gi0/0/1.212:qos_policy_bordeaux:class-default:child:class-default' Traffic : 929.64Kb/s (2.32%), Drop : 0.00 b/s
Classmap 'class-default' Traffic : 1.07 Mb/s, Drop : 0.00 b/s
Classmap 'child-admin_qos' Traffic : 166.15 b/s, Drop : 0.00 b/s
Classmap 'child-bgp_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'child-business-critical_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'child-class-default' Traffic : 929.64 Kb/s, Drop : 0.00 b/s
Classmap 'child-collaborating-tools_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'child-video-conference_qos' Traffic : 0.00 b/s, Drop : 0.00 b/s
Classmap 'child-voice_qos' Traffic : 138.54 Kb/s, Drop : 0.00 b/s
Classmap 'child-worse-effort_qos' Traffic : 193.96 b/s, Drop : 0.00 b/s

@Sims24
Copy link
Contributor

Sims24 commented Feb 7, 2018

Hello @jben94,

Thanks for the contribution. We'll merge it as soon as we were able to make some double check on Cisco equipments. Could you give us the model you have tested your change against ?

Thanks

@Sims24 Sims24 requested review from Sims24 and removed request for garnier-quentin February 7, 2018 15:47
@jben94
Copy link
Contributor Author

jben94 commented Feb 7, 2018

Hi,

Our tests were done on :

  • Cisco ASR1004
  • Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-ADVENTERPRISEK9-M), Version 15.5(3)S5, RELEASE SOFTWARE (fc2)

Regards

@Sims24 Sims24 requested a review from cgagnaire April 11, 2018 12:00
@cgagnaire cgagnaire merged commit bde3679 into centreon:master May 22, 2018
Sims24 added a commit to Sims24/centreon-plugins that referenced this pull request Aug 16, 2018
* + perl 5.10 & el6 compatibility (centreon#949)

Fix centreon#945

* improve ntp mode empty ntp_hostname option (centreon#952)

* Sonicwall plugin (centreon#922)

* + add plugin for sonicwall

Ref centreon#914

* Correcting mode formerly named 'traffic' to 'interfaces' (centreon#895)

Closes centreon#895

* Enhance juniper ssg plugin (centreon#959)

Closes centreon#891

* enhance juniper ssg plugin
* fix key loop and hash init

* List storages (centreon#946)

* better response time & add posibility to know drive type

* fix f5 bigip failover warning thresholds (centreon#964)

Closes centreon#963

* add ssl opt harmonization (centreon#965)

- Closes centreon#961
- enhance el7 perl ssl compatibility
- add proxy option where missing

* fix f5 bigip trunks (centreon#966)

* add snmp_standard interfaces speed check (centreon#967)

* refactor riverbed steelhead (centreon#971)

* Closes centreon#970

* fix riverbed steelhead typo (centreon#972)

* fix riverbed steelhead typo

* prepare new release (centreon#973)

* enhance http lib to handle hidden basic authent (centreon#974)

* add basic option to mode using http lib (centreon#975)

* fix f5 bigip trunks div by 0 error (centreon#977)

Closes centreon#976

* enhance sonicwall plugin (centreon#978)

* fix hirschmann psu wrong oid (centreon#985)

* enhance quadstor vtltapeusage mode (centreon#987)

* enhance quadstor vtltapeusage mode

* init counter to 0

* [QOS] Cisco - Bug fix proposal (centreon#792)

* Fix: Calcul total And Child

* Fix: Put in 'variable' the name of the service-policy

* Fix: child detection

* prepare new release (centreon#998)

* Cannot find physical memory informations fix centreon#994 (centreon#1000)

* fix processcount perfdata output typos (centreon#1003)

* refacto netapp qtreeusage and add not-kbytes option (centreon#1029)

* fix qnap hardware thresholds overload (centreon#1028)

* add cloudfoundry plugin (wip) (centreon#1031)

* Filesystem Check (centreon#1036)

* enh linux local mountpoint mode (centreon#1043)

* enh selenium plugin (centreon#1039)

* add silverpeak plugin (centreon#1037)

* added silverpeak plugin and modes

* fix type, oid  name and timealarms

* fix cache file name

* starting peplink loadbalancer monitoring (centreon#1015)

* Create memory.pm

* Create cpu.pm

* Create plugin.pm

* fix peplink silverpeak plugins typos (centreon#1045)

* fix peplink plugin typos

* fix silverpeak plugin typos

* report idrac installed CPUs only (centreon#1017)

* Report installed CPUs only

using processorDeviceTable instead of processorDeviceStatusTable

* Report installed CPUs only, adapt var names

* add database-size mode (centreon#870)

* fix postgres databasesize mode (centreon#1046)

* fix postgres databasesize mode, missing empty selection (centreon#1047)

* fix arista memory output (centreon#1048)

* enh h3c hardware cache (centreon#1049)

* fix fortigate devicestatus help (centreon#1050)

* fix dell fastpath temperature (centreon#1051)

* fix hirschmann memory (centreon#1052)

* fix tomcat web sessions (centreon#1053)

* enh paloalto cluster output (centreon#1054)

* convert blocked processes counters (centreon#938)

* Convert database::mssql::mode::blockedprocesses to the counters library

* Using fetchrow_hashref instead of fetchall_arrayref according to @Sims24 recommendation

* Rationalizing a bit the output/long output/debug output

* enh mssql blockedprocesses (centreon#1055)

* adding new local plugin to os::hpux with two modes regarding disks (storage, inodes) (centreon#955)

* adding new 'inodes' mode to os::aix::local::plugin (centreon#956)

* enh aix local inodes (centreon#1056)

* enh aix local inodes, wrong parsing (centreon#1057)

* enh aix local storage inodes (centreon#1058)

* correct RADIUS help (centreon#1060)

* fix mssql blocked processes trim (centreon#1066)

* fix mssql transactions case (centreon#1067)

* adding Centos Upgrade Check (centreon#1034)

* enh linux local pending updates (centreon#1068)

* using a file a JSON source did not work (wrong file handler) (centreon#979)

* re-calculating virtual memory for windows machines (centreon#929)

* enh windows snmp swap (centreon#1069)

* fix kaspersky snmp deployment devision by zero (centreon#1070)

* enh windows snmp swap, help (centreon#1072)

* enh windows snmp swap, physical memory name (centreon#1073)

* fix netapp restapi volumeusage typo (centreon#1074)

* enh sql sqlstring for dual tables (centreon#1075)

* add slack plugin (centreon#1076)
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.

4 participants