summaryrefslogtreecommitdiff
path: root/src/op_mode/sflow.py
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-04-03 09:44:18 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-04-03 09:44:18 +0000
commit1b7534855f92ea307059bd01258746e45d6f79a5 (patch)
tree5008b1281a2b7bc016694a8d6ef02d7d61572bf2 /src/op_mode/sflow.py
parentb65296a0ff39e66d87e916971477cce351f6d5a5 (diff)
downloadvyos-1x-1b7534855f92ea307059bd01258746e45d6f79a5.tar.gz
vyos-1x-1b7534855f92ea307059bd01258746e45d6f79a5.zip
T5125: Sflow op-mode add event_samples_suppressed option
Add "Packet drops suppressed" option Rename "Samples drop events sent" to "Packet drops sent"
Diffstat (limited to 'src/op_mode/sflow.py')
-rwxr-xr-xsrc/op_mode/sflow.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/op_mode/sflow.py b/src/op_mode/sflow.py
index ddb8bf44d..88f70d6bd 100755
--- a/src/op_mode/sflow.py
+++ b/src/op_mode/sflow.py
@@ -37,11 +37,12 @@ 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'))
+ packet_drop_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'))
rtmetric_samples = int(sflow_telemetry.Get('rtmetric_samples'))
+ event_samples_suppressed = int(sflow_telemetry.Get('event_samples_suppressed'))
samples_suppressed = int(sflow_telemetry.Get('flow_samples_suppressed'))
counter_samples_suppressed = int(
sflow_telemetry.Get("counter_samples_suppressed"))
@@ -53,10 +54,11 @@ 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_drop_sent': packet_drop_sent,
'packet_samples_dropped': samples_dropped,
'packet_samples_sent': samples_packet_sent,
'rtmetric_samples': rtmetric_samples,
+ 'event_samples_suppressed': event_samples_suppressed,
'flow_samples_suppressed': samples_suppressed,
'counter_samples_suppressed': counter_samples_suppressed,
'hsflowd_version': version
@@ -73,7 +75,8 @@ def _get_formatted_sflow(data):
['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")}'],
- ['Samples drop events sent', f'{data.get("samples_drop_events_sent")}'],
+ ['Packet drops sent', f'{data.get("packet_drop_sent")}'],
+ ['Packet drops suppressed', f'{data.get("event_samples_suppressed")}'],
['Flow samples suppressed', f'{data.get("flow_samples_suppressed")}'],
['Counter samples suppressed', f'{data.get("counter_samples_suppressed")}']
]