Juniper / jtimon

Junos Telemetry Interface (JTI) client
Apache License 2.0
31 stars 10 forks source link

added support for leaf-list for gnmi and pre-gnmi #49

Closed amohit1315 closed 1 month ago

amohit1315 commented 1 month ago

Related Issue(s): #48

added support for leaf-list for gnmi and pre-gnmi

Config:

{
    "host": "**.**.**.**",
    "port": *****,
    "user": "******",
    "password": "******",
    "cid": "test1",
    "influx" : {
        "server" : "0.0.0.0",
        "port" : 8086,
        "dbname" : "TEST",
        "measurement" : "jtisim",
        "recreate" : true,
        "user" : "influx",
        "password" : "influxdb",
        "batchfrequency" : 1000
    },
    "vendor": {
        "gnmi": {
          "encoding": "protobuf"
        }
    },
    "paths": [{
        "path": "/interfaces/interface/aggregation/state/",
        "freq": 10000
    }
    ],
    "log" : {
        "verbose": true
    }
}

Logs:

jctx.config.Influx.WritePerMeasurement: false.. 
New point: /interfaces/interface/aggregation/state/,/interfaces/interface/@name=ae0,component=dcd,component_id=65535,device=10.207.147.141,sensor=sensor_1004:/interfaces/interface/aggregation/state/:/interfaces/interface/aggregation/state/:dcd /interfaces/interface/__export_timestamp__=1726954075503i,/interfaces/interface/__producer_timestamp__=1726954075503i,/interfaces/interface/aggregation/state/lag-speed=0,/interfaces/interface/aggregation/state/lag-type="STATIC",**/interfaces/interface/aggregation/state/member="ge-0/0/3, ge-0/0/5"**,/interfaces/interface/aggregation/state/min-links=1,__device_timestamp__=1726954075503i,vendor="gnmi" 1726954075633731249

Influx:

> use TEST
Using database TEST
> show measurements
name: measurements
name
----
/interfaces/interface/aggregation/state/
> select * from "/interfaces/interface/aggregation/state/" order by desc limit 2
name: /interfaces/interface/aggregation/state/
time                /__export_timestamp__ /__producer_timestamp__ /interfaces/interface/@name /interfaces/interface/__export_timestamp__ /interfaces/interface/__producer_timestamp__ /interfaces/interface/aggregation/state/lag-speed /interfaces/interface/aggregation/state/lag-type /interfaces/interface/aggregation/state/member /interfaces/interface/aggregation/state/min-links __device_timestamp__ component component_id device         sensor                                                                                            vendor
----                --------------------- ----------------------- --------------------------- ------------------------------------------ -------------------------------------------- ------------------------------------------------- ------------------------------------------------ ---------------------------------------------- ------------------------------------------------- -------------------- --------- ------------ ------         ------                                                                                            ------
1726954076683025421 1726954076554         1726954076553                                                                                                                                                                                                                                                                                                                                   1726954076553        dcd       65535        10.207.147.141 sensor_1004:/interfaces/interface/aggregation/state/:/interfaces/interface/aggregation/state/:dcd gnmi
1726954075633731249                                               ae0                         1726954075503                              1726954075503                                0                                                 STATIC                                           ge-0/0/3, ge-0/0/5                             1                                                 1726954075503        dcd       65535        10.207.147.141 sensor_1004:/interfaces/interface/aggregation/state/:/interfaces/interface/aggregation/state/:dcd gnmi