summaryrefslogtreecommitdiff
path: root/src/op_mode/sflow.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-01 21:30:05 +0200
committerGitHub <noreply@github.com>2023-04-01 21:30:05 +0200
commit37740abd88aa4c9f38e67ca8137ae6d61926d8ac (patch)
tree50e9753416a4e7afac539a500e9484f240d34a05 /src/op_mode/sflow.py
parentb53c25a7bcd0a825cadf0e6c754297004ed3f0e4 (diff)
parent7d6731435410b16a2497dc0bc156fbde77797fb3 (diff)
downloadvyos-1x-37740abd88aa4c9f38e67ca8137ae6d61926d8ac.tar.gz
vyos-1x-37740abd88aa4c9f38e67ca8137ae6d61926d8ac.zip
Merge pull request #1929 from sever-sever/T5125
T5125: Extend op-mode show sflow add new metric
Diffstat (limited to 'src/op_mode/sflow.py')
-rwxr-xr-xsrc/op_mode/sflow.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/op_mode/sflow.py b/src/op_mode/sflow.py
index 1ff006274..ddb8bf44d 100755
--- a/src/op_mode/sflow.py
+++ b/src/op_mode/sflow.py
@@ -37,6 +37,7 @@ def _get_raw_sflow():
sflow, dbus_interface='net.sflow.hsflowd.telemetry')
agent_address = sflow_telemetry.GetAgent()
samples_dropped = int(sflow_telemetry.Get('dropped_samples'))
+ samples_drop_events_sent = int(sflow_telemetry.Get('event_samples'))
samples_packet_sent = int(sflow_telemetry.Get('flow_samples'))
samples_counter_sent = int(sflow_telemetry.Get('counter_samples'))
datagrams_sent = int(sflow_telemetry.Get('datagrams'))
@@ -52,6 +53,7 @@ def _get_raw_sflow():
'sflow_servers': servers,
'counter_samples_sent': samples_counter_sent,
'datagrams_sent': datagrams_sent,
+ 'samples_drop_events_sent': samples_drop_events_sent,
'packet_samples_dropped': samples_dropped,
'packet_samples_sent': samples_packet_sent,
'rtmetric_samples': rtmetric_samples,
@@ -67,10 +69,11 @@ def _get_formatted_sflow(data):
['Agent address', f'{data.get("agent_address")}'],
['sFlow interfaces', f'{data.get("sflow_interfaces", "n/a")}'],
['sFlow servers', f'{data.get("sflow_servers", "n/a")}'],
+ ['Counter samples sent', f'{data.get("counter_samples_sent")}'],
['Datagrams sent', f'{data.get("datagrams_sent")}'],
['Packet samples sent', f'{data.get("packet_samples_sent")}'],
['Packet samples dropped', f'{data.get("packet_samples_dropped")}'],
- ['Counter samples sent', f'{data.get("counter_samples_sent")}'],
+ ['Samples drop events sent', f'{data.get("samples_drop_events_sent")}'],
['Flow samples suppressed', f'{data.get("flow_samples_suppressed")}'],
['Counter samples suppressed', f'{data.get("counter_samples_suppressed")}']
]