Ver Fonte

Add NAT gateway stats.

Joe Clarke há 1 ano atrás
pai
commit
4eac235c5e
1 ficheiros alterados com 13 adições e 0 exclusões
  1. 13 0
      automation/network/poll_macs.py

+ 13 - 0
automation/network/poll_macs.py

@@ -102,6 +102,16 @@ commands = {
         "pattern": r"total addresses (\d+), allocated (\d+)[^,]+, misses (\d+)",
         "metrics": ["natPoolWLCAddresses", "natPoolWLCAllocated", "natPoolWLCMisses"],
     },
+    "natGatewayStatsIn": {
+        "command": "show platform hardware qfp active feature nat datapath gatein activity",
+        "pattern": r"Hits ([^,]+), Miss ([^,]+), Aged ([^ ]+) Added ([^ ]+) Active ([0-9]+)",
+        "metrics": ["natGateInHits", "natGateInMisses", "natGateInAged", "natGateInAdded", "natGateInActive"],
+    },
+    "natGatewayStatsOut": {
+        "command": "show platform hardware qfp active feature nat datapath gateout activity",
+        "pattern": r"Hits ([^,]+), Miss ([^,]+), Aged ([^ ]+) Added ([^ ]+) Active ([0-9]+)",
+        "metrics": ["natGateOutHits", "natGateOutMisses", "natGateOutAged", "natGateOutAdded", "natGateOutActive"],
+    },
     "natHealthStats": {
         "command": "show ip nat statistics | begin In-to-out",
         "pattern": r"In-to-out-drops: (\d+)\s+Out-to-in-drops: (\d+).*Pool stats drop: (\d+)\s+Mapping stats drop: (\d+).*Port block alloc fail: (\d+).*IP alias add fail: (\d+).*Limit entry add fail: (\d+)",
@@ -148,7 +158,10 @@ devices = [
             "natPoolDefault2",
             "natPoolDns",
             "natPoolLabs",
+            "natPoolWLC",
             "natHealthStats",
+            "natGatewayStatsIn",
+            "natGatewayStatsOut",
         ],
     },
 ]