Skip to content

Commit

Permalink
Fix acx health (#63)
Browse files Browse the repository at this point in the history
* fix acx health profile issue

* nex fix

---------

Co-authored-by: door7302 <[email protected]>
  • Loading branch information
door7302 and door7302 authored Dec 13, 2024
1 parent b57b084 commit b3b3a26
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 7 deletions.
2 changes: 1 addition & 1 deletion compose/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.13
1.0.14
Binary file modified compose/jtso/profiles/health.tgz
Binary file not shown.
72 changes: 66 additions & 6 deletions design_profile/health/acx_health.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
# subscription_mode = "sample"
# sample_interval = "30s"

[[inputs.gnmi.subscription]]
name = "ERRORS"
path = "/system/alarms/alarm/state"
subscription_mode = "sample"
sample_interval = "30s"
#[[inputs.gnmi.subscription]]
# name = "ERRORS"
# path = "/system/alarms/alarm/state"
# subscription_mode = "sample"
# sample_interval = "30s"

[[inputs.gnmi.subscription]]
name = "PROCESS"
Expand All @@ -75,6 +75,41 @@
subscription_mode = "on_change"
sample_interval = "0s"


###############################################################################
# SERVICE INPUT PLUGINS #
###############################################################################

[[inputs.netconf_junos]]
## Address of the Juniper NETCONF server
addresses = [
{{range .rtrs_netconf}}
"{{.}}",
{{end}}
]

## define credentials
username = "{{.usernetconf}}"
password = "{{.pwdnetconf}}"

## redial in case of failures after
redial = "10s"

[[inputs.netconf_junos.subscription]]
## Name of the measurement that will be emitted
name = "ERRORS"

## the JUNOS RPC to collect
junos_rpc = "<get-alarm-information></get-alarm-information>"

fields = ["/alarm-information/alarm-detail[alarm-short-description]/alarm-time:epoch_ms",
"/alarm-information/alarm-detail[alarm-short-description]/alarm-class:string",
"/alarm-information/alarm-detail[alarm-short-description]/alarm-description:string",
"/alarm-information/alarm-detail[alarm-short-description]/alarm-type:string",
]
## Interval to request the RPC
sample_interval = "30s"

###############################################################################
# PROCESSOR PLUGINS #
###############################################################################
Expand Down Expand Up @@ -232,7 +267,28 @@
[[processors.rename.replace]]
field="timestamp/seconds"
dest="seconds"


# Netconf TAG and field
[[processors.rename.replace]]
tag="alarm-short-description"
dest="alarm_id_net"

[[processors.rename.replace]]
field="alarm-time"
dest="alarm_time_net"

[[processors.rename.replace]]
field="alarm-class"
dest="alarm_severity_net"

[[processors.rename.replace]]
field="alarm-description"
dest="alarm_text_net"

[[processors.rename.replace]]
field="alarm-type"
dest="alarm_resource_net"

[[processors.converter]]
order = 6
namepass=["HARDWARE", "ERRORS", "LOGS", "PROCESS", "HW_NPU"]
Expand Down Expand Up @@ -359,4 +415,8 @@
"microseconds",
"seconds",
"pid",
"alarm_resource_net",
"alarm_severity_net",
"alarm_text_net",
"alarm_time_net",
]

0 comments on commit b3b3a26

Please sign in to comment.