From 75524cc33496755fc0d9c2c3b722d843752ef637 Mon Sep 17 00:00:00 2001 From: Karl Newell Date: Wed, 3 May 2017 17:41:39 +0000 Subject: [PATCH] Create junos parser for 'show ddos-protection' command --- .../show-ddos-protection.parser.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/junos_parsers/show-ddos-protection.parser.yaml diff --git a/data/junos_parsers/show-ddos-protection.parser.yaml b/data/junos_parsers/show-ddos-protection.parser.yaml new file mode 100644 index 0000000..dee390f --- /dev/null +++ b/data/junos_parsers/show-ddos-protection.parser.yaml @@ -0,0 +1,23 @@ +parser: + regex-command: show\s+ddos-protection\s+protocols(?:\s+|\s+\S*\s+)statistics\s+brief\s+\|\s+display\s+xml + matches: + - + type: multi-value + method: xpath + xpath: //ddos-system-statistics + loop: + group: ./group-name + type: ./packet-type + sub-matches: + - + xpath: ./packet-received + variable-name: $host.ddos-protection.$group.$type.packets-received + - + xpath: ./packet-dropped + variable-name: $host.ddos-protection.$group.$type.packets-dropped + - + xpath: ./packet-arrival-rate + variable-name: $host.ddos-protection.$group.$type.packet-rate + - + xpath: ./policer-violation-count + variable-name: $host.ddos-protection.$group.$type.policer-violation-count