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

rules for routingbot-IGP #974

Merged
merged 11 commits into from
Oct 22, 2024
79 changes: 79 additions & 0 deletions juniper_official/routing/collect-isis-counters.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
vsg26 marked this conversation as resolved.
Show resolved Hide resolved
* Collects ISIS lsdb data for seq-num-skips and spf-runs till level-number
* REQ: IGP RCA- https://paragon-automation.atlassian.net/browse/REQ-1349
*/
vsg26 marked this conversation as resolved.
Show resolved Hide resolved
healthbot {
topic routing.isis {
rule collect-isis-counters {
keys [ instance-name level-number ];
synopsis "collects ISIS seq-num-skips,spf-runs";
description "Collects LSDB path periodically till level-number node as key";
sensor isis-oc {
synopsis "ISIS open-config sensor definition";
description "Open-config sensor to collect telemetry data from network device";
open-config {
sensor-name /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/;
frequency 60s;
}
}
field instance-name {
sensor isis-oc {
where "/network-instances/network-instance/@name =~ /{{inst-name}}/";
path "/network-instances/network-instance/@name";
}
type string;
description "instance-name from the lsdb path";
}
field level-number {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number=~/{{level-number}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number";
}
type string;
description "level-number from the lsdb path";
}
field spf-runs {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/spf-runs";
}
type integer;
description "lsp-install-time from the lsdb path";
}
field seq-num-skips {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/seq-num-skips";
}
type integer;
description "lsp-sequence-number from the lsdb path";
}
variable inst-name {
value .*;
description "Enter a regular expression to match the instance name, e.g., 'master|RI1'";
type string;
}
variable level-number {
value .*;
description "Enter a regular expression to match the level number, e.g., '1', '2', or '3'";
type string;
}
rule-properties {
version 1;
contributor juniper;
supported-healthbot-version 2.3.0;
supported-devices {
juniper {
operating-system junos {
products MX {
gaddevijay marked this conversation as resolved.
Show resolved Hide resolved
platforms MX960 {
releases 22.2R3 {
release-support min-supported-release;
}
}
}
}
}
}
}
}
}
}
86 changes: 86 additions & 0 deletions juniper_official/routing/collect-isis-lsdb-lsp.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* Collects LSDB data for lsp-install-time and lsp sequence number
vsg26 marked this conversation as resolved.
Show resolved Hide resolved
* REQ: IGP RCA- https://paragon-automation.atlassian.net/browse/REQ-1349
*/
healthbot {
topic routing.isis {
rule collect-isis-lsdb-lsp {
keys [ instance-name level-number lsp-id ];
synopsis "Collects ISIS lsp-intall-time,sequence-number";
description "Collects LSDB path periodically till lsp node as key";
sensor isis-oc {
synopsis "ISIS open-config sensor definition";
description "Open-config sensor to collect telemetry data from network device";
open-config {
sensor-name /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/;
frequency 60s;
}
}
field instance-name {
sensor isis-oc {
where "/network-instances/network-instance/@name =~ /{{inst-name}}/";
path "/network-instances/network-instance/@name";
}
type string;
description "instance-name from the lsdb path";
}
field level-number {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number=~/{{level-number}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number";
}
type string;
description "level-number from the lsdb path";
}
field lsp-id {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/@lsp-id";
}
type string;
description "lsp-id from the lsdb path";
}
field lsp-install-time {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/state/lsp-install-time";
}
type unsigned-integer;
description "lsp-install-time from the lsdb path";
}
field sequence-number {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/state/sequence-number";
}
type integer;
description "lsp-sequence-number from the lsdb path";
}
variable inst-name {
value .*;
description "Enter a regular expression to match the instance name, e.g.master ";
type string;
}
variable level-number {
value .*;
description "Enter a regular expression to match the level number, e.g., '1', '2', or '3' ";
type string;
}
rule-properties {
version 1;
contributor juniper;
supported-healthbot-version 2.3.0;
supported-devices {
juniper {
operating-system junos {
vsg26 marked this conversation as resolved.
Show resolved Hide resolved
products MX {
platforms MX960 {
releases 22.2R3 {
release-support min-supported-release;
}
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
vsg26 marked this conversation as resolved.
Show resolved Hide resolved
* Collects ISIS lsdb data till neighbor-sysid for metric values from releases between 20.2R1 and 22.2R3
* REQ: IGP RCA- https://paragon-automation.atlassian.net/browse/REQ-1349
*/
healthbot {
topic routing.isis {
rule collect-isis-lsdb-neighbsysid_202R1_to_223R1 {
keys [ instance-name level-number lsp-id tlv-type neighbor-system-id ];
synopsis "collects ISIS state_metric for each of adjacent nodes";
description "Collects LSDB path periodically till neighbor-sysid node as key";
sensor isis-oc {
synopsis "ISIS open-config sensor definition";
description "Open-config sensor to collect telemetry data from network device";
open-config {
sensor-name /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/;
frequency 60s;
}
}
field instance-name {
sensor isis-oc {
where "/network-instances/network-instance/@name =~ /{{inst-name}}/";
path "/network-instances/network-instance/@name";
}
type string;
description "instance-name from the lsdb path";
}
field level-number {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number=~/{{level-number}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number";
}
type string;
description "level-number from the lsdb path";
}
field tlv-type {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/@type=~/{{tlv-type}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/@type";
}
type string;
description "tlv-type from the lsdb path";
}
field state-metric {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/state/metric";
}
type integer;
description "state metric value from the lsdb path";
}
field lsp-id {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/@lsp-id";
}
type string;
description "lsp-id from the lsdb path";
}
field neighbor-system-id {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/@system-id";
}
type string;
description "neighbor-sys-id from the lsdb path";
}
variable inst-name {
value .*;
description "Enter a regular expression to match the instance name, e.g., 'master|RI1'";
type string;
}
variable level-number {
value .*;
description "Enter a regular expression to match the level number, e.g., '1', '2', or '3'";
type string;
}
variable tlv-type {
value .*;
description "Enter a regular expression to match the TLV value";
type string;
}
rule-properties {
version 1;
contributor juniper;
supported-healthbot-version 2.3.0;
supported-devices {
juniper {
operating-system junos {
products MX {
platforms MX960 {
releases 22.2R3 {
release-support min-supported-release;
}
}
}
}
}
}
}
}
}
}
112 changes: 112 additions & 0 deletions juniper_official/routing/collect-isis-lsdb-neighbsysid_223R1.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
vsg26 marked this conversation as resolved.
Show resolved Hide resolved
* Collects ISIS lsdb data till neighbor-sysid for metric values from releases >=22.3R1
* REQ: IGP RCA- https://paragon-automation.atlassian.net/browse/REQ-1349
*/
healthbot {
topic routing.isis {
rule collect-isis-lsdb-neighbsysid_223R1 {
keys [ instance-name level-number lsp-id tlv-type neighbor-system-id instance-id ];
synopsis "collects ISIS state_metric for each of the links";
description "Collects LSDB path periodically till neighbor-sysid node as key";
sensor isis-oc {
synopsis "ISIS open-config sensor definition";
description "Open-config sensor to collect telemetry data from network device";
open-config {
sensor-name /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/;
frequency 60s;
}
}
field instance-name {
sensor isis-oc {
where "/network-instances/network-instance/@name =~ /{{inst-name}}/";
path "/network-instances/network-instance/@name";
}
type string;
description "instance-name from the lsdb path";
}
field level-number {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number=~/{{level-number}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/@level-number";
}
type string;
description "level-number from the lsdb path";
}
field tlv-type {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/@type=~/{{tlv-type}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/@type";
}
type string;
description "tlv-type from the lsdb path";
}
field state-metric {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/state/metric";
}
type integer;
description "state metric value from the lsdb path";
}
field lsp-id {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/@lsp-id";
}
type string;
description "lsp-id from the lsdb path";
}
field neighbor-system-id {
sensor isis-oc {
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/@system-id";
}
type string;
description "neighbor-sys-id from the lsdb path";
}
field instance-id {
sensor isis-oc {
where "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/@id=~/{{inst-id}}/";
path "/network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/@id";
}
type string;
description "instance-id from the lsdb path";
}
variable inst-name {
value .*;
description "Enter a regular expression to match the instance name, e.g., 'master|RI1'";
type string;
}
variable level-number {
value .*;
description "Enter a regular expression to match the level number, e.g., '1', '2', or '3'";
type string;
}
variable tlv-type {
value .*;
description "Enter a regular expression to match the TLV value";
type string;
}
variable inst-id {
value .*;
description "Enter a regular expression to match the instance-id value";
type string;
}
rule-properties {
version 1;
contributor juniper;
supported-healthbot-version 2.3.0;
supported-devices {
juniper {
operating-system junos {
products MX {
platforms MX960 {
releases 22.3R1 {
release-support min-supported-release;
}
}
}
}
}
}
}
}
}
}
Loading