nileshsimaria / jtimon

Junos Telemetry Interface client
MIT License
81 stars 29 forks source link

tag keys defined by user #27

Open psagrera opened 6 years ago

psagrera commented 6 years ago

is there any way in which I can define my own tag keys to be inserted into influxdb ?

Example:

I'm gathering data for interfaces sensor (see below config)

    {
        "host": "10.102.187.188",
        "port": 50051,
        "cid": "mac1",
        "paths": [{
            "path": "/junos/system/linecard/interface/",
            "freq": 10000
        }],
        "influx": {
            "server": "172.17.0.2",
            "port": 8086,
            "dbname": "juniper",
            "user": "juniper",
            "password": "juniper",
            "recreate": true,
            "measurement": "/interface_test/"
        },

        "log": {
            "file": "test.log"
        }
    }

I'd need "/interfaces/interface/state/parent_ae_name" as tagKey in order to be able of grouping by this field . I know this can be done in jti_openconfig_telemetry plugin just setting the variable str_as_tags = true , that will treat all strings as tags.

Regards

Pablo

nileshsimaria commented 5 years ago

JTIMON does not support custom tagging. It is a good feature request, I will add it to the work list.

psagrera commented 5 years ago

Thank you very much Nilesh.

door7302 commented 5 years ago

hello

We use this chain : Telegraf --> influx --> grafana

We use on Telegraf:

Input : jti_openconfig_telemetry Ouput : influx

Currently Junos doesn't export AE statistic . We only have physical interface stats and for each physical interface on which ae this interface is a member. So we have two distinct paths :

when telegraf exports to influx the collected data we don't have the parent_ae field/tag attached to the entries related to /interfaces/interface/state/counters/ even if we add the knob str_as_tags = true because the parent_ae_name field is not present on /interfaces/interface/state/counters/. So we could not convert it in tag.

Thus, it is difficult/impossible to simply aggregate the counters of several physical interfaces attached to a same AE

Is there an easy way to achieve that ? with jtimon ?

BR David