Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
set the telegraf version to 1.29.2
remove the some debug lines
  • Loading branch information
Shangxin Du committed May 20, 2024
1 parent e844fd1 commit b09a5bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 1 addition & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export INFLUXDB_ENGINE="`pwd`/influxdb"
export CURRENT_UID=`id -u`
export CURRENT_GID=`id -g`

export TELEGRAF_IMAGE="telegraf:latest"
export TELEGRAF_IMAGE="telegraf:1.29.2"
export INFLUXDB_IMAGE="influxdb:2.7.1"
export GRAFANA_IMAGE="grafana/grafana:10.2.0"

Expand Down Expand Up @@ -178,10 +178,6 @@ function prepare_telegraf() {
# generate certificate if doesn't exist
gen_telegraf_cert

for a in ${swtiches[@]}; do
echo "\" $a \" "
done

# Modify the addresses in gnmi config to the switches provided
switch_list=`printf -- "\"%s\"," ${switches[*]} | cut -d "," -f 1-${#switches[@]}`
addresses="addresses = [$switch_list]"
Expand Down
17 changes: 15 additions & 2 deletions etc/telegraf/telegraf.d/gnmi.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,22 @@ name = "oc_psu"
subscription_mode = "sample"
sample_interval = "10s"

[[inputs.gnmi.subscription]]
origin = "openconfig"
path = "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config"
name = "oc_bgp_peer_config"
subscription_mode = "sample"
sample_interval = "30s"

### Cisco NX-OS Native YANG####
[[inputs.gnmi.subscription]]
origin = "openconfig"
path = "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state"
name = "oc_bgp_peer_state"
subscription_mode = "sample"
sample_interval = "30s"


### Cisco NX-OS Native YANG####
[[inputs.gnmi.subscription]]
origin = "device"
path = "/System/procsys-items/syscpusummary-items/syscpuhistory-items/SysCpuHistory-list/usageAvg"
Expand Down Expand Up @@ -313,4 +327,3 @@ organization = "Cisco"
bucket = "nxos_gnmi"
[outputs.influxdb_v2.tagpass]
tag1 = ["nxos_gnmi", "ping"]

0 comments on commit b09a5bc

Please sign in to comment.