Forum Discussion

Andy's avatar
Andy
Icon for Nimbostratus rankNimbostratus
Oct 10, 2023

Telemetry Streaming Question

Hi, I'm after a little assistance, I have installed the Telemetry Streaming extension to use Opentelemetry as an endpoint. I've been able to achieve this and my receiver is receiving the metrics. The declaration I am POST-ing is as follows

 

{
    "class": "Telemetry",
    "My_System": {
        "class": "Telemetry_System",
        "systemPoller": {
            "interval": 60
        }
    },
    "My_Listener": {
        "class": "Telemetry_Listener",
        "port": 6514
    },
    "My_Consumer": {
        "class": "Telemetry_Consumer",
        "type": "OpenTelemetry_Exporter",
        "host": "10.1.2.3",
        "port": 4317,
        "metricsPath": "/v1/metrics",
        "convertBooleansToMetrics": true,
        "enable": true,
        "trace": false,
        "allowSelfSignedCert": true,
        "exporter": "protobuf",
        "protocol": "https"
    } 
}

 

This is succesful as I say, but the received metrics don't include a hostname (which is important as there are some profile duplications on the 40+ devices looked afer), is there a way to insert the hostname into the messages exported from the systems?

Thanks in advance.

  • Dahl's avatar
    Dahl
    Icon for Altostratus rankAltostratus

    Hi all F5 contributers,

    Andy, hope you dont mind sort of highjacking you thread. But did not want to start another thread with same topic.

    Trying to send Telemetry metric data to ElasticSeach pipeline but not recieving any actuallt metric data. I see what to be more syslog data comming in to system. Telemetry have been configured.
    Followed and configure same as mention here https://my.f5.com/manage/s/article/K000134780
    See same content output when tail /var/tmp/telemetry_trace.log as described here https://clouddocs.f5.com/products/extensions/f5-telemetry-streaming/latest/output-example.html

    AS3 declaration

    {
    	"class": "Telemetry",
         "controls": {
             "class": "Controls",
             "logLevel": "debug",
             "debug": true
         },
         "vcc_Listener": {
            "class": "Telemetry_Listener",
            "port": 6514
        },
        "vcc_System": {
            "class": "Telemetry_System",
            "trace": "/var/tmp/telemetry_trace.log",
            "systemPoller": {
                "interval": 60
            }
        },
        "vcc_ELK_Consumer": {
            "class": "Telemetry_Consumer",
            "type": "ElasticSearch",
            "host": "x.x.x.x",
            "port": "5047",
            "protocol": "http",
            "allowSelfSignedCert": "true",
            "index": "f5telemetry",
            "dataType": "f5telemetry"
        }
    }

     Pipeline

    input {
      http {
        port => "5047"
        additional_codecs => { "application/json" => "json_lines" }
      }
    }
    
    filter {
      json {
        source => "message"
      }
    }
    
    output {
        elasticsearch {
            data_stream => true
            data_stream_type => "metrics"
            data_stream_dataset => "f5"
            data_stream_namespace => "prod"
            data_stream_auto_routing => true
            hosts => ["${ES_HOSTS}"]
            codec => json
            ssl => true
            cacert => "/etc/logstash/certificates/ca.crt"
            user => "${ES_USER}"
            password => "${ES_PASSWORD}"
    	}
    }

     Any sort of help is very much appreciated

    Thanks in advance
    Patric

  • You can include the hostname in the exported metrics by adding a "tags" field within the "My_Consumer" section of your Telemetry declaration. This will help distinguish data from different devices. Simply replace "Your_Hostname" with the actual hostname of the device.

  • Andy's avatar
    Andy
    Icon for Nimbostratus rankNimbostratus

    Yes, I'd seen that article, but I couldn't work out how to insert the hostname into my TS declaration.