├── LICENSE ├── Makefile ├── README.md ├── configs ├── dashboards.yaml ├── datasource.yaml ├── telegraf-openconfig.conf └── telegraf-snmp.conf ├── dashboards ├── openconfig.json ├── openconfig_BGP_with_hardcoded_queries.json ├── openconfig_interfaces.json ├── snmp_dashboards.json └── snmp_graphs.json ├── data.yml ├── docker-compose.yml ├── render.py ├── requirements.txt ├── resources ├── BGP.png ├── BGP_prefixes_received.png ├── BGP_prefixes_sent.png ├── BGP_sessions_state_established.png ├── EBGP_peers_configured.png ├── interfaces.png ├── inventory.png └── transitions_to_bgp_established.png ├── templates ├── docker-compose.j2 ├── telegraf-openconfig.j2 └── telegraf-snmp.j2 └── upgrade-junos.py /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Copyright (c) 2018 Juniper Networks, Inc. All rights reserved 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | build-telegraf-conf: 2 | @echo "======================================================================" 3 | @echo "Build telegraf configuration files from template" 4 | @echo "======================================================================" 5 | python ./render.py -o 'configs/telegraf-openconfig.conf' -t 'templates/telegraf-openconfig.j2' -y 'data.yml' 6 | python ./render.py -o 'configs/telegraf-snmp.conf' -t 'templates/telegraf-snmp.j2' -y 'data.yml' 7 | 8 | grafana-cli: 9 | @echo "======================================================================" 10 | @echo "start a shell session in the grafana container" 11 | @echo "======================================================================" 12 | docker exec -i -t grafana /bin/bash 13 | 14 | telegraf-openconfig-cli: 15 | @echo "======================================================================" 16 | @echo "start a shell session in the telegraf container for Openconfig" 17 | @echo "======================================================================" 18 | docker exec -i -t telegraf-openconfig /bin/bash 19 | 20 | telegraf-snmp-cli: 21 | @echo "======================================================================" 22 | @echo "start a shell session in the telegraf container for SNMP" 23 | @echo "======================================================================" 24 | docker exec -i -t telegraf-snmp /bin/bash 25 | 26 | influxdb-cli: 27 | @echo "======================================================================" 28 | @echo "start a shell session in the influxb container" 29 | @echo "======================================================================" 30 | docker exec -it influxdb bash 31 | 32 | influxdb-logs: 33 | @echo "======================================================================" 34 | @echo "fetch the 100 last lines of logs of the influxb container" 35 | @echo "======================================================================" 36 | docker logs influxdb --tail 100 37 | 38 | grafana-logs: 39 | @echo "======================================================================" 40 | @echo "fetch the 100 last lines of logs of the grafana container" 41 | @echo "======================================================================" 42 | docker logs grafana --tail 100 43 | 44 | telegraf-snmp-logs: 45 | @echo "======================================================================" 46 | @echo "fetch the 100 last lines of logs of the telegraf-snmp container" 47 | @echo "======================================================================" 48 | docker logs telegraf-snmp --tail 100 49 | 50 | telegraf-openconfig-logs: 51 | @echo "======================================================================" 52 | @echo "fetch the 100 last lines of logs of the telegraf-openconfig container" 53 | @echo "======================================================================" 54 | docker logs telegraf-openconfig --tail 100 55 | 56 | restart: stop start 57 | 58 | up: 59 | @echo "======================================================================" 60 | @echo "create docker-compose file, create docker networks, pull docker images, create and start docker containers" 61 | @echo "======================================================================" 62 | python ./render.py -o 'docker-compose.yml' -t 'templates/docker-compose.j2' -y 'data.yml' 63 | docker-compose -f ./docker-compose.yml up -d 64 | 65 | down: 66 | @echo "======================================================================" 67 | @echo "stop docker containers, remove docker containers, remove docker networks" 68 | @echo "======================================================================" 69 | docker-compose -f ./docker-compose.yml down 70 | 71 | start: 72 | @echo "======================================================================" 73 | @echo "Start docker containers" 74 | @echo "======================================================================" 75 | docker-compose -f ./docker-compose.yml start 76 | 77 | stop: 78 | @echo "======================================================================" 79 | @echo "Stop docker containers" 80 | @echo "======================================================================" 81 | docker-compose -f ./docker-compose.yml stop 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository is about monitoring Junos devices using a TIG stack (Telegraf-Influxdb-Grafana). 2 | It has ready to use content to monitor interfaces and BGP and other details (uptime, SN, HW models, ...). 3 | It currently supports data collection on Junos using SNMP and OpenConfig. 4 | 5 | Please visit the [**wiki**](https://github.com/ksator/junos_monitoring_with_a_TIG_stack/wiki) for detailled instructions. 6 | 7 | Here are some Grafana screenshots: 8 | 9 | ![inventory.png](resources/inventory.png) 10 | 11 | ![BGP.png](resources/BGP.png) 12 | 13 | ![EBGP_peers_configured.png](resources/EBGP_peers_configured.png) 14 | 15 | ![BGP_sessions_state_established.png](resources/BGP_sessions_state_established.png) 16 | 17 | ![transitions_to_bgp_established.png](resources/transitions_to_bgp_established.png) 18 | 19 | ![BGP_prefixes_received.png](resources/BGP_prefixes_received.png) 20 | 21 | ![BGP_prefixes_sent.png](resources/BGP_prefixes_sent.png) 22 | 23 | ![BGP.interfaces](resources/interfaces.png) 24 | 25 | 26 | -------------------------------------------------------------------------------- /configs/dashboards.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | providers: 3 | - name: 'test' 4 | orgId: 1 5 | folder: '' 6 | type: file 7 | disableDeletion: false 8 | updateIntervalSeconds: 60 #how often Grafana will scan for changed dashboards 9 | options: 10 | path: /var/tmp/dashboards 11 | -------------------------------------------------------------------------------- /configs/datasource.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | datasources: 3 | - name: influxdb 4 | type: influxdb 5 | access: proxy 6 | orgId: 1 7 | url: http://influxdb:8086 8 | password: juniper 9 | user: juniper 10 | database: juniper 11 | basicAuth: false 12 | basicAuthUser: 13 | basicAuthPassword: 14 | withCredentials: 15 | isDefault: true 16 | editable: true 17 | 18 | -------------------------------------------------------------------------------- /configs/telegraf-openconfig.conf: -------------------------------------------------------------------------------- 1 | [[inputs.jti_openconfig_telemetry]] 2 | servers = [ "100.123.1.5:32768" , "100.123.1.4:32768" , "100.123.1.6:32768" , "100.123.1.1:32768" , "100.123.1.0:32768" , "100.123.1.3:32768" , "100.123.1.2:32768" ] 3 | username = "jcluser" 4 | password = "Juniper!1" 5 | client_id = "telegraf" 6 | sample_frequency = "2000ms" 7 | sensors = ["/interfaces/", "/network-instances/network-instance/protocols/protocol/bgp/"] 8 | retry_delay = "1000ms" 9 | str_as_tags = false 10 | 11 | [[outputs.influxdb]] 12 | urls = ["http://influxdb:8086"] 13 | database = "juniper" 14 | timeout = "5s" 15 | username = "juniper" 16 | password = "juniper" -------------------------------------------------------------------------------- /configs/telegraf-snmp.conf: -------------------------------------------------------------------------------- 1 | [[inputs.snmp]] 2 | agents = [ "100.123.1.5:161" , "100.123.1.4:161" , "100.123.1.6:161" , "100.123.1.1:161" , "100.123.1.0:161" , "100.123.1.3:161" , "100.123.1.2:161" ] 3 | name_prefix = "snmp_" 4 | interval = "5000ms" 5 | version = 2 6 | community = "public" 7 | 8 | [[inputs.snmp.field]] 9 | name = "hostname" 10 | oid = "SNMPv2-MIB::sysName.0" 11 | is_tag = true 12 | 13 | [[inputs.snmp.field]] 14 | name = "uptime" 15 | oid = "SNMPv2-MIB::sysUpTime.0" 16 | 17 | [[inputs.snmp.field]] 18 | name = "jnxBoxSerialNo" 19 | oid="JUNIPER-MIB::jnxBoxSerialNo.0" 20 | 21 | [[inputs.snmp.field]] 22 | name = "jnxBoxDescr" 23 | oid="JUNIPER-MIB::jnxBoxDescr.0" 24 | 25 | [[inputs.snmp.field]] 26 | name = "jnxBoxInstalled" 27 | oid="JUNIPER-MIB::jnxBoxInstalled.0" 28 | 29 | [[inputs.snmp.field]] 30 | name = "sysApplInstallPkgVersion" 31 | oid = "SYSAPPL-MIB::sysApplInstallPkgVersion.2" 32 | 33 | [[inputs.snmp.table]] 34 | name = "BGP" 35 | inherit_tags = [ "hostname" ] 36 | # [inputs.snmp.tagpass] 37 | # bgpPeerRemoteAddr = ["192.168*"] 38 | [[inputs.snmp.table.field]] 39 | name = "bgpPeerState" 40 | oid = "BGP4-MIB::bgpPeerState" 41 | [[inputs.snmp.table.field]] 42 | name = "bgpPeerRemoteAddr" 43 | oid = "BGP4-MIB::bgpPeerRemoteAddr" 44 | is_tag = true 45 | [[inputs.snmp.table.field]] 46 | name = "bgpPeerRemoteAs" 47 | oid = "BGP4-MIB::bgpPeerRemoteAs" 48 | [[inputs.snmp.table.field]] 49 | name = "bgpPeerFsmEstablishedTransitions" 50 | oid = "BGP4-MIB::bgpPeerFsmEstablishedTransitions" 51 | 52 | 53 | [[inputs.snmp.table]] 54 | name = "interfaces_statistics" 55 | inherit_tags = [ "hostname" ] 56 | # [inputs.snmp.tagpass] 57 | # ifName = ["ge-0/0/0", "ge-0/0/1", "ge-0/0/2"] 58 | [[inputs.snmp.table.field]] 59 | name = "ifName" 60 | oid = "IF-MIB::ifName" 61 | is_tag = true 62 | [[inputs.snmp.table.field]] 63 | name = "ifHCInOctets" 64 | oid = "IF-MIB::ifHCInOctets" 65 | [[inputs.snmp.table.field]] 66 | name = "ifHCOutOctets" 67 | oid = "IF-MIB::ifHCOutOctets" 68 | [[inputs.snmp.table.field]] 69 | name = "ifHCOutUcastPkts" 70 | oid = "IF-MIB::ifHCOutUcastPkts" 71 | [[inputs.snmp.table.field]] 72 | name = "ifHCInUcastPkts" 73 | oid = "IF-MIB::ifHCInUcastPkts" 74 | [[inputs.snmp.table.field]] 75 | name = "ifOperStatus" 76 | oid = "IF-MIB::ifOperStatus" 77 | [[inputs.snmp.table.field]] 78 | name = "ifAdminStatus" 79 | oid = "IF-MIB::ifAdminStatus" 80 | [[inputs.snmp.table.field]] 81 | name = "ifLastChange" 82 | oid = "IF-MIB::ifLastChange" 83 | 84 | [[outputs.influxdb]] 85 | urls = ["http://influxdb:8086"] 86 | database = "juniper" 87 | timeout = "5s" 88 | username = "juniper" 89 | password = "juniper" 90 | 91 | [agent] 92 | quiet = true 93 | debug = false 94 | 95 | -------------------------------------------------------------------------------- /dashboards/openconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "annotattations": { 4 | "list": [ 5 | { 6 | "builtIn": 1, 7 | "datasource": "-- Grafana --", 8 | "enable": true, 9 | "hide": true, 10 | "iconColor": "rgba(0, 211, 255, 1)", 11 | "name": "Annotations & Alerts", 12 | "type": "dashboard" 13 | } 14 | ] 15 | }, 16 | "editable": true, 17 | "gnetId": null, 18 | "graphTooltip": 0, 19 | "iteration": 1547208353880, 20 | "links": [], 21 | "panels": [ 22 | { 23 | "collapsed": false, 24 | "gridPos": { 25 | "h": 1, 26 | "w": 24, 27 | "x": 0, 28 | "y": 0 29 | }, 30 | "id": 21, 31 | "panels": [], 32 | "title": "Interfaces", 33 | "type": "row" 34 | }, 35 | { 36 | "columns": [], 37 | "fontSize": "100%", 38 | "gridPos": { 39 | "h": 9, 40 | "w": 12, 41 | "x": 0, 42 | "y": 1 43 | }, 44 | "id": 23, 45 | "links": [], 46 | "pageSize": null, 47 | "repeat": "devices", 48 | "repeatDirection": "v", 49 | "scopedVars": { 50 | "devices": { 51 | "selected": true, 52 | "text": "100.123.1.0", 53 | "value": "100.123.1.0" 54 | } 55 | }, 56 | "scroll": true, 57 | "showHeader": true, 58 | "sort": { 59 | "col": 0, 60 | "desc": true 61 | }, 62 | "styles": [ 63 | { 64 | "alias": "Time", 65 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 66 | "pattern": "Time", 67 | "type": "hidden" 68 | }, 69 | { 70 | "alias": "interfaces", 71 | "colorMode": null, 72 | "colors": [ 73 | "rgba(245, 54, 54, 0.9)", 74 | "rgba(237, 129, 40, 0.89)", 75 | "rgba(50, 172, 45, 0.97)" 76 | ], 77 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 78 | "decimals": 2, 79 | "mappingType": 1, 80 | "pattern": "/\\/interfaces.*/", 81 | "thresholds": [], 82 | "type": "number", 83 | "unit": "short" 84 | }, 85 | { 86 | "alias": "", 87 | "colorMode": null, 88 | "colors": [ 89 | "rgba(245, 54, 54, 0.9)", 90 | "rgba(237, 129, 40, 0.89)", 91 | "rgba(50, 172, 45, 0.97)" 92 | ], 93 | "decimals": 2, 94 | "pattern": "/.*/", 95 | "thresholds": [], 96 | "type": "number", 97 | "unit": "short" 98 | } 99 | ], 100 | "targets": [ 101 | { 102 | "groupBy": [ 103 | { 104 | "params": [ 105 | "/interfaces/interface/@name" 106 | ], 107 | "type": "tag" 108 | } 109 | ], 110 | "measurement": "/interfaces/", 111 | "orderByTime": "ASC", 112 | "policy": "default", 113 | "refId": "A", 114 | "resultFormat": "table", 115 | "select": [ 116 | [ 117 | { 118 | "params": [ 119 | "/interfaces/interface/state/admin-status" 120 | ], 121 | "type": "field" 122 | }, 123 | { 124 | "params": [], 125 | "type": "last" 126 | }, 127 | { 128 | "params": [ 129 | "admin-status" 130 | ], 131 | "type": "alias" 132 | } 133 | ], 134 | [ 135 | { 136 | "params": [ 137 | "/interfaces/interface/state/oper-status" 138 | ], 139 | "type": "field" 140 | }, 141 | { 142 | "params": [], 143 | "type": "last" 144 | }, 145 | { 146 | "params": [ 147 | "oper-status" 148 | ], 149 | "type": "alias" 150 | } 151 | ] 152 | ], 153 | "tags": [ 154 | { 155 | "key": "device", 156 | "operator": "=~", 157 | "value": "/^$devices$/" 158 | }, 159 | { 160 | "condition": "AND", 161 | "key": "/interfaces/interface/@name", 162 | "operator": "=~", 163 | "value": "/^$interfaces$/" 164 | } 165 | ] 166 | } 167 | ], 168 | "title": "interfaces status - Device $devices", 169 | "transform": "table", 170 | "transparent": true, 171 | "type": "table" 172 | }, 173 | { 174 | "collapsed": false, 175 | "gridPos": { 176 | "h": 1, 177 | "w": 24, 178 | "x": 0, 179 | "y": 10 180 | }, 181 | "id": 19, 182 | "panels": [], 183 | "title": "BGP", 184 | "type": "row" 185 | }, 186 | { 187 | "aliasColors": {}, 188 | "bars": false, 189 | "dashLength": 10, 190 | "dashes": false, 191 | "description": "The number of EBGP neighbors configured. \nSelect a device.", 192 | "fill": 1, 193 | "gridPos": { 194 | "h": 9, 195 | "w": 24, 196 | "x": 0, 197 | "y": 11 198 | }, 199 | "id": 10, 200 | "legend": { 201 | "alignAsTable": true, 202 | "avg": false, 203 | "current": true, 204 | "max": true, 205 | "min": true, 206 | "rightSide": true, 207 | "show": true, 208 | "total": false, 209 | "values": true 210 | }, 211 | "lines": true, 212 | "linewidth": 1, 213 | "links": [], 214 | "minSpan": 10, 215 | "nullPointMode": "null", 216 | "percentage": false, 217 | "pointradius": 5, 218 | "points": false, 219 | "renderer": "flot", 220 | "repeat": "devices", 221 | "repeatDirection": "v", 222 | "scopedVars": { 223 | "devices": { 224 | "selected": true, 225 | "text": "100.123.1.0", 226 | "value": "100.123.1.0" 227 | } 228 | }, 229 | "seriesOverrides": [], 230 | "spaceLength": 10, 231 | "stack": false, 232 | "steppedLine": false, 233 | "targets": [ 234 | { 235 | "alias": "# of BGP neighbors configured", 236 | "groupBy": [ 237 | { 238 | "params": [ 239 | "$__interval" 240 | ], 241 | "type": "time" 242 | }, 243 | { 244 | "params": [ 245 | "none" 246 | ], 247 | "type": "fill" 248 | } 249 | ], 250 | "hide": false, 251 | "measurement": "/bgp/", 252 | "orderByTime": "ASC", 253 | "policy": "default", 254 | "refId": "D", 255 | "resultFormat": "time_series", 256 | "select": [ 257 | [ 258 | { 259 | "params": [ 260 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 261 | ], 262 | "type": "field" 263 | }, 264 | { 265 | "params": [], 266 | "type": "count" 267 | } 268 | ] 269 | ], 270 | "tags": [ 271 | { 272 | "key": "device", 273 | "operator": "=~", 274 | "value": "/^$devices$/" 275 | } 276 | ] 277 | }, 278 | { 279 | "alias": "# of EBGP neighbors configured", 280 | "groupBy": [ 281 | { 282 | "params": [ 283 | "$__interval" 284 | ], 285 | "type": "time" 286 | }, 287 | { 288 | "params": [ 289 | "none" 290 | ], 291 | "type": "fill" 292 | } 293 | ], 294 | "hide": false, 295 | "measurement": "/bgp/", 296 | "orderByTime": "ASC", 297 | "policy": "default", 298 | "refId": "A", 299 | "resultFormat": "time_series", 300 | "select": [ 301 | [ 302 | { 303 | "params": [ 304 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 305 | ], 306 | "type": "field" 307 | }, 308 | { 309 | "params": [], 310 | "type": "count" 311 | } 312 | ] 313 | ], 314 | "tags": [ 315 | { 316 | "key": "device", 317 | "operator": "=~", 318 | "value": "/^$devices$/" 319 | }, 320 | { 321 | "condition": "AND", 322 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 323 | "operator": "=", 324 | "value": "EXTERNAL" 325 | } 326 | ] 327 | }, 328 | { 329 | "alias": "# of IGBP neighbors configured", 330 | "groupBy": [ 331 | { 332 | "params": [ 333 | "$__interval" 334 | ], 335 | "type": "time" 336 | }, 337 | { 338 | "params": [ 339 | "none" 340 | ], 341 | "type": "fill" 342 | } 343 | ], 344 | "hide": false, 345 | "measurement": "/bgp/", 346 | "orderByTime": "ASC", 347 | "policy": "default", 348 | "refId": "C", 349 | "resultFormat": "time_series", 350 | "select": [ 351 | [ 352 | { 353 | "params": [ 354 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 355 | ], 356 | "type": "field" 357 | }, 358 | { 359 | "params": [], 360 | "type": "count" 361 | } 362 | ] 363 | ], 364 | "tags": [ 365 | { 366 | "key": "device", 367 | "operator": "=~", 368 | "value": "/^$devices$/" 369 | }, 370 | { 371 | "condition": "AND", 372 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 373 | "operator": "=", 374 | "value": "INTERNAL" 375 | } 376 | ] 377 | }, 378 | { 379 | "alias": "# of BGP sessions ESTABLISHED", 380 | "groupBy": [ 381 | { 382 | "params": [ 383 | "$__interval" 384 | ], 385 | "type": "time" 386 | }, 387 | { 388 | "params": [ 389 | "none" 390 | ], 391 | "type": "fill" 392 | } 393 | ], 394 | "measurement": "/bgp/", 395 | "orderByTime": "ASC", 396 | "policy": "default", 397 | "refId": "B", 398 | "resultFormat": "time_series", 399 | "select": [ 400 | [ 401 | { 402 | "params": [ 403 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 404 | ], 405 | "type": "field" 406 | }, 407 | { 408 | "params": [], 409 | "type": "count" 410 | } 411 | ] 412 | ], 413 | "tags": [ 414 | { 415 | "key": "device", 416 | "operator": "=~", 417 | "value": "/^$devices$/" 418 | } 419 | ] 420 | } 421 | ], 422 | "thresholds": [], 423 | "timeFrom": null, 424 | "timeRegions": [], 425 | "timeShift": null, 426 | "title": "BGP sessions - Device $devices", 427 | "tooltip": { 428 | "shared": true, 429 | "sort": 0, 430 | "value_type": "individual" 431 | }, 432 | "transparent": true, 433 | "type": "graph", 434 | "xaxis": { 435 | "buckets": null, 436 | "mode": "time", 437 | "name": null, 438 | "show": true, 439 | "values": [] 440 | }, 441 | "yaxes": [ 442 | { 443 | "format": "short", 444 | "label": null, 445 | "logBase": 1, 446 | "max": null, 447 | "min": null, 448 | "show": true 449 | }, 450 | { 451 | "format": "short", 452 | "label": null, 453 | "logBase": 1, 454 | "max": null, 455 | "min": null, 456 | "show": true 457 | } 458 | ], 459 | "yaxis": { 460 | "align": false, 461 | "alignLevel": null 462 | } 463 | }, 464 | { 465 | "aliasColors": {}, 466 | "bars": false, 467 | "dashLength": 10, 468 | "dashes": false, 469 | "description": "The number of transitions to the BGP session state established. \nSelect a device and a neighbor", 470 | "fill": 1, 471 | "gridPos": { 472 | "h": 8, 473 | "w": 24, 474 | "x": 0, 475 | "y": 20 476 | }, 477 | "id": 16, 478 | "legend": { 479 | "alignAsTable": true, 480 | "avg": false, 481 | "current": true, 482 | "max": true, 483 | "min": true, 484 | "rightSide": true, 485 | "show": true, 486 | "total": false, 487 | "values": true 488 | }, 489 | "lines": true, 490 | "linewidth": 1, 491 | "links": [], 492 | "nullPointMode": "null", 493 | "percentage": false, 494 | "pointradius": 5, 495 | "points": false, 496 | "renderer": "flot", 497 | "repeat": "devices", 498 | "repeatDirection": "v", 499 | "scopedVars": { 500 | "devices": { 501 | "selected": true, 502 | "text": "100.123.1.0", 503 | "value": "100.123.1.0" 504 | } 505 | }, 506 | "seriesOverrides": [], 507 | "spaceLength": 10, 508 | "stack": false, 509 | "steppedLine": false, 510 | "targets": [ 511 | { 512 | "alias": "Transition to the BGP session state established for BGP neighbor $bgpneighbors.", 513 | "groupBy": [ 514 | { 515 | "params": [ 516 | "$__interval" 517 | ], 518 | "type": "time" 519 | }, 520 | { 521 | "params": [ 522 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address" 523 | ], 524 | "type": "tag" 525 | }, 526 | { 527 | "params": [ 528 | "none" 529 | ], 530 | "type": "fill" 531 | } 532 | ], 533 | "hide": false, 534 | "measurement": "/bgp/", 535 | "orderByTime": "ASC", 536 | "policy": "default", 537 | "refId": "M", 538 | "resultFormat": "time_series", 539 | "select": [ 540 | [ 541 | { 542 | "params": [ 543 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 544 | ], 545 | "type": "field" 546 | }, 547 | { 548 | "params": [], 549 | "type": "mean" 550 | } 551 | ] 552 | ], 553 | "tags": [ 554 | { 555 | "key": "device", 556 | "operator": "=~", 557 | "value": "/^$devices$/" 558 | }, 559 | { 560 | "condition": "AND", 561 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 562 | "operator": "=~", 563 | "value": "/^$bgpneighbors$/" 564 | } 565 | ] 566 | } 567 | ], 568 | "thresholds": [], 569 | "timeFrom": null, 570 | "timeRegions": [], 571 | "timeShift": null, 572 | "title": "Transitions to the BGP session state established on $devices", 573 | "tooltip": { 574 | "shared": true, 575 | "sort": 0, 576 | "value_type": "individual" 577 | }, 578 | "transparent": true, 579 | "type": "graph", 580 | "xaxis": { 581 | "buckets": null, 582 | "mode": "time", 583 | "name": null, 584 | "show": true, 585 | "values": [] 586 | }, 587 | "yaxes": [ 588 | { 589 | "format": "short", 590 | "label": null, 591 | "logBase": 1, 592 | "max": null, 593 | "min": null, 594 | "show": true 595 | }, 596 | { 597 | "format": "short", 598 | "label": null, 599 | "logBase": 1, 600 | "max": null, 601 | "min": null, 602 | "show": true 603 | } 604 | ], 605 | "yaxis": { 606 | "align": false, 607 | "alignLevel": null 608 | } 609 | }, 610 | { 611 | "aliasColors": {}, 612 | "bars": false, 613 | "dashLength": 10, 614 | "dashes": false, 615 | "description": "Number of BGP prefixes received. \nSelect a device to see how many BGP prefixes it received. \nSelect a neighbor to see how many BGP prefixes the device you selected received from the neighbor you selected", 616 | "fill": 1, 617 | "gridPos": { 618 | "h": 10, 619 | "w": 24, 620 | "x": 0, 621 | "y": 28 622 | }, 623 | "id": 17, 624 | "legend": { 625 | "alignAsTable": true, 626 | "avg": false, 627 | "current": true, 628 | "max": true, 629 | "min": true, 630 | "rightSide": true, 631 | "show": true, 632 | "total": false, 633 | "values": true 634 | }, 635 | "lines": true, 636 | "linewidth": 1, 637 | "links": [], 638 | "minSpan": 11, 639 | "nullPointMode": "null", 640 | "percentage": false, 641 | "pointradius": 5, 642 | "points": false, 643 | "renderer": "flot", 644 | "repeat": "devices", 645 | "repeatDirection": "v", 646 | "scopedVars": { 647 | "devices": { 648 | "selected": true, 649 | "text": "100.123.1.0", 650 | "value": "100.123.1.0" 651 | } 652 | }, 653 | "seriesOverrides": [], 654 | "spaceLength": 10, 655 | "stack": false, 656 | "steppedLine": false, 657 | "targets": [ 658 | { 659 | "alias": "Total number of BGP prefixes received", 660 | "groupBy": [ 661 | { 662 | "params": [ 663 | "$__interval" 664 | ], 665 | "type": "time" 666 | }, 667 | { 668 | "params": [ 669 | "none" 670 | ], 671 | "type": "fill" 672 | } 673 | ], 674 | "measurement": "/bgp/", 675 | "orderByTime": "ASC", 676 | "policy": "default", 677 | "refId": "A", 678 | "resultFormat": "time_series", 679 | "select": [ 680 | [ 681 | { 682 | "params": [ 683 | "/network-instances/network-instance/protocols/protocol/bgp/global/state/total-prefixes" 684 | ], 685 | "type": "field" 686 | }, 687 | { 688 | "params": [], 689 | "type": "mean" 690 | } 691 | ] 692 | ], 693 | "tags": [ 694 | { 695 | "key": "device", 696 | "operator": "=~", 697 | "value": "/^$devices$/" 698 | } 699 | ] 700 | }, 701 | { 702 | "alias": "BGP prefixes received from $bgpneighbors", 703 | "groupBy": [ 704 | { 705 | "params": [ 706 | "$__interval" 707 | ], 708 | "type": "time" 709 | }, 710 | { 711 | "params": [ 712 | "none" 713 | ], 714 | "type": "fill" 715 | } 716 | ], 717 | "measurement": "/bgp/", 718 | "orderByTime": "ASC", 719 | "policy": "default", 720 | "refId": "B", 721 | "resultFormat": "time_series", 722 | "select": [ 723 | [ 724 | { 725 | "params": [ 726 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/total-prefixes" 727 | ], 728 | "type": "field" 729 | }, 730 | { 731 | "params": [], 732 | "type": "mean" 733 | } 734 | ] 735 | ], 736 | "tags": [ 737 | { 738 | "key": "device", 739 | "operator": "=~", 740 | "value": "/^$devices$/" 741 | }, 742 | { 743 | "condition": "AND", 744 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 745 | "operator": "=~", 746 | "value": "/^$bgpneighbors$/" 747 | } 748 | ] 749 | }, 750 | { 751 | "alias": "BGP prefixes accepted from $bgpneighbors", 752 | "groupBy": [ 753 | { 754 | "params": [ 755 | "$__interval" 756 | ], 757 | "type": "time" 758 | }, 759 | { 760 | "params": [ 761 | "none" 762 | ], 763 | "type": "fill" 764 | } 765 | ], 766 | "measurement": "/bgp/", 767 | "orderByTime": "ASC", 768 | "policy": "default", 769 | "refId": "C", 770 | "resultFormat": "time_series", 771 | "select": [ 772 | [ 773 | { 774 | "params": [ 775 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/accepted" 776 | ], 777 | "type": "field" 778 | }, 779 | { 780 | "params": [], 781 | "type": "mean" 782 | } 783 | ] 784 | ], 785 | "tags": [ 786 | { 787 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 788 | "operator": "=~", 789 | "value": "/^$bgpneighbors$/" 790 | }, 791 | { 792 | "condition": "AND", 793 | "key": "device", 794 | "operator": "=~", 795 | "value": "/^$devices$/" 796 | } 797 | ] 798 | }, 799 | { 800 | "alias": "BGP prefixes installed from $bgpneighbors", 801 | "groupBy": [ 802 | { 803 | "params": [ 804 | "$__interval" 805 | ], 806 | "type": "time" 807 | }, 808 | { 809 | "params": [ 810 | "none" 811 | ], 812 | "type": "fill" 813 | } 814 | ], 815 | "measurement": "/bgp/", 816 | "orderByTime": "ASC", 817 | "policy": "default", 818 | "refId": "D", 819 | "resultFormat": "time_series", 820 | "select": [ 821 | [ 822 | { 823 | "params": [ 824 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/installed" 825 | ], 826 | "type": "field" 827 | }, 828 | { 829 | "params": [], 830 | "type": "mean" 831 | } 832 | ] 833 | ], 834 | "tags": [ 835 | { 836 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 837 | "operator": "=~", 838 | "value": "/^$bgpneighbors$/" 839 | }, 840 | { 841 | "condition": "AND", 842 | "key": "device", 843 | "operator": "=~", 844 | "value": "/^$devices$/" 845 | } 846 | ] 847 | } 848 | ], 849 | "thresholds": [], 850 | "timeFrom": null, 851 | "timeRegions": [], 852 | "timeShift": null, 853 | "title": "BGP prefixes received on device $devices", 854 | "tooltip": { 855 | "shared": true, 856 | "sort": 0, 857 | "value_type": "individual" 858 | }, 859 | "transparent": true, 860 | "type": "graph", 861 | "xaxis": { 862 | "buckets": null, 863 | "mode": "time", 864 | "name": null, 865 | "show": true, 866 | "values": [] 867 | }, 868 | "yaxes": [ 869 | { 870 | "format": "short", 871 | "label": null, 872 | "logBase": 1, 873 | "max": null, 874 | "min": null, 875 | "show": true 876 | }, 877 | { 878 | "format": "short", 879 | "label": null, 880 | "logBase": 1, 881 | "max": null, 882 | "min": null, 883 | "show": true 884 | } 885 | ], 886 | "yaxis": { 887 | "align": false, 888 | "alignLevel": null 889 | } 890 | }, 891 | { 892 | "aliasColors": {}, 893 | "bars": false, 894 | "dashLength": 10, 895 | "dashes": false, 896 | "description": "Number of BGP prefixes sent. \nSelect a device to see how many BGP prefixes it sent. \nSelect a neighbor to see how many BGP prefixes the device you selected sent to the neighbor you selected", 897 | "fill": 1, 898 | "gridPos": { 899 | "h": 10, 900 | "w": 24, 901 | "x": 0, 902 | "y": 38 903 | }, 904 | "id": 12, 905 | "legend": { 906 | "alignAsTable": true, 907 | "avg": false, 908 | "current": true, 909 | "max": true, 910 | "min": true, 911 | "rightSide": true, 912 | "show": true, 913 | "total": false, 914 | "values": true 915 | }, 916 | "lines": true, 917 | "linewidth": 1, 918 | "links": [], 919 | "minSpan": 11, 920 | "nullPointMode": "null", 921 | "percentage": false, 922 | "pointradius": 5, 923 | "points": false, 924 | "renderer": "flot", 925 | "repeat": "devices", 926 | "repeatDirection": "v", 927 | "scopedVars": { 928 | "devices": { 929 | "selected": true, 930 | "text": "100.123.1.0", 931 | "value": "100.123.1.0" 932 | } 933 | }, 934 | "seriesOverrides": [], 935 | "spaceLength": 10, 936 | "stack": false, 937 | "steppedLine": false, 938 | "targets": [ 939 | { 940 | "alias": "Total number of BGP prefixes sent", 941 | "groupBy": [ 942 | { 943 | "params": [ 944 | "$__interval" 945 | ], 946 | "type": "time" 947 | }, 948 | { 949 | "params": [ 950 | "none" 951 | ], 952 | "type": "fill" 953 | } 954 | ], 955 | "measurement": "/bgp/", 956 | "orderByTime": "ASC", 957 | "policy": "default", 958 | "refId": "A", 959 | "resultFormat": "time_series", 960 | "select": [ 961 | [ 962 | { 963 | "params": [ 964 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent" 965 | ], 966 | "type": "field" 967 | }, 968 | { 969 | "params": [], 970 | "type": "mean" 971 | } 972 | ] 973 | ], 974 | "tags": [ 975 | { 976 | "key": "device", 977 | "operator": "=~", 978 | "value": "/^$devices$/" 979 | } 980 | ] 981 | }, 982 | { 983 | "alias": "BGP prefixes sent to $bgpneighbors", 984 | "groupBy": [ 985 | { 986 | "params": [ 987 | "$__interval" 988 | ], 989 | "type": "time" 990 | }, 991 | { 992 | "params": [ 993 | "none" 994 | ], 995 | "type": "fill" 996 | } 997 | ], 998 | "measurement": "/bgp/", 999 | "orderByTime": "ASC", 1000 | "policy": "default", 1001 | "refId": "B", 1002 | "resultFormat": "time_series", 1003 | "select": [ 1004 | [ 1005 | { 1006 | "params": [ 1007 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent" 1008 | ], 1009 | "type": "field" 1010 | }, 1011 | { 1012 | "params": [], 1013 | "type": "mean" 1014 | } 1015 | ] 1016 | ], 1017 | "tags": [ 1018 | { 1019 | "key": "device", 1020 | "operator": "=~", 1021 | "value": "/^$devices$/" 1022 | }, 1023 | { 1024 | "condition": "AND", 1025 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1026 | "operator": "=~", 1027 | "value": "/^$bgpneighbors$/" 1028 | } 1029 | ] 1030 | } 1031 | ], 1032 | "thresholds": [], 1033 | "timeFrom": null, 1034 | "timeRegions": [], 1035 | "timeShift": null, 1036 | "title": "BGP prefixes sent from device $devices", 1037 | "tooltip": { 1038 | "shared": true, 1039 | "sort": 0, 1040 | "value_type": "individual" 1041 | }, 1042 | "transparent": true, 1043 | "type": "graph", 1044 | "xaxis": { 1045 | "buckets": null, 1046 | "mode": "time", 1047 | "name": null, 1048 | "show": true, 1049 | "values": [] 1050 | }, 1051 | "yaxes": [ 1052 | { 1053 | "format": "short", 1054 | "label": null, 1055 | "logBase": 1, 1056 | "max": null, 1057 | "min": null, 1058 | "show": true 1059 | }, 1060 | { 1061 | "format": "short", 1062 | "label": null, 1063 | "logBase": 1, 1064 | "max": null, 1065 | "min": null, 1066 | "show": true 1067 | } 1068 | ], 1069 | "yaxis": { 1070 | "align": false, 1071 | "alignLevel": null 1072 | } 1073 | } 1074 | ], 1075 | "refresh": "5s", 1076 | "schemaVersion": 16, 1077 | "style": "dark", 1078 | "tags": [ 1079 | "openconfig", 1080 | "junos", 1081 | "bgp", 1082 | "interfaces" 1083 | ], 1084 | "templating": { 1085 | "list": [ 1086 | { 1087 | "allValue": null, 1088 | "current": { 1089 | "tags": [], 1090 | "text": "100.123.1.0", 1091 | "value": [ 1092 | "100.123.1.0" 1093 | ] 1094 | }, 1095 | "datasource": "influxdb", 1096 | "definition": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"device\"", 1097 | "hide": 0, 1098 | "includeAll": true, 1099 | "label": null, 1100 | "multi": true, 1101 | "name": "devices", 1102 | "options": [], 1103 | "query": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"device\"", 1104 | "refresh": 1, 1105 | "regex": "", 1106 | "skipUrlSync": false, 1107 | "sort": 0, 1108 | "tagValuesQuery": "", 1109 | "tags": [], 1110 | "tagsQuery": "", 1111 | "type": "query", 1112 | "useTags": false 1113 | }, 1114 | { 1115 | "allValue": null, 1116 | "current": { 1117 | "text": "vMX-addr-0", 1118 | "value": "vMX-addr-0" 1119 | }, 1120 | "datasource": "influxdb", 1121 | "definition": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"system_id\"", 1122 | "hide": 2, 1123 | "includeAll": false, 1124 | "label": null, 1125 | "multi": false, 1126 | "name": "hostnames", 1127 | "options": [], 1128 | "query": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"system_id\"", 1129 | "refresh": 1, 1130 | "regex": "", 1131 | "skipUrlSync": false, 1132 | "sort": 0, 1133 | "tagValuesQuery": "", 1134 | "tags": [], 1135 | "tagsQuery": "", 1136 | "type": "query", 1137 | "useTags": false 1138 | }, 1139 | { 1140 | "allValue": null, 1141 | "current": { 1142 | "tags": [], 1143 | "text": "192.168.1.1", 1144 | "value": "192.168.1.1" 1145 | }, 1146 | "datasource": "influxdb", 1147 | "definition": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address\"", 1148 | "hide": 0, 1149 | "includeAll": false, 1150 | "label": null, 1151 | "multi": false, 1152 | "name": "bgpneighbors", 1153 | "options": [], 1154 | "query": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address\"", 1155 | "refresh": 1, 1156 | "regex": "", 1157 | "skipUrlSync": false, 1158 | "sort": 0, 1159 | "tagValuesQuery": "", 1160 | "tags": [], 1161 | "tagsQuery": "", 1162 | "type": "query", 1163 | "useTags": false 1164 | }, 1165 | { 1166 | "allValue": null, 1167 | "current": { 1168 | "tags": [], 1169 | "text": "All", 1170 | "value": [ 1171 | "$__all" 1172 | ] 1173 | }, 1174 | "datasource": "influxdb", 1175 | "definition": "SHOW TAG VALUES FROM \"/interfaces/\" with KEY = \"/interfaces/interface/@name\" ", 1176 | "hide": 0, 1177 | "includeAll": true, 1178 | "label": null, 1179 | "multi": true, 1180 | "name": "interfaces", 1181 | "options": [], 1182 | "query": "SHOW TAG VALUES FROM \"/interfaces/\" with KEY = \"/interfaces/interface/@name\" ", 1183 | "refresh": 1, 1184 | "regex": "/ge|xe-|et-.*/", 1185 | "skipUrlSync": false, 1186 | "sort": 0, 1187 | "tagValuesQuery": "", 1188 | "tags": [], 1189 | "tagsQuery": "", 1190 | "type": "query", 1191 | "useTags": false 1192 | } 1193 | ] 1194 | }, 1195 | "time": { 1196 | "from": "now-5m", 1197 | "to": "now" 1198 | }, 1199 | "timepicker": { 1200 | "refresh_intervals": [ 1201 | "5s", 1202 | "10s", 1203 | "30s", 1204 | "1m", 1205 | "5m", 1206 | "15m", 1207 | "30m", 1208 | "1h", 1209 | "2h", 1210 | "1d" 1211 | ], 1212 | "time_options": [ 1213 | "5m", 1214 | "15m", 1215 | "1h", 1216 | "6h", 1217 | "12h", 1218 | "24h", 1219 | "2d", 1220 | "7d", 1221 | "30d" 1222 | ] 1223 | }, 1224 | "timezone": "", 1225 | "title": "openconfig", 1226 | "uid": "7fZJetsik", 1227 | "version": 1 1228 | } 1229 | -------------------------------------------------------------------------------- /dashboards/openconfig_BGP_with_hardcoded_queries.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "-- Grafana --", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "type": "dashboard" 12 | } 13 | ] 14 | }, 15 | "editable": true, 16 | "gnetId": null, 17 | "graphTooltip": 0, 18 | "id": 4, 19 | "iteration": 1545555883372, 20 | "links": [], 21 | "panels": [ 22 | { 23 | "aliasColors": {}, 24 | "bars": false, 25 | "dashLength": 10, 26 | "dashes": false, 27 | "description": "For each device, the number of EBGP peers configured. \nThe devices are hardcoded in the queries.", 28 | "fill": 1, 29 | "gridPos": { 30 | "h": 9, 31 | "w": 12, 32 | "x": 0, 33 | "y": 0 34 | }, 35 | "id": 10, 36 | "legend": { 37 | "avg": false, 38 | "current": false, 39 | "max": false, 40 | "min": false, 41 | "show": true, 42 | "total": false, 43 | "values": false 44 | }, 45 | "lines": true, 46 | "linewidth": 1, 47 | "links": [], 48 | "nullPointMode": "null", 49 | "percentage": false, 50 | "pointradius": 5, 51 | "points": false, 52 | "renderer": "flot", 53 | "seriesOverrides": [], 54 | "spaceLength": 10, 55 | "stack": false, 56 | "steppedLine": false, 57 | "targets": [ 58 | { 59 | "alias": "device 100.123.1.0", 60 | "groupBy": [ 61 | { 62 | "params": [ 63 | "$__interval" 64 | ], 65 | "type": "time" 66 | }, 67 | { 68 | "params": [ 69 | "none" 70 | ], 71 | "type": "fill" 72 | } 73 | ], 74 | "measurement": "/bgp/", 75 | "orderByTime": "ASC", 76 | "policy": "default", 77 | "refId": "A", 78 | "resultFormat": "time_series", 79 | "select": [ 80 | [ 81 | { 82 | "params": [ 83 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 84 | ], 85 | "type": "field" 86 | }, 87 | { 88 | "params": [], 89 | "type": "count" 90 | } 91 | ] 92 | ], 93 | "tags": [ 94 | { 95 | "key": "device", 96 | "operator": "=", 97 | "value": "100.123.1.0" 98 | }, 99 | { 100 | "condition": "AND", 101 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 102 | "operator": "=", 103 | "value": "EXTERNAL" 104 | } 105 | ] 106 | }, 107 | { 108 | "alias": "device 100.123.1.1", 109 | "groupBy": [ 110 | { 111 | "params": [ 112 | "$__interval" 113 | ], 114 | "type": "time" 115 | }, 116 | { 117 | "params": [ 118 | "none" 119 | ], 120 | "type": "fill" 121 | } 122 | ], 123 | "measurement": "/bgp/", 124 | "orderByTime": "ASC", 125 | "policy": "default", 126 | "refId": "B", 127 | "resultFormat": "time_series", 128 | "select": [ 129 | [ 130 | { 131 | "params": [ 132 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 133 | ], 134 | "type": "field" 135 | }, 136 | { 137 | "params": [], 138 | "type": "count" 139 | } 140 | ] 141 | ], 142 | "tags": [ 143 | { 144 | "key": "device", 145 | "operator": "=", 146 | "value": "100.123.1.1" 147 | }, 148 | { 149 | "condition": "AND", 150 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 151 | "operator": "=", 152 | "value": "EXTERNAL" 153 | } 154 | ] 155 | }, 156 | { 157 | "alias": "device 100.123.1.2", 158 | "groupBy": [ 159 | { 160 | "params": [ 161 | "$__interval" 162 | ], 163 | "type": "time" 164 | }, 165 | { 166 | "params": [ 167 | "none" 168 | ], 169 | "type": "fill" 170 | } 171 | ], 172 | "measurement": "/bgp/", 173 | "orderByTime": "ASC", 174 | "policy": "default", 175 | "refId": "C", 176 | "resultFormat": "time_series", 177 | "select": [ 178 | [ 179 | { 180 | "params": [ 181 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 182 | ], 183 | "type": "field" 184 | }, 185 | { 186 | "params": [], 187 | "type": "count" 188 | } 189 | ] 190 | ], 191 | "tags": [ 192 | { 193 | "key": "device", 194 | "operator": "=", 195 | "value": "100.123.1.2" 196 | }, 197 | { 198 | "condition": "AND", 199 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 200 | "operator": "=", 201 | "value": "EXTERNAL" 202 | } 203 | ] 204 | }, 205 | { 206 | "alias": "device 100.123.1.4", 207 | "groupBy": [ 208 | { 209 | "params": [ 210 | "$__interval" 211 | ], 212 | "type": "time" 213 | }, 214 | { 215 | "params": [ 216 | "none" 217 | ], 218 | "type": "fill" 219 | } 220 | ], 221 | "measurement": "/bgp/", 222 | "orderByTime": "ASC", 223 | "policy": "default", 224 | "refId": "D", 225 | "resultFormat": "time_series", 226 | "select": [ 227 | [ 228 | { 229 | "params": [ 230 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 231 | ], 232 | "type": "field" 233 | }, 234 | { 235 | "params": [], 236 | "type": "count" 237 | } 238 | ] 239 | ], 240 | "tags": [ 241 | { 242 | "key": "device", 243 | "operator": "=", 244 | "value": "100.123.1.4" 245 | }, 246 | { 247 | "condition": "AND", 248 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 249 | "operator": "=", 250 | "value": "EXTERNAL" 251 | } 252 | ] 253 | }, 254 | { 255 | "alias": "device 100.123.1.5", 256 | "groupBy": [ 257 | { 258 | "params": [ 259 | "$__interval" 260 | ], 261 | "type": "time" 262 | }, 263 | { 264 | "params": [ 265 | "none" 266 | ], 267 | "type": "fill" 268 | } 269 | ], 270 | "measurement": "/bgp/", 271 | "orderByTime": "ASC", 272 | "policy": "default", 273 | "refId": "E", 274 | "resultFormat": "time_series", 275 | "select": [ 276 | [ 277 | { 278 | "params": [ 279 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 280 | ], 281 | "type": "field" 282 | }, 283 | { 284 | "params": [], 285 | "type": "count" 286 | } 287 | ] 288 | ], 289 | "tags": [ 290 | { 291 | "key": "device", 292 | "operator": "=", 293 | "value": "100.123.1.5" 294 | }, 295 | { 296 | "condition": "AND", 297 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 298 | "operator": "=", 299 | "value": "EXTERNAL" 300 | } 301 | ] 302 | }, 303 | { 304 | "alias": "device 100.123.1.6", 305 | "groupBy": [ 306 | { 307 | "params": [ 308 | "$__interval" 309 | ], 310 | "type": "time" 311 | }, 312 | { 313 | "params": [ 314 | "none" 315 | ], 316 | "type": "fill" 317 | } 318 | ], 319 | "measurement": "/bgp/", 320 | "orderByTime": "ASC", 321 | "policy": "default", 322 | "refId": "F", 323 | "resultFormat": "time_series", 324 | "select": [ 325 | [ 326 | { 327 | "params": [ 328 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type" 329 | ], 330 | "type": "field" 331 | }, 332 | { 333 | "params": [], 334 | "type": "count" 335 | } 336 | ] 337 | ], 338 | "tags": [ 339 | { 340 | "key": "device", 341 | "operator": "=", 342 | "value": "100.123.1.6" 343 | }, 344 | { 345 | "condition": "AND", 346 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type", 347 | "operator": "=", 348 | "value": "EXTERNAL" 349 | } 350 | ] 351 | } 352 | ], 353 | "thresholds": [], 354 | "timeFrom": null, 355 | "timeRegions": [], 356 | "timeShift": null, 357 | "title": "EBGP peers configured", 358 | "tooltip": { 359 | "shared": true, 360 | "sort": 0, 361 | "value_type": "individual" 362 | }, 363 | "type": "graph", 364 | "xaxis": { 365 | "buckets": null, 366 | "mode": "time", 367 | "name": null, 368 | "show": true, 369 | "values": [] 370 | }, 371 | "yaxes": [ 372 | { 373 | "format": "short", 374 | "label": null, 375 | "logBase": 1, 376 | "max": null, 377 | "min": null, 378 | "show": true 379 | }, 380 | { 381 | "format": "short", 382 | "label": null, 383 | "logBase": 1, 384 | "max": null, 385 | "min": null, 386 | "show": true 387 | } 388 | ], 389 | "yaxis": { 390 | "align": false, 391 | "alignLevel": null 392 | } 393 | }, 394 | { 395 | "aliasColors": {}, 396 | "bars": false, 397 | "dashLength": 10, 398 | "dashes": false, 399 | "description": "For each device, the number of BGP sessions state established. \nThe devices are hardcoded in the queries.", 400 | "fill": 1, 401 | "gridPos": { 402 | "h": 9, 403 | "w": 12, 404 | "x": 12, 405 | "y": 0 406 | }, 407 | "id": 8, 408 | "legend": { 409 | "avg": false, 410 | "current": false, 411 | "max": false, 412 | "min": false, 413 | "show": true, 414 | "total": false, 415 | "values": false 416 | }, 417 | "lines": true, 418 | "linewidth": 1, 419 | "links": [], 420 | "nullPointMode": "null", 421 | "percentage": false, 422 | "pointradius": 5, 423 | "points": false, 424 | "renderer": "flot", 425 | "seriesOverrides": [], 426 | "spaceLength": 10, 427 | "stack": false, 428 | "steppedLine": false, 429 | "targets": [ 430 | { 431 | "alias": "device 100.123.1.0", 432 | "groupBy": [ 433 | { 434 | "params": [ 435 | "$__interval" 436 | ], 437 | "type": "time" 438 | }, 439 | { 440 | "params": [ 441 | "none" 442 | ], 443 | "type": "fill" 444 | } 445 | ], 446 | "measurement": "/bgp/", 447 | "orderByTime": "ASC", 448 | "policy": "default", 449 | "refId": "A", 450 | "resultFormat": "time_series", 451 | "select": [ 452 | [ 453 | { 454 | "params": [ 455 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 456 | ], 457 | "type": "field" 458 | }, 459 | { 460 | "params": [], 461 | "type": "count" 462 | } 463 | ] 464 | ], 465 | "tags": [ 466 | { 467 | "key": "device", 468 | "operator": "=", 469 | "value": "100.123.1.0" 470 | }, 471 | { 472 | "condition": "AND", 473 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state", 474 | "operator": "=", 475 | "value": "ESTABLISHED" 476 | } 477 | ] 478 | }, 479 | { 480 | "alias": "device 100.123.1.1", 481 | "groupBy": [ 482 | { 483 | "params": [ 484 | "$__interval" 485 | ], 486 | "type": "time" 487 | }, 488 | { 489 | "params": [ 490 | "none" 491 | ], 492 | "type": "fill" 493 | } 494 | ], 495 | "measurement": "/bgp/", 496 | "orderByTime": "ASC", 497 | "policy": "default", 498 | "refId": "B", 499 | "resultFormat": "time_series", 500 | "select": [ 501 | [ 502 | { 503 | "params": [ 504 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 505 | ], 506 | "type": "field" 507 | }, 508 | { 509 | "params": [], 510 | "type": "count" 511 | } 512 | ] 513 | ], 514 | "tags": [ 515 | { 516 | "key": "device", 517 | "operator": "=", 518 | "value": "100.123.1.1" 519 | }, 520 | { 521 | "condition": "AND", 522 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state", 523 | "operator": "=", 524 | "value": "ESTABLISHED" 525 | } 526 | ] 527 | }, 528 | { 529 | "alias": "device 100.123.1.2", 530 | "groupBy": [ 531 | { 532 | "params": [ 533 | "$__interval" 534 | ], 535 | "type": "time" 536 | }, 537 | { 538 | "params": [ 539 | "none" 540 | ], 541 | "type": "fill" 542 | } 543 | ], 544 | "measurement": "/bgp/", 545 | "orderByTime": "ASC", 546 | "policy": "default", 547 | "refId": "C", 548 | "resultFormat": "time_series", 549 | "select": [ 550 | [ 551 | { 552 | "params": [ 553 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 554 | ], 555 | "type": "field" 556 | }, 557 | { 558 | "params": [], 559 | "type": "count" 560 | } 561 | ] 562 | ], 563 | "tags": [ 564 | { 565 | "key": "device", 566 | "operator": "=", 567 | "value": "100.123.1.2" 568 | }, 569 | { 570 | "condition": "AND", 571 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state", 572 | "operator": "=", 573 | "value": "ESTABLISHED" 574 | } 575 | ] 576 | }, 577 | { 578 | "alias": "device 100.123.1.4", 579 | "groupBy": [ 580 | { 581 | "params": [ 582 | "$__interval" 583 | ], 584 | "type": "time" 585 | }, 586 | { 587 | "params": [ 588 | "none" 589 | ], 590 | "type": "fill" 591 | } 592 | ], 593 | "measurement": "/bgp/", 594 | "orderByTime": "ASC", 595 | "policy": "default", 596 | "refId": "D", 597 | "resultFormat": "time_series", 598 | "select": [ 599 | [ 600 | { 601 | "params": [ 602 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 603 | ], 604 | "type": "field" 605 | }, 606 | { 607 | "params": [], 608 | "type": "count" 609 | } 610 | ] 611 | ], 612 | "tags": [ 613 | { 614 | "key": "device", 615 | "operator": "=", 616 | "value": "100.123.1.4" 617 | }, 618 | { 619 | "condition": "AND", 620 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state", 621 | "operator": "=", 622 | "value": "ESTABLISHED" 623 | } 624 | ] 625 | }, 626 | { 627 | "alias": "device 100.123.1.5", 628 | "groupBy": [ 629 | { 630 | "params": [ 631 | "$__interval" 632 | ], 633 | "type": "time" 634 | }, 635 | { 636 | "params": [ 637 | "none" 638 | ], 639 | "type": "fill" 640 | } 641 | ], 642 | "measurement": "/bgp/", 643 | "orderByTime": "ASC", 644 | "policy": "default", 645 | "refId": "E", 646 | "resultFormat": "time_series", 647 | "select": [ 648 | [ 649 | { 650 | "params": [ 651 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 652 | ], 653 | "type": "field" 654 | }, 655 | { 656 | "params": [], 657 | "type": "count" 658 | } 659 | ] 660 | ], 661 | "tags": [ 662 | { 663 | "key": "device", 664 | "operator": "=", 665 | "value": "100.123.1.5" 666 | }, 667 | { 668 | "condition": "AND", 669 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state", 670 | "operator": "=", 671 | "value": "ESTABLISHED" 672 | } 673 | ] 674 | }, 675 | { 676 | "alias": "device 100.123.1.6", 677 | "groupBy": [ 678 | { 679 | "params": [ 680 | "$__interval" 681 | ], 682 | "type": "time" 683 | }, 684 | { 685 | "params": [ 686 | "none" 687 | ], 688 | "type": "fill" 689 | } 690 | ], 691 | "measurement": "/bgp/", 692 | "orderByTime": "ASC", 693 | "policy": "default", 694 | "refId": "F", 695 | "resultFormat": "time_series", 696 | "select": [ 697 | [ 698 | { 699 | "params": [ 700 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state" 701 | ], 702 | "type": "field" 703 | }, 704 | { 705 | "params": [], 706 | "type": "count" 707 | } 708 | ] 709 | ], 710 | "tags": [ 711 | { 712 | "key": "device", 713 | "operator": "=", 714 | "value": "100.123.1.6" 715 | }, 716 | { 717 | "condition": "AND", 718 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state", 719 | "operator": "=", 720 | "value": "ESTABLISHED" 721 | } 722 | ] 723 | } 724 | ], 725 | "thresholds": [], 726 | "timeFrom": null, 727 | "timeRegions": [], 728 | "timeShift": null, 729 | "title": "BGP sessions state established", 730 | "tooltip": { 731 | "shared": true, 732 | "sort": 0, 733 | "value_type": "individual" 734 | }, 735 | "type": "graph", 736 | "xaxis": { 737 | "buckets": null, 738 | "mode": "time", 739 | "name": null, 740 | "show": true, 741 | "values": [] 742 | }, 743 | "yaxes": [ 744 | { 745 | "format": "short", 746 | "label": null, 747 | "logBase": 1, 748 | "max": null, 749 | "min": null, 750 | "show": true 751 | }, 752 | { 753 | "format": "short", 754 | "label": null, 755 | "logBase": 1, 756 | "max": null, 757 | "min": null, 758 | "show": true 759 | } 760 | ], 761 | "yaxis": { 762 | "align": false, 763 | "alignLevel": null 764 | } 765 | }, 766 | { 767 | "aliasColors": {}, 768 | "bars": false, 769 | "dashLength": 10, 770 | "dashes": false, 771 | "description": "The number of transitions to the BGP session state established . \nSelect a device. \nThe neighbors are hardcoded in the queries", 772 | "fill": 1, 773 | "gridPos": { 774 | "h": 9, 775 | "w": 12, 776 | "x": 0, 777 | "y": 9 778 | }, 779 | "id": 6, 780 | "legend": { 781 | "avg": false, 782 | "current": false, 783 | "max": false, 784 | "min": false, 785 | "show": true, 786 | "total": false, 787 | "values": false 788 | }, 789 | "lines": true, 790 | "linewidth": 1, 791 | "links": [], 792 | "nullPointMode": "null", 793 | "percentage": false, 794 | "pointradius": 5, 795 | "points": false, 796 | "renderer": "flot", 797 | "seriesOverrides": [], 798 | "spaceLength": 10, 799 | "stack": false, 800 | "steppedLine": false, 801 | "targets": [ 802 | { 803 | "alias": "for the neighbor 192.168.1.1", 804 | "groupBy": [ 805 | { 806 | "params": [ 807 | "$__interval" 808 | ], 809 | "type": "time" 810 | }, 811 | { 812 | "params": [ 813 | "none" 814 | ], 815 | "type": "fill" 816 | } 817 | ], 818 | "hide": false, 819 | "measurement": "/bgp/", 820 | "orderByTime": "ASC", 821 | "policy": "default", 822 | "refId": "C", 823 | "resultFormat": "time_series", 824 | "select": [ 825 | [ 826 | { 827 | "params": [ 828 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 829 | ], 830 | "type": "field" 831 | }, 832 | { 833 | "params": [], 834 | "type": "mean" 835 | } 836 | ] 837 | ], 838 | "tags": [ 839 | { 840 | "key": "device", 841 | "operator": "=~", 842 | "value": "/^$devices$/" 843 | }, 844 | { 845 | "condition": "AND", 846 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 847 | "operator": "=", 848 | "value": "192.168.1.1" 849 | } 850 | ] 851 | }, 852 | { 853 | "alias": "for the neighbor 192.168.1.3", 854 | "groupBy": [ 855 | { 856 | "params": [ 857 | "$__interval" 858 | ], 859 | "type": "time" 860 | }, 861 | { 862 | "params": [ 863 | "none" 864 | ], 865 | "type": "fill" 866 | } 867 | ], 868 | "hide": false, 869 | "measurement": "/bgp/", 870 | "orderByTime": "ASC", 871 | "policy": "default", 872 | "refId": "B", 873 | "resultFormat": "time_series", 874 | "select": [ 875 | [ 876 | { 877 | "params": [ 878 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 879 | ], 880 | "type": "field" 881 | }, 882 | { 883 | "params": [], 884 | "type": "mean" 885 | } 886 | ] 887 | ], 888 | "tags": [ 889 | { 890 | "key": "device", 891 | "operator": "=~", 892 | "value": "/^$devices$/" 893 | }, 894 | { 895 | "condition": "AND", 896 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 897 | "operator": "=", 898 | "value": "192.168.1.3" 899 | } 900 | ] 901 | }, 902 | { 903 | "alias": "for the neighbor 192.168.1.5", 904 | "groupBy": [ 905 | { 906 | "params": [ 907 | "$__interval" 908 | ], 909 | "type": "time" 910 | }, 911 | { 912 | "params": [ 913 | "none" 914 | ], 915 | "type": "fill" 916 | } 917 | ], 918 | "hide": false, 919 | "measurement": "/bgp/", 920 | "orderByTime": "ASC", 921 | "policy": "default", 922 | "refId": "A", 923 | "resultFormat": "time_series", 924 | "select": [ 925 | [ 926 | { 927 | "params": [ 928 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 929 | ], 930 | "type": "field" 931 | }, 932 | { 933 | "params": [], 934 | "type": "mean" 935 | } 936 | ] 937 | ], 938 | "tags": [ 939 | { 940 | "key": "device", 941 | "operator": "=~", 942 | "value": "/^$devices$/" 943 | }, 944 | { 945 | "condition": "AND", 946 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 947 | "operator": "=", 948 | "value": "192.168.1.5" 949 | } 950 | ] 951 | }, 952 | { 953 | "alias": "for the neighbor 192.168.1.7", 954 | "groupBy": [ 955 | { 956 | "params": [ 957 | "$__interval" 958 | ], 959 | "type": "time" 960 | }, 961 | { 962 | "params": [ 963 | "none" 964 | ], 965 | "type": "fill" 966 | } 967 | ], 968 | "hide": false, 969 | "measurement": "/bgp/", 970 | "orderByTime": "ASC", 971 | "policy": "default", 972 | "refId": "E", 973 | "resultFormat": "time_series", 974 | "select": [ 975 | [ 976 | { 977 | "params": [ 978 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 979 | ], 980 | "type": "field" 981 | }, 982 | { 983 | "params": [], 984 | "type": "mean" 985 | } 986 | ] 987 | ], 988 | "tags": [ 989 | { 990 | "key": "device", 991 | "operator": "=~", 992 | "value": "/^$devices$/" 993 | }, 994 | { 995 | "condition": "AND", 996 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 997 | "operator": "=", 998 | "value": "192.168.1.7" 999 | } 1000 | ] 1001 | }, 1002 | { 1003 | "alias": "for the neighbor 192.168.2.1", 1004 | "groupBy": [ 1005 | { 1006 | "params": [ 1007 | "$__interval" 1008 | ], 1009 | "type": "time" 1010 | }, 1011 | { 1012 | "params": [ 1013 | "none" 1014 | ], 1015 | "type": "fill" 1016 | } 1017 | ], 1018 | "hide": false, 1019 | "measurement": "/bgp/", 1020 | "orderByTime": "ASC", 1021 | "policy": "default", 1022 | "refId": "D", 1023 | "resultFormat": "time_series", 1024 | "select": [ 1025 | [ 1026 | { 1027 | "params": [ 1028 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1029 | ], 1030 | "type": "field" 1031 | }, 1032 | { 1033 | "params": [], 1034 | "type": "mean" 1035 | } 1036 | ] 1037 | ], 1038 | "tags": [ 1039 | { 1040 | "key": "device", 1041 | "operator": "=~", 1042 | "value": "/^$devices$/" 1043 | }, 1044 | { 1045 | "condition": "AND", 1046 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1047 | "operator": "=", 1048 | "value": "192.168.2.1" 1049 | } 1050 | ] 1051 | }, 1052 | { 1053 | "alias": "for the neighbor 192.168.2.3", 1054 | "groupBy": [ 1055 | { 1056 | "params": [ 1057 | "$__interval" 1058 | ], 1059 | "type": "time" 1060 | }, 1061 | { 1062 | "params": [ 1063 | "none" 1064 | ], 1065 | "type": "fill" 1066 | } 1067 | ], 1068 | "hide": false, 1069 | "measurement": "/bgp/", 1070 | "orderByTime": "ASC", 1071 | "policy": "default", 1072 | "refId": "F", 1073 | "resultFormat": "time_series", 1074 | "select": [ 1075 | [ 1076 | { 1077 | "params": [ 1078 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1079 | ], 1080 | "type": "field" 1081 | }, 1082 | { 1083 | "params": [], 1084 | "type": "mean" 1085 | } 1086 | ] 1087 | ], 1088 | "tags": [ 1089 | { 1090 | "key": "device", 1091 | "operator": "=~", 1092 | "value": "/^$devices$/" 1093 | }, 1094 | { 1095 | "condition": "AND", 1096 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1097 | "operator": "=", 1098 | "value": "192.168.2.3" 1099 | } 1100 | ] 1101 | }, 1102 | { 1103 | "alias": "for the neighbor 192.168.2.5", 1104 | "groupBy": [ 1105 | { 1106 | "params": [ 1107 | "$__interval" 1108 | ], 1109 | "type": "time" 1110 | }, 1111 | { 1112 | "params": [ 1113 | "none" 1114 | ], 1115 | "type": "fill" 1116 | } 1117 | ], 1118 | "hide": false, 1119 | "measurement": "/bgp/", 1120 | "orderByTime": "ASC", 1121 | "policy": "default", 1122 | "refId": "G", 1123 | "resultFormat": "time_series", 1124 | "select": [ 1125 | [ 1126 | { 1127 | "params": [ 1128 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1129 | ], 1130 | "type": "field" 1131 | }, 1132 | { 1133 | "params": [], 1134 | "type": "mean" 1135 | } 1136 | ] 1137 | ], 1138 | "tags": [ 1139 | { 1140 | "key": "device", 1141 | "operator": "=~", 1142 | "value": "/^$devices$/" 1143 | }, 1144 | { 1145 | "condition": "AND", 1146 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1147 | "operator": "=", 1148 | "value": "192.168.2.5" 1149 | } 1150 | ] 1151 | }, 1152 | { 1153 | "alias": "for the neighbor 192.168.2.7", 1154 | "groupBy": [ 1155 | { 1156 | "params": [ 1157 | "$__interval" 1158 | ], 1159 | "type": "time" 1160 | }, 1161 | { 1162 | "params": [ 1163 | "none" 1164 | ], 1165 | "type": "fill" 1166 | } 1167 | ], 1168 | "hide": false, 1169 | "measurement": "/bgp/", 1170 | "orderByTime": "ASC", 1171 | "policy": "default", 1172 | "refId": "H", 1173 | "resultFormat": "time_series", 1174 | "select": [ 1175 | [ 1176 | { 1177 | "params": [ 1178 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1179 | ], 1180 | "type": "field" 1181 | }, 1182 | { 1183 | "params": [], 1184 | "type": "mean" 1185 | } 1186 | ] 1187 | ], 1188 | "tags": [ 1189 | { 1190 | "key": "device", 1191 | "operator": "=~", 1192 | "value": "/^$devices$/" 1193 | }, 1194 | { 1195 | "condition": "AND", 1196 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1197 | "operator": "=", 1198 | "value": "192.168.2.7" 1199 | } 1200 | ] 1201 | }, 1202 | { 1203 | "alias": "for the neighbor 192.168.3.1", 1204 | "groupBy": [ 1205 | { 1206 | "params": [ 1207 | "$__interval" 1208 | ], 1209 | "type": "time" 1210 | }, 1211 | { 1212 | "params": [ 1213 | "none" 1214 | ], 1215 | "type": "fill" 1216 | } 1217 | ], 1218 | "hide": false, 1219 | "measurement": "/bgp/", 1220 | "orderByTime": "ASC", 1221 | "policy": "default", 1222 | "refId": "I", 1223 | "resultFormat": "time_series", 1224 | "select": [ 1225 | [ 1226 | { 1227 | "params": [ 1228 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1229 | ], 1230 | "type": "field" 1231 | }, 1232 | { 1233 | "params": [], 1234 | "type": "mean" 1235 | } 1236 | ] 1237 | ], 1238 | "tags": [ 1239 | { 1240 | "key": "device", 1241 | "operator": "=~", 1242 | "value": "/^$devices$/" 1243 | }, 1244 | { 1245 | "condition": "AND", 1246 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1247 | "operator": "=", 1248 | "value": "192.168.3.1" 1249 | } 1250 | ] 1251 | }, 1252 | { 1253 | "alias": "for the neighbor 192.168.3.3", 1254 | "groupBy": [ 1255 | { 1256 | "params": [ 1257 | "$__interval" 1258 | ], 1259 | "type": "time" 1260 | }, 1261 | { 1262 | "params": [ 1263 | "none" 1264 | ], 1265 | "type": "fill" 1266 | } 1267 | ], 1268 | "hide": false, 1269 | "measurement": "/bgp/", 1270 | "orderByTime": "ASC", 1271 | "policy": "default", 1272 | "refId": "J", 1273 | "resultFormat": "time_series", 1274 | "select": [ 1275 | [ 1276 | { 1277 | "params": [ 1278 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1279 | ], 1280 | "type": "field" 1281 | }, 1282 | { 1283 | "params": [], 1284 | "type": "mean" 1285 | } 1286 | ] 1287 | ], 1288 | "tags": [ 1289 | { 1290 | "key": "device", 1291 | "operator": "=~", 1292 | "value": "/^$devices$/" 1293 | }, 1294 | { 1295 | "condition": "AND", 1296 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1297 | "operator": "=", 1298 | "value": "192.168.3.3" 1299 | } 1300 | ] 1301 | }, 1302 | { 1303 | "alias": "for the neighbor 192.168.3.5", 1304 | "groupBy": [ 1305 | { 1306 | "params": [ 1307 | "$__interval" 1308 | ], 1309 | "type": "time" 1310 | }, 1311 | { 1312 | "params": [ 1313 | "none" 1314 | ], 1315 | "type": "fill" 1316 | } 1317 | ], 1318 | "hide": false, 1319 | "measurement": "/bgp/", 1320 | "orderByTime": "ASC", 1321 | "policy": "default", 1322 | "refId": "K", 1323 | "resultFormat": "time_series", 1324 | "select": [ 1325 | [ 1326 | { 1327 | "params": [ 1328 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1329 | ], 1330 | "type": "field" 1331 | }, 1332 | { 1333 | "params": [], 1334 | "type": "mean" 1335 | } 1336 | ] 1337 | ], 1338 | "tags": [ 1339 | { 1340 | "key": "device", 1341 | "operator": "=~", 1342 | "value": "/^$devices$/" 1343 | }, 1344 | { 1345 | "condition": "AND", 1346 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1347 | "operator": "=", 1348 | "value": "192.168.3.5" 1349 | } 1350 | ] 1351 | }, 1352 | { 1353 | "alias": "for the neighbor 192.168.3.7", 1354 | "groupBy": [ 1355 | { 1356 | "params": [ 1357 | "$__interval" 1358 | ], 1359 | "type": "time" 1360 | }, 1361 | { 1362 | "params": [ 1363 | "none" 1364 | ], 1365 | "type": "fill" 1366 | } 1367 | ], 1368 | "hide": false, 1369 | "measurement": "/bgp/", 1370 | "orderByTime": "ASC", 1371 | "policy": "default", 1372 | "refId": "L", 1373 | "resultFormat": "time_series", 1374 | "select": [ 1375 | [ 1376 | { 1377 | "params": [ 1378 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1379 | ], 1380 | "type": "field" 1381 | }, 1382 | { 1383 | "params": [], 1384 | "type": "mean" 1385 | } 1386 | ] 1387 | ], 1388 | "tags": [ 1389 | { 1390 | "key": "device", 1391 | "operator": "=~", 1392 | "value": "/^$devices$/" 1393 | }, 1394 | { 1395 | "condition": "AND", 1396 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1397 | "operator": "=", 1398 | "value": "192.168.3.7" 1399 | } 1400 | ] 1401 | } 1402 | ], 1403 | "thresholds": [], 1404 | "timeFrom": null, 1405 | "timeRegions": [], 1406 | "timeShift": null, 1407 | "title": "Transitions to the BGP session state established (hardcoded neighbors)", 1408 | "tooltip": { 1409 | "shared": true, 1410 | "sort": 0, 1411 | "value_type": "individual" 1412 | }, 1413 | "type": "graph", 1414 | "xaxis": { 1415 | "buckets": null, 1416 | "mode": "time", 1417 | "name": null, 1418 | "show": true, 1419 | "values": [] 1420 | }, 1421 | "yaxes": [ 1422 | { 1423 | "format": "short", 1424 | "label": null, 1425 | "logBase": 1, 1426 | "max": null, 1427 | "min": null, 1428 | "show": true 1429 | }, 1430 | { 1431 | "format": "short", 1432 | "label": null, 1433 | "logBase": 1, 1434 | "max": null, 1435 | "min": null, 1436 | "show": true 1437 | } 1438 | ], 1439 | "yaxis": { 1440 | "align": false, 1441 | "alignLevel": null 1442 | } 1443 | }, 1444 | { 1445 | "aliasColors": {}, 1446 | "bars": false, 1447 | "dashLength": 10, 1448 | "dashes": false, 1449 | "description": "The number of transitions to the BGP session state established . \nHardcoded for device 100.123.1.0 only \nThe neighbors are hardcoded in the queries", 1450 | "fill": 1, 1451 | "gridPos": { 1452 | "h": 9, 1453 | "w": 12, 1454 | "x": 12, 1455 | "y": 9 1456 | }, 1457 | "id": 4, 1458 | "legend": { 1459 | "avg": false, 1460 | "current": false, 1461 | "max": false, 1462 | "min": false, 1463 | "show": true, 1464 | "total": false, 1465 | "values": false 1466 | }, 1467 | "lines": true, 1468 | "linewidth": 1, 1469 | "links": [], 1470 | "nullPointMode": "null", 1471 | "percentage": false, 1472 | "pointradius": 5, 1473 | "points": false, 1474 | "renderer": "flot", 1475 | "seriesOverrides": [], 1476 | "spaceLength": 10, 1477 | "stack": false, 1478 | "steppedLine": false, 1479 | "targets": [ 1480 | { 1481 | "alias": "for the neighbor 192.168.1.1", 1482 | "groupBy": [ 1483 | { 1484 | "params": [ 1485 | "$__interval" 1486 | ], 1487 | "type": "time" 1488 | }, 1489 | { 1490 | "params": [ 1491 | "none" 1492 | ], 1493 | "type": "fill" 1494 | } 1495 | ], 1496 | "hide": false, 1497 | "measurement": "/bgp/", 1498 | "orderByTime": "ASC", 1499 | "policy": "default", 1500 | "refId": "A", 1501 | "resultFormat": "time_series", 1502 | "select": [ 1503 | [ 1504 | { 1505 | "params": [ 1506 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1507 | ], 1508 | "type": "field" 1509 | }, 1510 | { 1511 | "params": [], 1512 | "type": "mean" 1513 | } 1514 | ] 1515 | ], 1516 | "tags": [ 1517 | { 1518 | "key": "device", 1519 | "operator": "=", 1520 | "value": "100.123.1.0" 1521 | }, 1522 | { 1523 | "condition": "AND", 1524 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1525 | "operator": "=", 1526 | "value": "192.168.1.1" 1527 | } 1528 | ] 1529 | }, 1530 | { 1531 | "alias": "for the neighbor 192.168.1.3", 1532 | "groupBy": [ 1533 | { 1534 | "params": [ 1535 | "$__interval" 1536 | ], 1537 | "type": "time" 1538 | }, 1539 | { 1540 | "params": [ 1541 | "none" 1542 | ], 1543 | "type": "fill" 1544 | } 1545 | ], 1546 | "hide": false, 1547 | "measurement": "/bgp/", 1548 | "orderByTime": "ASC", 1549 | "policy": "default", 1550 | "refId": "B", 1551 | "resultFormat": "time_series", 1552 | "select": [ 1553 | [ 1554 | { 1555 | "params": [ 1556 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1557 | ], 1558 | "type": "field" 1559 | }, 1560 | { 1561 | "params": [], 1562 | "type": "mean" 1563 | } 1564 | ] 1565 | ], 1566 | "tags": [ 1567 | { 1568 | "key": "device", 1569 | "operator": "=", 1570 | "value": "100.123.1.0" 1571 | }, 1572 | { 1573 | "condition": "AND", 1574 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1575 | "operator": "=", 1576 | "value": "192.168.1.3" 1577 | } 1578 | ] 1579 | }, 1580 | { 1581 | "alias": "for the neighbor 192.168.1.5", 1582 | "groupBy": [ 1583 | { 1584 | "params": [ 1585 | "$__interval" 1586 | ], 1587 | "type": "time" 1588 | }, 1589 | { 1590 | "params": [ 1591 | "none" 1592 | ], 1593 | "type": "fill" 1594 | } 1595 | ], 1596 | "hide": false, 1597 | "measurement": "/bgp/", 1598 | "orderByTime": "ASC", 1599 | "policy": "default", 1600 | "refId": "C", 1601 | "resultFormat": "time_series", 1602 | "select": [ 1603 | [ 1604 | { 1605 | "params": [ 1606 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1607 | ], 1608 | "type": "field" 1609 | }, 1610 | { 1611 | "params": [], 1612 | "type": "mean" 1613 | } 1614 | ] 1615 | ], 1616 | "tags": [ 1617 | { 1618 | "key": "device", 1619 | "operator": "=", 1620 | "value": "100.123.1.0" 1621 | }, 1622 | { 1623 | "condition": "AND", 1624 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1625 | "operator": "=", 1626 | "value": "192.168.1.5" 1627 | } 1628 | ] 1629 | }, 1630 | { 1631 | "alias": "for the neighbor 192.168.1.7", 1632 | "groupBy": [ 1633 | { 1634 | "params": [ 1635 | "$__interval" 1636 | ], 1637 | "type": "time" 1638 | }, 1639 | { 1640 | "params": [ 1641 | "none" 1642 | ], 1643 | "type": "fill" 1644 | } 1645 | ], 1646 | "hide": false, 1647 | "measurement": "/bgp/", 1648 | "orderByTime": "ASC", 1649 | "policy": "default", 1650 | "refId": "D", 1651 | "resultFormat": "time_series", 1652 | "select": [ 1653 | [ 1654 | { 1655 | "params": [ 1656 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions" 1657 | ], 1658 | "type": "field" 1659 | }, 1660 | { 1661 | "params": [], 1662 | "type": "mean" 1663 | } 1664 | ] 1665 | ], 1666 | "tags": [ 1667 | { 1668 | "key": "device", 1669 | "operator": "=", 1670 | "value": "100.123.1.0" 1671 | }, 1672 | { 1673 | "condition": "AND", 1674 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1675 | "operator": "=", 1676 | "value": "192.168.1.7" 1677 | } 1678 | ] 1679 | } 1680 | ], 1681 | "thresholds": [], 1682 | "timeFrom": null, 1683 | "timeRegions": [], 1684 | "timeShift": null, 1685 | "title": "Transitions to the BGP session state established (on device 100.123.1.0 only)", 1686 | "tooltip": { 1687 | "shared": true, 1688 | "sort": 0, 1689 | "value_type": "individual" 1690 | }, 1691 | "type": "graph", 1692 | "xaxis": { 1693 | "buckets": null, 1694 | "mode": "time", 1695 | "name": null, 1696 | "show": true, 1697 | "values": [] 1698 | }, 1699 | "yaxes": [ 1700 | { 1701 | "format": "short", 1702 | "label": null, 1703 | "logBase": 1, 1704 | "max": null, 1705 | "min": null, 1706 | "show": true 1707 | }, 1708 | { 1709 | "format": "short", 1710 | "label": null, 1711 | "logBase": 1, 1712 | "max": null, 1713 | "min": null, 1714 | "show": true 1715 | } 1716 | ], 1717 | "yaxis": { 1718 | "align": false, 1719 | "alignLevel": null 1720 | } 1721 | }, 1722 | { 1723 | "aliasColors": {}, 1724 | "bars": false, 1725 | "dashLength": 10, 1726 | "dashes": false, 1727 | "description": "The number of BGP prefixes received by 100.123.1.0. \nHis neighbors are hardcoded.", 1728 | "fill": 1, 1729 | "gridPos": { 1730 | "h": 9, 1731 | "w": 12, 1732 | "x": 0, 1733 | "y": 18 1734 | }, 1735 | "id": 12, 1736 | "legend": { 1737 | "avg": false, 1738 | "current": false, 1739 | "max": false, 1740 | "min": false, 1741 | "show": true, 1742 | "total": false, 1743 | "values": false 1744 | }, 1745 | "lines": true, 1746 | "linewidth": 1, 1747 | "links": [], 1748 | "nullPointMode": "null", 1749 | "percentage": false, 1750 | "pointradius": 5, 1751 | "points": false, 1752 | "renderer": "flot", 1753 | "seriesOverrides": [], 1754 | "spaceLength": 10, 1755 | "stack": false, 1756 | "steppedLine": false, 1757 | "targets": [ 1758 | { 1759 | "alias": "BGP prefixes received", 1760 | "groupBy": [ 1761 | { 1762 | "params": [ 1763 | "$__interval" 1764 | ], 1765 | "type": "time" 1766 | }, 1767 | { 1768 | "params": [ 1769 | "none" 1770 | ], 1771 | "type": "fill" 1772 | } 1773 | ], 1774 | "measurement": "/bgp/", 1775 | "orderByTime": "ASC", 1776 | "policy": "default", 1777 | "refId": "A", 1778 | "resultFormat": "time_series", 1779 | "select": [ 1780 | [ 1781 | { 1782 | "params": [ 1783 | "/network-instances/network-instance/protocols/protocol/bgp/global/state/total-prefixes" 1784 | ], 1785 | "type": "field" 1786 | }, 1787 | { 1788 | "params": [], 1789 | "type": "mean" 1790 | } 1791 | ] 1792 | ], 1793 | "tags": [ 1794 | { 1795 | "key": "device", 1796 | "operator": "=", 1797 | "value": "100.123.1.0" 1798 | } 1799 | ] 1800 | }, 1801 | { 1802 | "alias": "BGP prefixes received by neighbor 192.168.1.1", 1803 | "groupBy": [ 1804 | { 1805 | "params": [ 1806 | "$__interval" 1807 | ], 1808 | "type": "time" 1809 | }, 1810 | { 1811 | "params": [ 1812 | "none" 1813 | ], 1814 | "type": "fill" 1815 | } 1816 | ], 1817 | "measurement": "/bgp/", 1818 | "orderByTime": "ASC", 1819 | "policy": "default", 1820 | "refId": "B", 1821 | "resultFormat": "time_series", 1822 | "select": [ 1823 | [ 1824 | { 1825 | "params": [ 1826 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/received" 1827 | ], 1828 | "type": "field" 1829 | }, 1830 | { 1831 | "params": [], 1832 | "type": "mean" 1833 | } 1834 | ] 1835 | ], 1836 | "tags": [ 1837 | { 1838 | "key": "device", 1839 | "operator": "=", 1840 | "value": "100.123.1.0" 1841 | }, 1842 | { 1843 | "condition": "AND", 1844 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1845 | "operator": "=", 1846 | "value": "192.168.1.1" 1847 | } 1848 | ] 1849 | }, 1850 | { 1851 | "alias": "BGP prefixes received by neighbor 192.168.1.3", 1852 | "groupBy": [ 1853 | { 1854 | "params": [ 1855 | "$__interval" 1856 | ], 1857 | "type": "time" 1858 | }, 1859 | { 1860 | "params": [ 1861 | "none" 1862 | ], 1863 | "type": "fill" 1864 | } 1865 | ], 1866 | "measurement": "/bgp/", 1867 | "orderByTime": "ASC", 1868 | "policy": "default", 1869 | "refId": "C", 1870 | "resultFormat": "time_series", 1871 | "select": [ 1872 | [ 1873 | { 1874 | "params": [ 1875 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/received" 1876 | ], 1877 | "type": "field" 1878 | }, 1879 | { 1880 | "params": [], 1881 | "type": "mean" 1882 | } 1883 | ] 1884 | ], 1885 | "tags": [ 1886 | { 1887 | "key": "device", 1888 | "operator": "=", 1889 | "value": "100.123.1.0" 1890 | }, 1891 | { 1892 | "condition": "AND", 1893 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1894 | "operator": "=", 1895 | "value": "192.168.1.3" 1896 | } 1897 | ] 1898 | }, 1899 | { 1900 | "alias": "BGP prefixes received by neighbor 192.168.1.5", 1901 | "groupBy": [ 1902 | { 1903 | "params": [ 1904 | "$__interval" 1905 | ], 1906 | "type": "time" 1907 | }, 1908 | { 1909 | "params": [ 1910 | "none" 1911 | ], 1912 | "type": "fill" 1913 | } 1914 | ], 1915 | "measurement": "/bgp/", 1916 | "orderByTime": "ASC", 1917 | "policy": "default", 1918 | "refId": "D", 1919 | "resultFormat": "time_series", 1920 | "select": [ 1921 | [ 1922 | { 1923 | "params": [ 1924 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/received" 1925 | ], 1926 | "type": "field" 1927 | }, 1928 | { 1929 | "params": [], 1930 | "type": "mean" 1931 | } 1932 | ] 1933 | ], 1934 | "tags": [ 1935 | { 1936 | "key": "device", 1937 | "operator": "=", 1938 | "value": "100.123.1.0" 1939 | }, 1940 | { 1941 | "condition": "AND", 1942 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1943 | "operator": "=", 1944 | "value": "192.168.1.5" 1945 | } 1946 | ] 1947 | }, 1948 | { 1949 | "alias": "BGP prefixes received by neighbor 192.168.1.7", 1950 | "groupBy": [ 1951 | { 1952 | "params": [ 1953 | "$__interval" 1954 | ], 1955 | "type": "time" 1956 | }, 1957 | { 1958 | "params": [ 1959 | "none" 1960 | ], 1961 | "type": "fill" 1962 | } 1963 | ], 1964 | "measurement": "/bgp/", 1965 | "orderByTime": "ASC", 1966 | "policy": "default", 1967 | "refId": "E", 1968 | "resultFormat": "time_series", 1969 | "select": [ 1970 | [ 1971 | { 1972 | "params": [ 1973 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/received" 1974 | ], 1975 | "type": "field" 1976 | }, 1977 | { 1978 | "params": [], 1979 | "type": "mean" 1980 | } 1981 | ] 1982 | ], 1983 | "tags": [ 1984 | { 1985 | "key": "device", 1986 | "operator": "=", 1987 | "value": "100.123.1.0" 1988 | }, 1989 | { 1990 | "condition": "AND", 1991 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 1992 | "operator": "=", 1993 | "value": "192.168.1.7" 1994 | } 1995 | ] 1996 | } 1997 | ], 1998 | "thresholds": [], 1999 | "timeFrom": null, 2000 | "timeRegions": [], 2001 | "timeShift": null, 2002 | "title": "BGP prefixes received on device 100.123.1.0", 2003 | "tooltip": { 2004 | "shared": true, 2005 | "sort": 0, 2006 | "value_type": "individual" 2007 | }, 2008 | "type": "graph", 2009 | "xaxis": { 2010 | "buckets": null, 2011 | "mode": "time", 2012 | "name": null, 2013 | "show": true, 2014 | "values": [] 2015 | }, 2016 | "yaxes": [ 2017 | { 2018 | "format": "short", 2019 | "label": null, 2020 | "logBase": 1, 2021 | "max": null, 2022 | "min": null, 2023 | "show": true 2024 | }, 2025 | { 2026 | "format": "short", 2027 | "label": null, 2028 | "logBase": 1, 2029 | "max": null, 2030 | "min": null, 2031 | "show": true 2032 | } 2033 | ], 2034 | "yaxis": { 2035 | "align": false, 2036 | "alignLevel": null 2037 | } 2038 | }, 2039 | { 2040 | "aliasColors": {}, 2041 | "bars": false, 2042 | "dashLength": 10, 2043 | "dashes": false, 2044 | "description": "The number of BGP prefixes sent by the device 100.123.1.0. \nHis neighbors are hardcoded.", 2045 | "fill": 1, 2046 | "gridPos": { 2047 | "h": 9, 2048 | "w": 12, 2049 | "x": 12, 2050 | "y": 18 2051 | }, 2052 | "id": 14, 2053 | "legend": { 2054 | "avg": false, 2055 | "current": false, 2056 | "max": false, 2057 | "min": false, 2058 | "show": true, 2059 | "total": false, 2060 | "values": false 2061 | }, 2062 | "lines": true, 2063 | "linewidth": 1, 2064 | "links": [], 2065 | "nullPointMode": "null", 2066 | "percentage": false, 2067 | "pointradius": 5, 2068 | "points": false, 2069 | "renderer": "flot", 2070 | "seriesOverrides": [], 2071 | "spaceLength": 10, 2072 | "stack": false, 2073 | "steppedLine": false, 2074 | "targets": [ 2075 | { 2076 | "alias": "BGP prefixes sent to 192.168.1.1", 2077 | "groupBy": [ 2078 | { 2079 | "params": [ 2080 | "$__interval" 2081 | ], 2082 | "type": "time" 2083 | }, 2084 | { 2085 | "params": [ 2086 | "none" 2087 | ], 2088 | "type": "fill" 2089 | } 2090 | ], 2091 | "measurement": "/bgp/", 2092 | "orderByTime": "ASC", 2093 | "policy": "default", 2094 | "refId": "A", 2095 | "resultFormat": "time_series", 2096 | "select": [ 2097 | [ 2098 | { 2099 | "params": [ 2100 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent" 2101 | ], 2102 | "type": "field" 2103 | }, 2104 | { 2105 | "params": [], 2106 | "type": "mean" 2107 | } 2108 | ] 2109 | ], 2110 | "tags": [ 2111 | { 2112 | "key": "device", 2113 | "operator": "=", 2114 | "value": "100.123.1.0" 2115 | }, 2116 | { 2117 | "condition": "AND", 2118 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 2119 | "operator": "=", 2120 | "value": "192.168.1.1" 2121 | } 2122 | ] 2123 | }, 2124 | { 2125 | "alias": "BGP prefixes sent to 192.168.1.3", 2126 | "groupBy": [ 2127 | { 2128 | "params": [ 2129 | "$__interval" 2130 | ], 2131 | "type": "time" 2132 | }, 2133 | { 2134 | "params": [ 2135 | "none" 2136 | ], 2137 | "type": "fill" 2138 | } 2139 | ], 2140 | "measurement": "/bgp/", 2141 | "orderByTime": "ASC", 2142 | "policy": "default", 2143 | "refId": "B", 2144 | "resultFormat": "time_series", 2145 | "select": [ 2146 | [ 2147 | { 2148 | "params": [ 2149 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent" 2150 | ], 2151 | "type": "field" 2152 | }, 2153 | { 2154 | "params": [], 2155 | "type": "mean" 2156 | } 2157 | ] 2158 | ], 2159 | "tags": [ 2160 | { 2161 | "key": "device", 2162 | "operator": "=", 2163 | "value": "100.123.1.0" 2164 | }, 2165 | { 2166 | "condition": "AND", 2167 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 2168 | "operator": "=", 2169 | "value": "192.168.1.3" 2170 | } 2171 | ] 2172 | }, 2173 | { 2174 | "alias": "BGP prefixes sent to 192.168.1.5", 2175 | "groupBy": [ 2176 | { 2177 | "params": [ 2178 | "$__interval" 2179 | ], 2180 | "type": "time" 2181 | }, 2182 | { 2183 | "params": [ 2184 | "none" 2185 | ], 2186 | "type": "fill" 2187 | } 2188 | ], 2189 | "measurement": "/bgp/", 2190 | "orderByTime": "ASC", 2191 | "policy": "default", 2192 | "refId": "C", 2193 | "resultFormat": "time_series", 2194 | "select": [ 2195 | [ 2196 | { 2197 | "params": [ 2198 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent" 2199 | ], 2200 | "type": "field" 2201 | }, 2202 | { 2203 | "params": [], 2204 | "type": "mean" 2205 | } 2206 | ] 2207 | ], 2208 | "tags": [ 2209 | { 2210 | "key": "device", 2211 | "operator": "=", 2212 | "value": "100.123.1.0" 2213 | }, 2214 | { 2215 | "condition": "AND", 2216 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 2217 | "operator": "=", 2218 | "value": "192.168.1.5" 2219 | } 2220 | ] 2221 | }, 2222 | { 2223 | "alias": "BGP prefixes sent to 192.168.1.7", 2224 | "groupBy": [ 2225 | { 2226 | "params": [ 2227 | "$__interval" 2228 | ], 2229 | "type": "time" 2230 | }, 2231 | { 2232 | "params": [ 2233 | "none" 2234 | ], 2235 | "type": "fill" 2236 | } 2237 | ], 2238 | "measurement": "/bgp/", 2239 | "orderByTime": "ASC", 2240 | "policy": "default", 2241 | "refId": "D", 2242 | "resultFormat": "time_series", 2243 | "select": [ 2244 | [ 2245 | { 2246 | "params": [ 2247 | "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent" 2248 | ], 2249 | "type": "field" 2250 | }, 2251 | { 2252 | "params": [], 2253 | "type": "mean" 2254 | } 2255 | ] 2256 | ], 2257 | "tags": [ 2258 | { 2259 | "key": "device", 2260 | "operator": "=", 2261 | "value": "100.123.1.0" 2262 | }, 2263 | { 2264 | "condition": "AND", 2265 | "key": "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/@neighbor-address", 2266 | "operator": "=", 2267 | "value": "192.168.1.7" 2268 | } 2269 | ] 2270 | } 2271 | ], 2272 | "thresholds": [], 2273 | "timeFrom": null, 2274 | "timeRegions": [], 2275 | "timeShift": null, 2276 | "title": "BGP prefixes sent by device 100.123.1.0", 2277 | "tooltip": { 2278 | "shared": true, 2279 | "sort": 0, 2280 | "value_type": "individual" 2281 | }, 2282 | "type": "graph", 2283 | "xaxis": { 2284 | "buckets": null, 2285 | "mode": "time", 2286 | "name": null, 2287 | "show": true, 2288 | "values": [] 2289 | }, 2290 | "yaxes": [ 2291 | { 2292 | "format": "short", 2293 | "label": null, 2294 | "logBase": 1, 2295 | "max": null, 2296 | "min": null, 2297 | "show": true 2298 | }, 2299 | { 2300 | "format": "short", 2301 | "label": null, 2302 | "logBase": 1, 2303 | "max": null, 2304 | "min": null, 2305 | "show": true 2306 | } 2307 | ], 2308 | "yaxis": { 2309 | "align": false, 2310 | "alignLevel": null 2311 | } 2312 | } 2313 | ], 2314 | "refresh": "5s", 2315 | "schemaVersion": 16, 2316 | "style": "dark", 2317 | "tags": [], 2318 | "templating": { 2319 | "list": [ 2320 | { 2321 | "allValue": null, 2322 | "current": { 2323 | "text": "100.123.1.0", 2324 | "value": "100.123.1.0" 2325 | }, 2326 | "datasource": "influxdb", 2327 | "definition": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"device\"", 2328 | "hide": 0, 2329 | "includeAll": false, 2330 | "label": null, 2331 | "multi": false, 2332 | "name": "devices", 2333 | "options": [], 2334 | "query": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"device\"", 2335 | "refresh": 1, 2336 | "regex": "", 2337 | "skipUrlSync": false, 2338 | "sort": 0, 2339 | "tagValuesQuery": "", 2340 | "tags": [], 2341 | "tagsQuery": "", 2342 | "type": "query", 2343 | "useTags": false 2344 | }, 2345 | { 2346 | "allValue": null, 2347 | "current": { 2348 | "text": "vMX-addr-0", 2349 | "value": "vMX-addr-0" 2350 | }, 2351 | "datasource": "influxdb", 2352 | "definition": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"system_id\"", 2353 | "hide": 0, 2354 | "includeAll": false, 2355 | "label": null, 2356 | "multi": false, 2357 | "name": "hostnames", 2358 | "options": [], 2359 | "query": "SHOW TAG VALUES FROM \"/network-instances/network-instance/protocols/protocol/bgp/\" with KEY = \"system_id\"", 2360 | "refresh": 1, 2361 | "regex": "", 2362 | "skipUrlSync": false, 2363 | "sort": 0, 2364 | "tagValuesQuery": "", 2365 | "tags": [], 2366 | "tagsQuery": "", 2367 | "type": "query", 2368 | "useTags": false 2369 | }, 2370 | { 2371 | "allValue": null, 2372 | "current": { 2373 | "text": "100.123.1.0", 2374 | "value": "100.123.1.0" 2375 | }, 2376 | "hide": 0, 2377 | "includeAll": false, 2378 | "label": null, 2379 | "multi": false, 2380 | "name": "spines", 2381 | "options": [ 2382 | { 2383 | "selected": true, 2384 | "text": "100.123.1.0", 2385 | "value": "100.123.1.0" 2386 | }, 2387 | { 2388 | "selected": false, 2389 | "text": "100.123.1.1", 2390 | "value": "100.123.1.1" 2391 | }, 2392 | { 2393 | "selected": false, 2394 | "text": "100.123.1.2", 2395 | "value": "100.123.1.2" 2396 | } 2397 | ], 2398 | "query": "100.123.1.0, 100.123.1.1, 100.123.1.2", 2399 | "skipUrlSync": false, 2400 | "type": "custom" 2401 | }, 2402 | { 2403 | "allValue": null, 2404 | "current": { 2405 | "text": "100.123.1.3", 2406 | "value": "100.123.1.3" 2407 | }, 2408 | "hide": 0, 2409 | "includeAll": false, 2410 | "label": null, 2411 | "multi": false, 2412 | "name": "leaves", 2413 | "options": [ 2414 | { 2415 | "selected": true, 2416 | "text": "100.123.1.3", 2417 | "value": "100.123.1.3" 2418 | }, 2419 | { 2420 | "selected": false, 2421 | "text": "100.123.1.4", 2422 | "value": "100.123.1.4" 2423 | }, 2424 | { 2425 | "selected": false, 2426 | "text": "100.123.1.5", 2427 | "value": "100.123.1.5" 2428 | }, 2429 | { 2430 | "selected": false, 2431 | "text": "100.123.1.6", 2432 | "value": "100.123.1.6" 2433 | } 2434 | ], 2435 | "query": "100.123.1.3, 100.123.1.4, 100.123.1.5,100.123.1.6", 2436 | "skipUrlSync": false, 2437 | "type": "custom" 2438 | } 2439 | ] 2440 | }, 2441 | "time": { 2442 | "from": "now-5m", 2443 | "to": "now" 2444 | }, 2445 | "timepicker": { 2446 | "refresh_intervals": [ 2447 | "5s", 2448 | "10s", 2449 | "30s", 2450 | "1m", 2451 | "5m", 2452 | "15m", 2453 | "30m", 2454 | "1h", 2455 | "2h", 2456 | "1d" 2457 | ], 2458 | "time_options": [ 2459 | "5m", 2460 | "15m", 2461 | "1h", 2462 | "6h", 2463 | "12h", 2464 | "24h", 2465 | "2d", 2466 | "7d", 2467 | "30d" 2468 | ] 2469 | }, 2470 | "timezone": "", 2471 | "title": "openconfig BGP with hardcoded queries", 2472 | "uid": "MIAjb2ymz", 2473 | "version": 12 2474 | } 2475 | -------------------------------------------------------------------------------- /dashboards/snmp_graphs.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "-- Grafana --", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "type": "dashboard" 12 | } 13 | ] 14 | }, 15 | "description": "Monitor BGP and Interfaces using SNMP", 16 | "editable": true, 17 | "gnetId": null, 18 | "graphTooltip": 0, 19 | "iteration": 1547065126622, 20 | "links": [], 21 | "panels": [ 22 | { 23 | "collapsed": false, 24 | "gridPos": { 25 | "h": 1, 26 | "w": 24, 27 | "x": 0, 28 | "y": 0 29 | }, 30 | "id": 9, 31 | "panels": [], 32 | "title": "BGP", 33 | "type": "row" 34 | }, 35 | { 36 | "aliasColors": {}, 37 | "bars": false, 38 | "dashLength": 10, 39 | "dashes": false, 40 | "description": "The total number of times BGP transitioned into the established state for a peer.", 41 | "fill": 1, 42 | "gridPos": { 43 | "h": 10, 44 | "w": 23, 45 | "x": 0, 46 | "y": 1 47 | }, 48 | "id": 11, 49 | "legend": { 50 | "alignAsTable": true, 51 | "avg": false, 52 | "current": false, 53 | "max": true, 54 | "min": true, 55 | "rightSide": true, 56 | "show": true, 57 | "total": false, 58 | "values": true 59 | }, 60 | "lines": true, 61 | "linewidth": 1, 62 | "links": [], 63 | "nullPointMode": "null", 64 | "percentage": false, 65 | "pointradius": 5, 66 | "points": false, 67 | "renderer": "flot", 68 | "seriesOverrides": [], 69 | "spaceLength": 10, 70 | "stack": false, 71 | "steppedLine": false, 72 | "targets": [ 73 | { 74 | "alias": "peer $tag_bgpPeerRemoteAddr", 75 | "groupBy": [ 76 | { 77 | "params": [ 78 | "$__interval" 79 | ], 80 | "type": "time" 81 | }, 82 | { 83 | "params": [ 84 | "bgpPeerRemoteAddr" 85 | ], 86 | "type": "tag" 87 | }, 88 | { 89 | "params": [ 90 | "none" 91 | ], 92 | "type": "fill" 93 | } 94 | ], 95 | "measurement": "snmp_BGP", 96 | "orderByTime": "ASC", 97 | "policy": "default", 98 | "refId": "A", 99 | "resultFormat": "time_series", 100 | "select": [ 101 | [ 102 | { 103 | "params": [ 104 | "bgpPeerFsmEstablishedTransitions" 105 | ], 106 | "type": "field" 107 | }, 108 | { 109 | "params": [], 110 | "type": "mean" 111 | } 112 | ] 113 | ], 114 | "tags": [ 115 | { 116 | "key": "hostname", 117 | "operator": "=~", 118 | "value": "/^$hostnames$/" 119 | }, 120 | { 121 | "condition": "AND", 122 | "key": "bgpPeerRemoteAddr", 123 | "operator": "=~", 124 | "value": "/^$bgpPeerRemoteAddr$/" 125 | } 126 | ] 127 | } 128 | ], 129 | "thresholds": [], 130 | "timeFrom": null, 131 | "timeRegions": [], 132 | "timeShift": null, 133 | "title": "BGP transitions to established state - device $hostnames", 134 | "tooltip": { 135 | "shared": true, 136 | "sort": 0, 137 | "value_type": "individual" 138 | }, 139 | "transparent": true, 140 | "type": "graph", 141 | "xaxis": { 142 | "buckets": null, 143 | "mode": "time", 144 | "name": null, 145 | "show": true, 146 | "values": [] 147 | }, 148 | "yaxes": [ 149 | { 150 | "format": "short", 151 | "label": null, 152 | "logBase": 1, 153 | "max": null, 154 | "min": null, 155 | "show": true 156 | }, 157 | { 158 | "format": "short", 159 | "label": null, 160 | "logBase": 1, 161 | "max": null, 162 | "min": null, 163 | "show": true 164 | } 165 | ], 166 | "yaxis": { 167 | "align": false, 168 | "alignLevel": null 169 | } 170 | }, 171 | { 172 | "collapsed": false, 173 | "gridPos": { 174 | "h": 1, 175 | "w": 24, 176 | "x": 0, 177 | "y": 11 178 | }, 179 | "id": 7, 180 | "panels": [], 181 | "title": "Interfaces", 182 | "type": "row" 183 | }, 184 | { 185 | "aliasColors": {}, 186 | "bars": false, 187 | "dashLength": 10, 188 | "dashes": false, 189 | "fill": 1, 190 | "gridPos": { 191 | "h": 10, 192 | "w": 24, 193 | "x": 0, 194 | "y": 12 195 | }, 196 | "id": 2, 197 | "legend": { 198 | "alignAsTable": true, 199 | "avg": true, 200 | "current": true, 201 | "max": true, 202 | "min": true, 203 | "rightSide": true, 204 | "show": true, 205 | "total": false, 206 | "values": true 207 | }, 208 | "lines": true, 209 | "linewidth": 1, 210 | "links": [], 211 | "nullPointMode": "null", 212 | "percentage": false, 213 | "pointradius": 5, 214 | "points": false, 215 | "renderer": "flot", 216 | "repeat": null, 217 | "repeatDirection": "v", 218 | "seriesOverrides": [], 219 | "spaceLength": 10, 220 | "stack": false, 221 | "steppedLine": false, 222 | "targets": [ 223 | { 224 | "alias": "$tag_ifName", 225 | "groupBy": [ 226 | { 227 | "params": [ 228 | "$__interval" 229 | ], 230 | "type": "time" 231 | }, 232 | { 233 | "params": [ 234 | "ifName" 235 | ], 236 | "type": "tag" 237 | }, 238 | { 239 | "params": [ 240 | "none" 241 | ], 242 | "type": "fill" 243 | } 244 | ], 245 | "hide": false, 246 | "measurement": "snmp_interfaces_statistics", 247 | "orderByTime": "ASC", 248 | "policy": "default", 249 | "refId": "A", 250 | "resultFormat": "time_series", 251 | "select": [ 252 | [ 253 | { 254 | "params": [ 255 | "ifHCInOctets" 256 | ], 257 | "type": "field" 258 | }, 259 | { 260 | "params": [], 261 | "type": "mean" 262 | }, 263 | { 264 | "params": [ 265 | "1s" 266 | ], 267 | "type": "derivative" 268 | }, 269 | { 270 | "params": [ 271 | " * 8" 272 | ], 273 | "type": "math" 274 | } 275 | ] 276 | ], 277 | "tags": [ 278 | { 279 | "key": "hostname", 280 | "operator": "=~", 281 | "value": "/^$hostnames$/" 282 | }, 283 | { 284 | "condition": "AND", 285 | "key": "ifName", 286 | "operator": "=~", 287 | "value": "/^$ifName$/" 288 | } 289 | ] 290 | } 291 | ], 292 | "thresholds": [], 293 | "timeFrom": null, 294 | "timeRegions": [], 295 | "timeShift": null, 296 | "title": "Interfaces statistics - IN bps - device $hostnames", 297 | "tooltip": { 298 | "shared": true, 299 | "sort": 0, 300 | "value_type": "individual" 301 | }, 302 | "transparent": true, 303 | "type": "graph", 304 | "xaxis": { 305 | "buckets": null, 306 | "mode": "time", 307 | "name": null, 308 | "show": true, 309 | "values": [] 310 | }, 311 | "yaxes": [ 312 | { 313 | "decimals": null, 314 | "format": "bps", 315 | "label": null, 316 | "logBase": 1, 317 | "max": null, 318 | "min": null, 319 | "show": true 320 | }, 321 | { 322 | "format": "short", 323 | "label": null, 324 | "logBase": 1, 325 | "max": null, 326 | "min": null, 327 | "show": true 328 | } 329 | ], 330 | "yaxis": { 331 | "align": false, 332 | "alignLevel": null 333 | } 334 | }, 335 | { 336 | "aliasColors": {}, 337 | "bars": false, 338 | "dashLength": 10, 339 | "dashes": false, 340 | "fill": 1, 341 | "gridPos": { 342 | "h": 9, 343 | "w": 24, 344 | "x": 0, 345 | "y": 22 346 | }, 347 | "id": 4, 348 | "legend": { 349 | "alignAsTable": true, 350 | "avg": true, 351 | "current": true, 352 | "max": true, 353 | "min": true, 354 | "rightSide": true, 355 | "show": true, 356 | "total": false, 357 | "values": true 358 | }, 359 | "lines": true, 360 | "linewidth": 1, 361 | "links": [], 362 | "nullPointMode": "null", 363 | "percentage": false, 364 | "pointradius": 5, 365 | "points": false, 366 | "renderer": "flot", 367 | "repeat": null, 368 | "repeatDirection": null, 369 | "seriesOverrides": [], 370 | "spaceLength": 10, 371 | "stack": false, 372 | "steppedLine": false, 373 | "targets": [ 374 | { 375 | "alias": "$tag_ifName", 376 | "groupBy": [ 377 | { 378 | "params": [ 379 | "$__interval" 380 | ], 381 | "type": "time" 382 | }, 383 | { 384 | "params": [ 385 | "ifName" 386 | ], 387 | "type": "tag" 388 | }, 389 | { 390 | "params": [ 391 | "none" 392 | ], 393 | "type": "fill" 394 | } 395 | ], 396 | "hide": false, 397 | "measurement": "snmp_interfaces_statistics", 398 | "orderByTime": "ASC", 399 | "policy": "default", 400 | "refId": "A", 401 | "resultFormat": "time_series", 402 | "select": [ 403 | [ 404 | { 405 | "params": [ 406 | "ifHCOutOctets" 407 | ], 408 | "type": "field" 409 | }, 410 | { 411 | "params": [], 412 | "type": "mean" 413 | }, 414 | { 415 | "params": [ 416 | "1s" 417 | ], 418 | "type": "derivative" 419 | }, 420 | { 421 | "params": [ 422 | " *8" 423 | ], 424 | "type": "math" 425 | } 426 | ] 427 | ], 428 | "tags": [ 429 | { 430 | "key": "hostname", 431 | "operator": "=~", 432 | "value": "/^$hostnames$/" 433 | }, 434 | { 435 | "condition": "AND", 436 | "key": "ifName", 437 | "operator": "=~", 438 | "value": "/^$ifName$/" 439 | } 440 | ] 441 | } 442 | ], 443 | "thresholds": [], 444 | "timeFrom": null, 445 | "timeRegions": [], 446 | "timeShift": null, 447 | "title": "Interfaces statistics - OUT bps - device $hostnames", 448 | "tooltip": { 449 | "shared": true, 450 | "sort": 0, 451 | "value_type": "individual" 452 | }, 453 | "transparent": true, 454 | "type": "graph", 455 | "xaxis": { 456 | "buckets": null, 457 | "mode": "time", 458 | "name": null, 459 | "show": true, 460 | "values": [] 461 | }, 462 | "yaxes": [ 463 | { 464 | "decimals": null, 465 | "format": "bps", 466 | "label": null, 467 | "logBase": 1, 468 | "max": null, 469 | "min": null, 470 | "show": true 471 | }, 472 | { 473 | "format": "short", 474 | "label": null, 475 | "logBase": 1, 476 | "max": null, 477 | "min": null, 478 | "show": true 479 | } 480 | ], 481 | "yaxis": { 482 | "align": false, 483 | "alignLevel": null 484 | } 485 | }, 486 | { 487 | "aliasColors": {}, 488 | "bars": false, 489 | "dashLength": 10, 490 | "dashes": false, 491 | "description": "", 492 | "fill": 1, 493 | "gridPos": { 494 | "h": 9, 495 | "w": 24, 496 | "x": 0, 497 | "y": 31 498 | }, 499 | "id": 3, 500 | "legend": { 501 | "alignAsTable": true, 502 | "avg": true, 503 | "current": true, 504 | "max": true, 505 | "min": true, 506 | "rightSide": true, 507 | "show": true, 508 | "total": false, 509 | "values": true 510 | }, 511 | "lines": true, 512 | "linewidth": 1, 513 | "links": [], 514 | "nullPointMode": "null", 515 | "percentage": false, 516 | "pointradius": 5, 517 | "points": false, 518 | "renderer": "flot", 519 | "repeat": null, 520 | "repeatDirection": "v", 521 | "seriesOverrides": [], 522 | "spaceLength": 10, 523 | "stack": false, 524 | "steppedLine": false, 525 | "targets": [ 526 | { 527 | "alias": "$tag_ifName", 528 | "groupBy": [ 529 | { 530 | "params": [ 531 | "$__interval" 532 | ], 533 | "type": "time" 534 | }, 535 | { 536 | "params": [ 537 | "ifName" 538 | ], 539 | "type": "tag" 540 | }, 541 | { 542 | "params": [ 543 | "none" 544 | ], 545 | "type": "fill" 546 | } 547 | ], 548 | "measurement": "snmp_interfaces_statistics", 549 | "orderByTime": "ASC", 550 | "policy": "default", 551 | "refId": "B", 552 | "resultFormat": "time_series", 553 | "select": [ 554 | [ 555 | { 556 | "params": [ 557 | "ifHCInUcastPkts" 558 | ], 559 | "type": "field" 560 | }, 561 | { 562 | "params": [], 563 | "type": "mean" 564 | }, 565 | { 566 | "params": [ 567 | "1s" 568 | ], 569 | "type": "derivative" 570 | } 571 | ] 572 | ], 573 | "tags": [ 574 | { 575 | "key": "hostname", 576 | "operator": "=~", 577 | "value": "/^$hostnames$/" 578 | }, 579 | { 580 | "condition": "AND", 581 | "key": "ifName", 582 | "operator": "=~", 583 | "value": "/^$ifName$/" 584 | } 585 | ] 586 | } 587 | ], 588 | "thresholds": [], 589 | "timeFrom": null, 590 | "timeRegions": [], 591 | "timeShift": null, 592 | "title": "Interfaces statistics - IN unicast pps - device $hostnames", 593 | "tooltip": { 594 | "shared": true, 595 | "sort": 0, 596 | "value_type": "individual" 597 | }, 598 | "transparent": true, 599 | "type": "graph", 600 | "xaxis": { 601 | "buckets": null, 602 | "mode": "time", 603 | "name": null, 604 | "show": true, 605 | "values": [] 606 | }, 607 | "yaxes": [ 608 | { 609 | "decimals": null, 610 | "format": "pps", 611 | "label": null, 612 | "logBase": 1, 613 | "max": null, 614 | "min": null, 615 | "show": true 616 | }, 617 | { 618 | "format": "short", 619 | "label": null, 620 | "logBase": 1, 621 | "max": null, 622 | "min": null, 623 | "show": true 624 | } 625 | ], 626 | "yaxis": { 627 | "align": false, 628 | "alignLevel": null 629 | } 630 | }, 631 | { 632 | "aliasColors": {}, 633 | "bars": false, 634 | "dashLength": 10, 635 | "dashes": false, 636 | "fill": 1, 637 | "gridPos": { 638 | "h": 10, 639 | "w": 24, 640 | "x": 0, 641 | "y": 40 642 | }, 643 | "id": 5, 644 | "legend": { 645 | "alignAsTable": true, 646 | "avg": true, 647 | "current": true, 648 | "max": true, 649 | "min": true, 650 | "rightSide": true, 651 | "show": true, 652 | "total": false, 653 | "values": true 654 | }, 655 | "lines": true, 656 | "linewidth": 1, 657 | "links": [], 658 | "nullPointMode": "null", 659 | "percentage": false, 660 | "pointradius": 5, 661 | "points": false, 662 | "renderer": "flot", 663 | "repeat": null, 664 | "repeatDirection": "v", 665 | "seriesOverrides": [], 666 | "spaceLength": 10, 667 | "stack": false, 668 | "steppedLine": false, 669 | "targets": [ 670 | { 671 | "alias": "$tag_ifName", 672 | "groupBy": [ 673 | { 674 | "params": [ 675 | "$__interval" 676 | ], 677 | "type": "time" 678 | }, 679 | { 680 | "params": [ 681 | "ifName" 682 | ], 683 | "type": "tag" 684 | }, 685 | { 686 | "params": [ 687 | "none" 688 | ], 689 | "type": "fill" 690 | } 691 | ], 692 | "measurement": "snmp_interfaces_statistics", 693 | "orderByTime": "ASC", 694 | "policy": "default", 695 | "refId": "B", 696 | "resultFormat": "time_series", 697 | "select": [ 698 | [ 699 | { 700 | "params": [ 701 | "ifHCOutUcastPkts" 702 | ], 703 | "type": "field" 704 | }, 705 | { 706 | "params": [], 707 | "type": "mean" 708 | }, 709 | { 710 | "params": [ 711 | "1s" 712 | ], 713 | "type": "derivative" 714 | } 715 | ] 716 | ], 717 | "tags": [ 718 | { 719 | "key": "hostname", 720 | "operator": "=~", 721 | "value": "/^$hostnames$/" 722 | }, 723 | { 724 | "condition": "AND", 725 | "key": "ifName", 726 | "operator": "=~", 727 | "value": "/^$ifName$/" 728 | } 729 | ] 730 | } 731 | ], 732 | "thresholds": [], 733 | "timeFrom": null, 734 | "timeRegions": [], 735 | "timeShift": null, 736 | "title": "Interfaces statistics - OUT unicast pps - device $hostnames", 737 | "tooltip": { 738 | "shared": true, 739 | "sort": 0, 740 | "value_type": "individual" 741 | }, 742 | "transparent": true, 743 | "type": "graph", 744 | "xaxis": { 745 | "buckets": null, 746 | "mode": "time", 747 | "name": null, 748 | "show": true, 749 | "values": [] 750 | }, 751 | "yaxes": [ 752 | { 753 | "decimals": null, 754 | "format": "pps", 755 | "label": null, 756 | "logBase": 1, 757 | "max": null, 758 | "min": null, 759 | "show": true 760 | }, 761 | { 762 | "format": "short", 763 | "label": null, 764 | "logBase": 1, 765 | "max": null, 766 | "min": null, 767 | "show": true 768 | } 769 | ], 770 | "yaxis": { 771 | "align": false, 772 | "alignLevel": null 773 | } 774 | } 775 | ], 776 | "refresh": "5s", 777 | "schemaVersion": 16, 778 | "style": "dark", 779 | "tags": [ 780 | "snmp", 781 | "interfaces", 782 | "bgp" 783 | ], 784 | "templating": { 785 | "list": [ 786 | { 787 | "allValue": null, 788 | "current": { 789 | "text": "ge-0/0/0 + ge-0/0/1", 790 | "value": [ 791 | "ge-0/0/0", 792 | "ge-0/0/1" 793 | ] 794 | }, 795 | "datasource": "influxdb", 796 | "definition": "SHOW TAG VALUES FROM \"snmp_interfaces_statistics\" with KEY = \"ifName\"", 797 | "hide": 0, 798 | "includeAll": true, 799 | "label": null, 800 | "multi": true, 801 | "name": "ifName", 802 | "options": [], 803 | "query": "SHOW TAG VALUES FROM \"snmp_interfaces_statistics\" with KEY = \"ifName\"", 804 | "refresh": 1, 805 | "regex": "((et|ge|xe).*)", 806 | "skipUrlSync": false, 807 | "sort": 0, 808 | "tagValuesQuery": "", 809 | "tags": [], 810 | "tagsQuery": "", 811 | "type": "query", 812 | "useTags": false 813 | }, 814 | { 815 | "allValue": null, 816 | "current": { 817 | "tags": [], 818 | "text": "vMX-addr-0", 819 | "value": "vMX-addr-0" 820 | }, 821 | "datasource": "influxdb", 822 | "definition": "SHOW TAG VALUES FROM \"snmp_BGP\" with KEY = \"hostname\"", 823 | "hide": 0, 824 | "includeAll": false, 825 | "label": null, 826 | "multi": false, 827 | "name": "hostnames", 828 | "options": [], 829 | "query": "SHOW TAG VALUES FROM \"snmp_BGP\" with KEY = \"hostname\"", 830 | "refresh": 1, 831 | "regex": "", 832 | "skipUrlSync": false, 833 | "sort": 0, 834 | "tagValuesQuery": "", 835 | "tags": [], 836 | "tagsQuery": "", 837 | "type": "query", 838 | "useTags": false 839 | }, 840 | { 841 | "allValue": null, 842 | "current": { 843 | "tags": [], 844 | "text": "All", 845 | "value": [ 846 | "$__all" 847 | ] 848 | }, 849 | "datasource": "influxdb", 850 | "definition": "SHOW TAG VALUES FROM \"snmp_BGP\" with KEY = \"bgpPeerRemoteAddr\"", 851 | "hide": 0, 852 | "includeAll": true, 853 | "label": null, 854 | "multi": true, 855 | "name": "bgpPeerRemoteAddr", 856 | "options": [], 857 | "query": "SHOW TAG VALUES FROM \"snmp_BGP\" with KEY = \"bgpPeerRemoteAddr\"", 858 | "refresh": 1, 859 | "regex": "", 860 | "skipUrlSync": false, 861 | "sort": 0, 862 | "tagValuesQuery": "", 863 | "tags": [], 864 | "tagsQuery": "", 865 | "type": "query", 866 | "useTags": false 867 | } 868 | ] 869 | }, 870 | "time": { 871 | "from": "now-5m", 872 | "to": "now" 873 | }, 874 | "timepicker": { 875 | "refresh_intervals": [ 876 | "5s", 877 | "10s", 878 | "30s", 879 | "1m", 880 | "5m", 881 | "15m", 882 | "30m", 883 | "1h", 884 | "2h", 885 | "1d" 886 | ], 887 | "time_options": [ 888 | "5m", 889 | "15m", 890 | "1h", 891 | "6h", 892 | "12h", 893 | "24h", 894 | "2d", 895 | "7d", 896 | "30d" 897 | ] 898 | }, 899 | "timezone": "", 900 | "title": "SNMP graphes", 901 | "uid": "aMDia5Umk", 902 | "version": 1 903 | } 904 | -------------------------------------------------------------------------------- /data.yml: -------------------------------------------------------------------------------- 1 | --- 2 | grafana: 3 | web: 4 | port: "9081" 5 | username: "jcluser" 6 | password: "Juniper!1" 7 | telegraf: 8 | openconfig: 9 | username: "jcluser" 10 | password: "Juniper!1" 11 | hosts: 12 | 100.123.1.0: 32768 13 | 100.123.1.1: 32768 14 | 100.123.1.2: 32768 15 | 100.123.1.3: 32768 16 | 100.123.1.4: 32768 17 | 100.123.1.5: 32768 18 | 100.123.1.6: 32768 19 | snmp: 20 | community: "public" 21 | hosts: 22 | 100.123.1.0: 161 23 | 100.123.1.1: 161 24 | 100.123.1.2: 161 25 | 100.123.1.3: 161 26 | 100.123.1.4: 161 27 | 100.123.1.5: 161 28 | 100.123.1.6: 161 29 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: '2' 3 | 4 | networks: 5 | tig: 6 | 7 | services: 8 | influxdb: 9 | image: influxdb:1.7.2 10 | container_name: influxdb 11 | expose: 12 | - 8086 13 | - 8083 14 | networks: 15 | - tig 16 | 17 | telegraf-openconfig: 18 | image: telegraf:1.9.1 19 | container_name: telegraf-openconfig 20 | volumes: 21 | - $PWD/configs/telegraf-openconfig.conf:/etc/telegraf/telegraf.conf:ro 22 | depends_on: 23 | - "influxdb" 24 | networks: 25 | - tig 26 | 27 | telegraf-snmp: 28 | image: ksator/telegraf_with_snmp_mib 29 | container_name: telegraf-snmp 30 | volumes: 31 | - $PWD/configs/telegraf-snmp.conf:/etc/telegraf/telegraf.conf:ro 32 | depends_on: 33 | - "influxdb" 34 | networks: 35 | - tig 36 | 37 | grafana: 38 | image: grafana/grafana:5.4.2 39 | container_name: grafana 40 | ports: 41 | - "9081:3000" 42 | environment: 43 | - GF_SECURITY_ADMIN_USER=jcluser 44 | - GF_SECURITY_ADMIN_PASSWORD=Juniper!1 45 | volumes: 46 | - $PWD/configs/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml:ro 47 | - $PWD/configs/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro 48 | - $PWD/dashboards:/var/tmp/dashboards 49 | depends_on: 50 | - "telegraf-openconfig" 51 | - "telegraf-snmp" 52 | networks: 53 | - tig -------------------------------------------------------------------------------- /render.py: -------------------------------------------------------------------------------- 1 | # usage: 2 | # 3 | # Update devices details: 4 | # vi data.yml 5 | # 6 | # To get help: 7 | # python ./render.py -h 8 | # python ./render.py --help 9 | # 10 | # Generate Telegraf configuration file for Openconfig: 11 | # python ./render.py --output 'configs/telegraf-openconfig.conf' --template 'templates/telegraf-openconfig.j2' --yaml 'data.yml' 12 | # python ./render.py -o 'configs/telegraf-openconfig.conf' -t 'templates/telegraf-openconfig.j2' -y 'data.yml' 13 | # 14 | # Generate Telegraf configuration file for SNMP: 15 | # python ./render.py --output 'configs/telegraf-snmp.conf' --template 'templates/telegraf-snmp.j2' --yaml 'data.yml' 16 | # python ./render.py -o 'configs/telegraf-snmp.conf' -t 'templates/telegraf-snmp.j2' -y 'data.yml' 17 | # 18 | # Generate docker-compose file 19 | # python ./render.py -o 'docker-compose.yml' -t 'templates/docker-compose.j2' -y 'data.yml' 20 | 21 | 22 | import yaml 23 | from jinja2 import Template 24 | import argparse 25 | 26 | parser = argparse.ArgumentParser() 27 | parser.add_argument('-o', '--output', help='rendered file') 28 | parser.add_argument('-t', '--template', help='jinja template file') 29 | parser.add_argument('-y', '--yaml', help='YAML variables file') 30 | args = parser.parse_args() 31 | 32 | # Start building telegraf configuration' 33 | 34 | with open(args.yaml) as f: 35 | data=yaml.load(f.read()) 36 | 37 | with open(args.template) as f: 38 | template = Template(f.read(),lstrip_blocks=True, trim_blocks=True) 39 | 40 | conf=open(args.output,'w') 41 | conf.write(template.render(data)) 42 | conf.close() 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | junos-eznc==2.2.0 2 | Jinja2==2.10 3 | PyYAML==3.12 4 | argparse==1.2.1 5 | 6 | -------------------------------------------------------------------------------- /resources/BGP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/BGP.png -------------------------------------------------------------------------------- /resources/BGP_prefixes_received.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/BGP_prefixes_received.png -------------------------------------------------------------------------------- /resources/BGP_prefixes_sent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/BGP_prefixes_sent.png -------------------------------------------------------------------------------- /resources/BGP_sessions_state_established.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/BGP_sessions_state_established.png -------------------------------------------------------------------------------- /resources/EBGP_peers_configured.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/EBGP_peers_configured.png -------------------------------------------------------------------------------- /resources/interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/interfaces.png -------------------------------------------------------------------------------- /resources/inventory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/inventory.png -------------------------------------------------------------------------------- /resources/transitions_to_bgp_established.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksator/junos_monitoring_with_a_TIG_stack/8cdc217a6f74c5145a77bbba68269dd24cb4d9c2/resources/transitions_to_bgp_established.png -------------------------------------------------------------------------------- /templates/docker-compose.j2: -------------------------------------------------------------------------------- 1 | --- 2 | version: '2' 3 | 4 | networks: 5 | tig: 6 | 7 | services: 8 | influxdb: 9 | image: influxdb:1.7.2 10 | container_name: influxdb 11 | expose: 12 | - 8086 13 | - 8083 14 | networks: 15 | - tig 16 | {% if telegraf.openconfig is defined %} 17 | 18 | telegraf-openconfig: 19 | image: telegraf:1.9.1 20 | container_name: telegraf-openconfig 21 | volumes: 22 | - $PWD/configs/telegraf-openconfig.conf:/etc/telegraf/telegraf.conf:ro 23 | depends_on: 24 | - "influxdb" 25 | networks: 26 | - tig 27 | {% endif %} 28 | {% if telegraf.snmp is defined %} 29 | 30 | telegraf-snmp: 31 | image: ksator/telegraf_with_snmp_mib 32 | container_name: telegraf-snmp 33 | volumes: 34 | - $PWD/configs/telegraf-snmp.conf:/etc/telegraf/telegraf.conf:ro 35 | depends_on: 36 | - "influxdb" 37 | networks: 38 | - tig 39 | {% endif %} 40 | 41 | grafana: 42 | image: grafana/grafana:5.4.2 43 | container_name: grafana 44 | ports: 45 | - "{{ grafana.web.port }}:3000" 46 | environment: 47 | - GF_SECURITY_ADMIN_USER={{ grafana.web.username }} 48 | - GF_SECURITY_ADMIN_PASSWORD={{ grafana.web.password }} 49 | volumes: 50 | - $PWD/configs/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml:ro 51 | - $PWD/configs/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro 52 | - $PWD/dashboards:/var/tmp/dashboards 53 | depends_on: 54 | {% if telegraf.openconfig is defined %} 55 | - "telegraf-openconfig" 56 | {% endif %} 57 | {% if telegraf.snmp is defined %} 58 | - "telegraf-snmp" 59 | {% endif %} 60 | networks: 61 | - tig 62 | -------------------------------------------------------------------------------- /templates/telegraf-openconfig.j2: -------------------------------------------------------------------------------- 1 | {% if telegraf.openconfig is defined %} 2 | [[inputs.jti_openconfig_telemetry]] 3 | servers = [ {% for device,port in telegraf.openconfig.hosts.items() %}"{{device}}:{{port}}" {% if not loop.last %}, {%endif%}{% endfor %}] 4 | username = "{{telegraf.openconfig.username}}" 5 | password = "{{telegraf.openconfig.password}}" 6 | client_id = "telegraf" 7 | sample_frequency = "2000ms" 8 | sensors = ["/interfaces/", "/network-instances/network-instance/protocols/protocol/bgp/"] 9 | retry_delay = "1000ms" 10 | str_as_tags = false 11 | {% endif %} 12 | 13 | [[outputs.influxdb]] 14 | urls = ["http://influxdb:8086"] 15 | database = "juniper" 16 | timeout = "5s" 17 | username = "juniper" 18 | password = "juniper" 19 | -------------------------------------------------------------------------------- /templates/telegraf-snmp.j2: -------------------------------------------------------------------------------- 1 | {% if telegraf.snmp is defined %} 2 | [[inputs.snmp]] 3 | agents = [ {% for device,port in telegraf.snmp.hosts.items() %}"{{device}}:{{port}}" {% if not loop.last %}, {%endif%}{% endfor %}] 4 | name_prefix = "snmp_" 5 | interval = "5000ms" 6 | version = 2 7 | community = "{{telegraf.snmp.community}}" 8 | 9 | [[inputs.snmp.field]] 10 | name = "hostname" 11 | oid = "SNMPv2-MIB::sysName.0" 12 | is_tag = true 13 | 14 | [[inputs.snmp.field]] 15 | name = "uptime" 16 | oid = "SNMPv2-MIB::sysUpTime.0" 17 | 18 | [[inputs.snmp.field]] 19 | name = "jnxBoxSerialNo" 20 | oid="JUNIPER-MIB::jnxBoxSerialNo.0" 21 | 22 | [[inputs.snmp.field]] 23 | name = "jnxBoxDescr" 24 | oid="JUNIPER-MIB::jnxBoxDescr.0" 25 | 26 | [[inputs.snmp.field]] 27 | name = "jnxBoxInstalled" 28 | oid="JUNIPER-MIB::jnxBoxInstalled.0" 29 | 30 | [[inputs.snmp.field]] 31 | name = "sysApplInstallPkgVersion" 32 | oid = "SYSAPPL-MIB::sysApplInstallPkgVersion.2" 33 | 34 | [[inputs.snmp.table]] 35 | name = "BGP" 36 | inherit_tags = [ "hostname" ] 37 | # [inputs.snmp.tagpass] 38 | # bgpPeerRemoteAddr = ["192.168*"] 39 | [[inputs.snmp.table.field]] 40 | name = "bgpPeerState" 41 | oid = "BGP4-MIB::bgpPeerState" 42 | [[inputs.snmp.table.field]] 43 | name = "bgpPeerRemoteAddr" 44 | oid = "BGP4-MIB::bgpPeerRemoteAddr" 45 | is_tag = true 46 | [[inputs.snmp.table.field]] 47 | name = "bgpPeerRemoteAs" 48 | oid = "BGP4-MIB::bgpPeerRemoteAs" 49 | [[inputs.snmp.table.field]] 50 | name = "bgpPeerFsmEstablishedTransitions" 51 | oid = "BGP4-MIB::bgpPeerFsmEstablishedTransitions" 52 | 53 | 54 | [[inputs.snmp.table]] 55 | name = "interfaces_statistics" 56 | inherit_tags = [ "hostname" ] 57 | # [inputs.snmp.tagpass] 58 | # ifName = ["ge-0/0/0", "ge-0/0/1", "ge-0/0/2"] 59 | [[inputs.snmp.table.field]] 60 | name = "ifName" 61 | oid = "IF-MIB::ifName" 62 | is_tag = true 63 | [[inputs.snmp.table.field]] 64 | name = "ifHCInOctets" 65 | oid = "IF-MIB::ifHCInOctets" 66 | [[inputs.snmp.table.field]] 67 | name = "ifHCOutOctets" 68 | oid = "IF-MIB::ifHCOutOctets" 69 | [[inputs.snmp.table.field]] 70 | name = "ifHCOutUcastPkts" 71 | oid = "IF-MIB::ifHCOutUcastPkts" 72 | [[inputs.snmp.table.field]] 73 | name = "ifHCInUcastPkts" 74 | oid = "IF-MIB::ifHCInUcastPkts" 75 | [[inputs.snmp.table.field]] 76 | name = "ifOperStatus" 77 | oid = "IF-MIB::ifOperStatus" 78 | [[inputs.snmp.table.field]] 79 | name = "ifAdminStatus" 80 | oid = "IF-MIB::ifAdminStatus" 81 | [[inputs.snmp.table.field]] 82 | name = "ifLastChange" 83 | oid = "IF-MIB::ifLastChange" 84 | {% endif %} 85 | 86 | [[outputs.influxdb]] 87 | urls = ["http://influxdb:8086"] 88 | database = "juniper" 89 | timeout = "5s" 90 | username = "juniper" 91 | password = "juniper" 92 | 93 | [agent] 94 | quiet = true 95 | debug = false 96 | 97 | 98 | -------------------------------------------------------------------------------- /upgrade-junos.py: -------------------------------------------------------------------------------- 1 | # usage: 2 | # download the Junos packages ```openconfig``` and ```network agent``` from Juniper download website and save them locally 3 | # vi data.yml 4 | # python ./upgrade-junos.py 5 | 6 | from yaml import load 7 | from jnpr.junos.utils.sw import SW 8 | from jnpr.junos import Device 9 | 10 | f=open('data.yml', 'r') 11 | data=load(f.read()) 12 | devices_list = data['telegraf']['openconfig']['hosts'] 13 | username = data['telegraf']['openconfig']['username'] 14 | password = data['telegraf']['openconfig']['password'] 15 | f.close() 16 | 17 | pkgs_list = ['network-agent-x86-32-18.2R1-S3.2-C1.tgz', 'junos-openconfig-x86-32-0.0.0.10-1.tgz'] 18 | 19 | for pkg in pkgs_list: 20 | for item in devices_list: 21 | print 'adding the package ' + pkg + ' to the device ' + item 22 | device=Device (host=item, user=username, password=password) 23 | device.open() 24 | sw = SW(device) 25 | sw.install(package=pkg, validate=False, no_copy=False, progress=True, remote_path="/var/home/jcluser") 26 | device.close() 27 | --------------------------------------------------------------------------------