MDT (Model Driven Telemetry): Replaces SNMP \\ What is gRPC (streaming telemetry) * Google Remote Procedure call (remote call on the device) . Is an open source alternative/improvement to classic restAPI. It adds consistency, also uses binary messages instead of json text so it's more efficient traffic-wise. Uses standard language: protobuf which is supported by python among others. * protobuf 'file' define what RPCs are available. Is provided by the vendor and abstracts the way to interact to the system. * We convert or compile 'protobuf' to python libraries. 'Protoc' creates a library that you can start using straight away in your code * The messages are binary but we can do marshaling and see the key-value pairs with 'kgbb' * It uses http2 by default (port 50051). With a single channel it can send a bunch of requests. So only one http handshake is needed. * All is defined in the client (jti-client in our case) (define how many channels, etc) ---- **gNMI** \\ See this insight on prometheus-grafana-exporters and gnmi: {{ :network_stuff:juniper:monitoring_cisco_networks_with_prometheus_grafana_and_exporters_fintech_focus_.pdf |}} * Provides **1) Network Management and 2) Streaming telemetry** * Uses HTTP/TCP so reliable compared to snmp * And also extremely light. It uses RPCs more efficiently than netconf (like it were issued in the target machine itself) See [[https://indico.csnog.eu/event/11/contributions/107/attachments/87/181/NETCONF_vs_gNMI_CSNOG_2022.pdf|comparison]] * gRPC Network Management Interface. Is a way to interact to grpc with Standard, reduced, RPCs. * gnmi defines Four RPCs: * ''capabilities'' ("show me what you can offer") * ''get'' (like a netconf get) * ''set'' (like a netconf set, also to update and delete) * ''subscribe'' ( hook to a stream ) * Junos in particular uses the **[[https://www.juniper.net/documentation/us/en/software/junos/interfaces-telemetry/topics/concept/open-config-grpc-junos-telemetry-interface-understanding.html|JTI client]]** which includes gNMI : //Junos Telemetry Interface Client (jtimon) is an application that can be used to collect telemetry streams from a Juniper device streaming in native format over UDP, or in OpenConfig format over gRPC.// **Topology ( gNMI + Telegraf plugin)** {{:network_stuff:juniper:gnmi-n-telegraf-nx-os.png?800|}} ---- __**MESSAGE QUEUING TECHNOLOGIES**__ \\ * The client subscribes to the server/broker but the client can **receive or send data** * **Topics are labels** that you publish messages to and subscribe to. They are arranged as a hierarchy \\ __Kafka__ \\ Kafka focuses on the storage and reading of data, aiming at streaming data processing scenarios with high real-time performance \\ __MQTT - MQ Telemetry Transport__ \\ is a lightweight, publish-subscribe, machine to machine network protocol for Message queue/Message queuing service. It is designed for connections with remote locations that have devices with resource constraints. sudo apt install mosquitto mosquitto-clients # creates the broker. This can be a simple raspberry pi mosquitto_sub -h localhost -t test # Test subscription to a test topic (still non-existing) mosquitto_pub -h localhost -t test -m "hello world" # publishes a test message in the 'test' topic ! mosquitto_sub -h -t /merakimv// # subscribes ---- Then **PMACCT** (pmaccount) to correlate information and extract trends: pmacct is a small set of multi-purpose passive network monitoring tools [NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry]. ---- References: * [[https://dave.dev/blog/2018/05/configuring-ssl-grpc-junos/|Configuring SSL for gRPC on Junos]] * [[https://github.com/ksator/junos_monitoring_with_prometheus|Ejti-and-prometheus]] * [[https://blog.networktocode.com/post/monitor_your_network_with_gnmi_snmp_and_grafana/|Monitor-Your-Network-With-gNMI-SNMP-and-Grafana]] * [[https://www.youtube.com/watch?v=4qpI4T6_bUw|Setup_Grafana]] * [[http://njrusmc.net/pub/etech.pdf]] * [[https://community.cisco.com/t5/service-providers-documents/understanding-gnmi-on-ios-xr-with-python/ta-p/4014205|External Link]]