-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first version * fix alias * fix * fix * update * ddos final version * final version with doc * add ptx * fix measurements * fix typo * update version --------- Co-authored-by: door7302 <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,237 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.11 | ||
1.0.12 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
############################################################################### | ||
# SERVICE INPUT PLUGINS # | ||
############################################################################### | ||
[[inputs.gnmi]] | ||
|
||
addresses = [ | ||
{{range .rtrs}} | ||
"{{.}}", | ||
{{end}} | ||
] | ||
username = "{{.username}}" | ||
password = "{{.password}}" | ||
|
||
{{if .tls}} | ||
## enable client-side TLS and define CA to authenticate the device | ||
enable_tls = true | ||
tls_ca = "/var/cert/RootCA.crt" | ||
## Minimal TLS version to accept by the client | ||
# tls_min_version = "TLS12" | ||
{{if .skip}} | ||
## Use TLS but skip chain & host verification | ||
insecure_skip_verify = true | ||
{{end}} | ||
{{if .tls_client}} | ||
## define client-side TLS certificate & key to authenticate to the device | ||
tls_cert = "/var/cert/client.crt" | ||
tls_key = "/var/cert/client.key" | ||
{{end}} | ||
{{end}} | ||
|
||
encoding = "proto" | ||
redial = "10s" | ||
long_tag = true | ||
check_jnpr_extension = true | ||
|
||
[inputs.gnmi.aliases] | ||
DDOS = ["/ddos-stats/group"] | ||
|
||
[[inputs.gnmi.subscription]] | ||
name = "DDOS" | ||
path = "/junos/system/linecard/ddos" | ||
subscription_mode = "sample" | ||
sample_interval = "60s" | ||
|
||
############################################################################### | ||
# PROCESSOR PLUGINS # | ||
############################################################################### | ||
|
||
[[processors.rename]] | ||
order = 4 | ||
namepass=["DDOS"] | ||
|
||
[[processors.rename.replace]] | ||
tag="/components/component/@name" | ||
dest="component_name" | ||
|
||
[[processors.rename.replace]] | ||
tag="/components/component/name" | ||
dest="component_name" | ||
|
||
[[processors.rename.replace]] | ||
tag="source" | ||
dest="device" | ||
|
||
[[processors.rename.replace]] | ||
tag="/ddos-stats/group/group_name" | ||
dest="protocol" | ||
|
||
[[processors.rename.replace]] | ||
tag="/ddos-stats/group/protocol-stats/protocol/protocol_name" | ||
dest="sub_protocol" | ||
|
||
[[processors.rename.replace]] | ||
tag="/ddos-stats/group/protocol-stats/protocol/locale-stats/locale/location" | ||
dest="location" | ||
|
||
[[processors.rename.replace]] | ||
field="protocol_stats/protocol/locale_stats/locale/dropped_aggregate_policer" | ||
dest="ddos_drop" | ||
|
||
[[processors.rename.replace]] | ||
field="protocol_stats/protocol/locale_stats/locale/arrival_rate" | ||
dest="ddos_received_rate" | ||
|
||
[[processors.rename.replace]] | ||
field="protocol_stats/protocol/locale_stats/locale/violation/policer_violation_count" | ||
dest="ddos_viol_count" | ||
|
||
[[processors.rename.replace]] | ||
field="protocol_stats/protocol/locale_stats/locale/violation/policer_state" | ||
dest="ddos_state" | ||
|
||
[[processors.strings]] | ||
order = 10 | ||
namepass=["DDOS"] | ||
[[processors.strings.lowercase]] | ||
tag = "location" | ||
[[processors.strings.lowercase]] | ||
tag = "protocol" | ||
[[processors.strings.lowercase]] | ||
tag = "sub_protocol" | ||
|
||
|
||
[[processors.enrichment]] | ||
order = 10 | ||
namepass=["DDOS"] | ||
enrichfilepath = "/var/metadata/metadata_mx.json" | ||
twolevels = false | ||
refreshperiod = 1 | ||
level1tagkey = "device" | ||
|
||
[[processors.rate]] | ||
order =11 | ||
namepass=["DDOS"] | ||
period = "10m" | ||
suffix = "_rate" | ||
factor = 1.0 | ||
retention = "1h" | ||
delta_min = "10s" | ||
fields = ["ddos_drop"] | ||
|
||
############################################################################### | ||
# OUTPUT PLUGINS # | ||
############################################################################### | ||
|
||
[[outputs.influxdb]] | ||
database="jtsdb" | ||
urls = ["http://influxdb:8086"] | ||
retention_policy = "autogen" | ||
fieldpass=[ | ||
"ddos_received_rate", | ||
"ddos_drop_rate", | ||
"ddos_viol_count", | ||
"ddos_state", | ||
] |
Oops, something went wrong.