-
Notifications
You must be signed in to change notification settings - Fork 85
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
Added ospf3 rules #1008
base: jcloud
Are you sure you want to change the base?
Added ospf3 rules #1008
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
/* | ||
* Detects Osp3fIoStatsTable IO errors and notifies when anomalies are found. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. requirement? |
||
*/ | ||
healthbot { | ||
topic routing.ospf { | ||
rule check-ospf3-io-statistics { | ||
synopsis "OSPF3 IO statistics analyzer"; | ||
description "Monitors OSPF's I/O statistics"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OSPF3? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to support ipv6 for ospf : Below cli cmds, we need to use ospf3 for ipv6 |
||
sensor ospf-io-statistics-netconf { | ||
synopsis "OSPF netconf sensor definition"; | ||
iAgent { | ||
file Ospf3NeighborStatsTable.yml; | ||
table Osp3fIoStatsTable; | ||
frequency 180s; | ||
} | ||
} | ||
field ospf-error { | ||
sensor ospf-io-statistics-netconf { | ||
path ospf-error; | ||
data-if-missing { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we require data if missing ? |
||
value 0; | ||
} | ||
} | ||
type integer; | ||
description "Ospf IO error count"; | ||
} | ||
field packets-read { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this field used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not used, shall remove it. |
||
sensor ospf-io-statistics-netconf { | ||
path packets-read; | ||
} | ||
type integer; | ||
description "Ospf IO packet read count"; | ||
} | ||
field error-threshold { | ||
constant { | ||
value "{{error-threshold}}"; | ||
} | ||
type integer; | ||
description "Packet error threshold"; | ||
} | ||
/* | ||
* Anomaly detection logic. | ||
*/ | ||
trigger ospf-io-errors { | ||
alert-type routing.ospf.errors.io.ospf-io-errors; | ||
synopsis "ospf io statistics kpi"; | ||
description "Sets health based on ospf io errors"; | ||
frequency 1offset; | ||
/* | ||
* Sets color to green when ospf errors is not incrementing. | ||
*/ | ||
term no-ospf-error-reported { | ||
when { | ||
matches-with-previous "$ospf-error" { | ||
time-range 2.5offset; | ||
latest; | ||
} | ||
} | ||
then { | ||
status { | ||
color green; | ||
message "OSPF IO error ($ospf-error)is not increasing"; | ||
} | ||
} | ||
} | ||
/* | ||
* Sets color to red and sends out an anomaly notification | ||
* when the ospf error count increases by 1. | ||
*/ | ||
term is-ospf-error-increasing { | ||
when { | ||
increasing-at-least-by-value "$ospf-error" { | ||
value "$error-threshold"; | ||
time-range 2.5offset; | ||
latest; | ||
} | ||
} | ||
then { | ||
status { | ||
color red; | ||
message "OSPF IO is reporting errors($ospf-error)"; | ||
} | ||
} | ||
} | ||
} | ||
variable error-threshold { | ||
value 1; | ||
type int; | ||
description "Packet error threshold: Increase between metrics, before we report anomaly"; | ||
} | ||
rule-properties { | ||
version 2; | ||
contributor juniper; | ||
category basic; | ||
supported-healthbot-version 1.0.1; | ||
supported-devices { | ||
juniper { | ||
sensors ospf-io-statistics-netconf; | ||
operating-system junos { | ||
products ACX { | ||
platforms All { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. platforms ALL is not valid |
||
releases 15.2R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products EX { | ||
platforms All { | ||
releases 15.2R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products MX { | ||
platforms All { | ||
releases 11.4R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products PTX { | ||
platforms All { | ||
releases 11.4R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products VMX { | ||
platforms VMX { | ||
releases 23.2R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
} | ||
operating-system junosEvolved { | ||
products ACX { | ||
platforms All { | ||
releases 22.3R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products PTX { | ||
platforms PTX10008 { | ||
releases 22.2R3 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
helper-files other { | ||
list-of-files Ospf3NeighborStatsTable.yml; | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
/* | ||
* Monitors OSPF3 hello packets and notifies anomalies when hello send and receive count | ||
* is not increasing. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. REQ? |
||
*/ | ||
healthbot { | ||
topic routing.ospf { | ||
rule check-ospf3-statistics { | ||
keys ospf-packet-type; | ||
synopsis "ospf hello statistics analyzer"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ospf3? |
||
description "Monitors the transmission and reception of hello packets"; | ||
sensor ospf-statistics-netconf { | ||
synopsis "OSPF iAgent sensor definition"; | ||
description "Netconfig rpc get-ospf-neighbor-information iAgent sensor to collect telemetry data from network device"; | ||
iAgent { | ||
file Ospf3NeighborStatsTable.yml; | ||
table Ospf3StatsTable; | ||
frequency 180s; | ||
} | ||
} | ||
field hello-received { | ||
sensor ospf-statistics-netconf { | ||
path hello-received; | ||
} | ||
type integer; | ||
description "Ospf hello packets received"; | ||
} | ||
field hello-sent { | ||
sensor ospf-statistics-netconf { | ||
path hello-sent; | ||
} | ||
type integer; | ||
description "Ospf hello packets sent"; | ||
} | ||
field ospf-packet-type { | ||
sensor ospf-statistics-netconf { | ||
path ospf-packet-type; | ||
} | ||
type string; | ||
description "Packet type"; | ||
} | ||
field hello-count-threshold { | ||
constant { | ||
value "{{hello-count-threshold}}"; | ||
} | ||
type integer; | ||
description "Hello count threshold"; | ||
} | ||
trigger ospf-hello-received { | ||
alert-type routing.ospf.hello.received.ospf-hello-received; | ||
synopsis "ospf hello received statistics kpi"; | ||
description "Sets health based on ospf hello received statistics"; | ||
frequency 1offset; | ||
term is-ospf-hello-receive-increasing { | ||
when { | ||
increasing-at-least-by-value "$hello-received" { | ||
value "$hello-count-threshold"; | ||
time-range 2.5offset; | ||
latest; | ||
} | ||
} | ||
then { | ||
status { | ||
color green; | ||
message "OSPF receive module is functioning, hello receive count($hello-received) is increasing"; | ||
} | ||
} | ||
} | ||
term is-ospf-hello-receive-not-increasing { | ||
when { | ||
matches-with-previous "$hello-received"{ | ||
time-range 2.5offset; | ||
latest; | ||
} | ||
} | ||
then { | ||
status { | ||
color red; | ||
message "OSPF receive module not functioning, hello receive count($hello-received) is not increasing"; | ||
} | ||
} | ||
} | ||
} | ||
trigger ospf-hello-sent { | ||
alert-type routing.ospf.hello.sent.ospf-hello-sent; | ||
synopsis "ospf hello sent statistics kpi"; | ||
description "Sets health based on ospf hello sent statistics"; | ||
frequency 1offset; | ||
term is-ospf-hello-sent-increasing { | ||
when { | ||
increasing-at-least-by-value "$hello-sent" { | ||
value "$hello-count-threshold"; | ||
time-range 2.5offset; | ||
latest; | ||
} | ||
} | ||
then { | ||
status { | ||
color green; | ||
message "OSPF send module is functioning, hello send count($hello-sent) is increasing"; | ||
} | ||
} | ||
} | ||
term is-ospf-hello-sent-not-increasing { | ||
when { | ||
matches-with-previous "$hello-sent"{ | ||
time-range 2.5offset; | ||
latest; | ||
} | ||
} | ||
then { | ||
status { | ||
color red; | ||
message "OSPF send module not functioning, hello send count($hello-sent) is not increasing"; | ||
} | ||
} | ||
} | ||
} | ||
variable hello-count-threshold { | ||
value 1; | ||
type int; | ||
description "Increase between metrics, before we report anomaly"; | ||
} | ||
rule-properties { | ||
version 2; | ||
contributor juniper; | ||
category basic; | ||
supported-healthbot-version 1.0.1; | ||
supported-devices { | ||
juniper { | ||
operating-system junos { | ||
products ACX { | ||
platforms All { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All is not valid |
||
releases 15.2R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products EX { | ||
platforms All { | ||
releases 15.2R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products MX { | ||
platforms All { | ||
releases 11.4R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products PTX { | ||
platforms All { | ||
releases 11.4R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products VMX { | ||
platforms VMX { | ||
releases 23.2R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
} | ||
operating-system junosEvolved { | ||
products ACX { | ||
platforms All { | ||
releases 22.3R1 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
products PTX { | ||
platforms PTX10008 { | ||
releases 22.2R3 { | ||
release-support min-supported-release; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
helper-files other { | ||
list-of-files Ospf3NeighborStatsTable.yml; | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the output be large? do we require filtering using xslt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ospf3 stats output can be large so xslt would be needed, but for ospf3 io-stats its at the protocol level so not needed.