Problems with telemetry (jtimon/Telegraf) on Juniper OS (Junos)

2.2k views Asked by At

we are trying to set some telemetry environment on a Juniper VMX (virtual) router located on AWS.

We configured the router following the documentation, and tried to get some telemetry data from it via jtimon and Telegraf.

The gRPC connection is established and we do receive data, but not exactly what we want. Before continuing, I'm sharing the configuration that we use :

Router configuration (telemetry-related) :

system {
    services {
        extension-service {
            request-response {
                grpc {
                    clear-text {
                        port 32767;}
                    skip-authentication;
                }
            }
            notification {
                allow-clients {
                    address 0.0.0.0/0;
                }
            }
        }
    }
    schema {
        openconfig {
            unhide;}

On Telegraf, we have these settings (for example) :

[[inputs.jti_openconfig_telemetry]]

   servers = ["10.0.100.202:32767"]
   sample_frequency = "10000ms"
   sensors = [
    "15000ms /junos/system/linecard/cpu/memory"
    "2000ms  /components"
    ]
   collection_jitter = "0s"
   flush_interval = "15s"
   flush_jitter = "0s"
   precision = ""
   debug = true
   quiet = false

Basically, our sensors gets created on the router, and we can see them with the show agent sensors command. What we cannot understand is that if we change the sensor in the configuration file of Telegraf, we will still receive the information of all previously subscribed sensors. To be clear : in the example, we subscribe to /junos/system/linecard/cpu/memory and /components. If I delete these lines, subscribe to /interfaces and run Telegraf, we will receive the information from the 3 sensors (/components, .../cpu/memory and /interfaces).

As we understand, this is due to an "ephemeral-configuration" called "junos-analytics", as written in the official documentation :

Starting in Junos OS Release 18.2R1, when an external streaming server, or collector, provisions sensors to export data through gRPC on devices running Junos OS, the sensor configuration is committed to the junos-analytics instance of the ephemeral configuration database, and the configuration can be viewed by using the show ephemeral-configuration instance junos-analytics operational command.

Thing is, we don't understand how to edit/disable/delete this "junos-analytics" instance. From what we see, some new sensors (sometimes with the exact same path) get created (with a different sensor ID / name) everytime we run Telegraf. We don't know how to delete them (we tried with a delete services analytics sensor *sensor_name* but it resulted in a "statement not found" error message...).

To sum up, we do receive our sensors' data, but it comes in the middle of lots and lots of other (useless) previously subscribed data.

I feel like we might be missing something in the router configuration, as Telegraf and jtimon show the same behaviour/results.

Any help is appreciated, I can of course share more information if needed ! Thanks in advance :)

1

There are 1 answers

0
Eric-sama On

Just in case someone is having the same problem : we contacted the Juniper support, they asked us to upgrade our Junos version (from 18.2 to 19.X) and that solves the problem !