diff --git a/build.sh b/build.sh index ad44e77..1e9ebdf 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ export INFLUX_DATA="`pwd`/influxdb" export CURRENT_UID=`id -u` export CURRENT_GID=`id -g` export TELEGRAF_IMAGE="telegraf:latest" -export INFLUXDB_IMAGE="influxdb:1.8.4" +export INFLUXDB_IMAGE="influxdb:1.7.11" export CHRONOGRAF_IMAGE="chronograf:latest" self=$0 @@ -142,7 +142,7 @@ EOF function prepare_influxdb() { if [ ! -d $INFLUX_DATA ]; then - log "influxdb database folder is not existed, creating one" + log "influxdb database folder does not exist, creating one" mkdir $INFLUX_DATA fi #log "change permission of config and data folder of influxdb" diff --git a/etc/telegraf/gnmi_on_change.conf.example b/etc/telegraf/gnmi_on_change.conf.example index d6424f7..13c85e9 100644 --- a/etc/telegraf/gnmi_on_change.conf.example +++ b/etc/telegraf/gnmi_on_change.conf.example @@ -58,6 +58,11 @@ origin = "openconfig" path = "/interfaces/interface/state/oper-status" subscription_mode = "on_change" +[[inputs.cisco_telemetry_gnmi.subscription]] +path = "syslog" +origin = "syslog-oper" +subscription_mode = "on_change" + #[[inputs.cisco_telemetry_gnmi.subscription]] #origin = "openconfig" #path = "/network-instances/network-instance/vlans" diff --git a/etc/telegraf/telegraf.d/gnmi.conf.example b/etc/telegraf/telegraf.d/gnmi.conf.example index 9420962..3560a27 100644 --- a/etc/telegraf/telegraf.d/gnmi.conf.example +++ b/etc/telegraf/telegraf.d/gnmi.conf.example @@ -106,6 +106,12 @@ path = "/components/component/power-supply/state" subscription_mode = "sample" sample_interval = "10s" +[[inputs.cisco_telemetry_gnmi.subscription]] +origin = "openconfig" +path = "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis" +subscription_mode = "sample" +sample_interval = "30s" + ### native yang #### [[inputs.cisco_telemetry_gnmi.subscription]] origin = "device" diff --git a/playbook/group_vars/nxos.yml b/playbook/group_vars/nxos.yml index 3850b2a..c834e4e 100644 --- a/playbook/group_vars/nxos.yml +++ b/playbook/group_vars/nxos.yml @@ -1,4 +1,4 @@ ansible_connection: network_cli ansible_network_os: nxos ansible_user: admin -ansible_password: cisco123 +ansible_password: cisco.123 diff --git a/playbook/grpc.yml b/playbook/grpc.yml index 128d7de..8ec3f1d 100644 --- a/playbook/grpc.yml +++ b/playbook/grpc.yml @@ -4,16 +4,16 @@ gather_facts: no tasks: - name: copy gnmi certificate to switch - nxos_file_copy: + cisco.nxos.nxos_file_copy: file_pull: True remote_file: "/opt/telemetry_collector/etc/telegraf/cert/gnmi.pfx" local_file: "gnmi.pfx" remote_scp_server: "10.195.225.176" - remote_scp_server_user: "cisco" - remote_scp_server_password: "cisco123" + remote_scp_server_user: "root" + remote_scp_server_password: "cisco.123" - name: install new certificate and enable grpc - nxos_config: + cisco.nxos.nxos_config: lines: - crypto ca trustpoint gnmi - crypto ca import gnmi pkcs12 gnmi.pfx cisco123