cancel
Showing results for 
Search instead for 
Did you mean: 
nitratic
Cirrostratus
Cirrostratus

Configuration using CLI of F5 BIG-IP device

Following steps for the configuration of telemetry streaming consumer target using CLI of F5 BIG-IP device are discussed below:

Once you have accessed your F5 BIG-IP device CLI terminal then access either your default admin credentials or the new user you’ve recently created on the above section. Then execute the following commands on the terminal:

On the username and password section, you either enter your default admin credentials or the new user you’ve recently created has the administrator privilege.

curl -u username:password -k https://localhost/mgmt/shared/telemetry/declare

 

Note:

-k, --insecure

to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless -k, --insecure is used.

 

ChangChange into tmp directory and create a file called ts-config.json and I am using vi editor for it.  

cd /tmp

vi ts-config.json

 

 

Paste the Telemetry Streaming declaration and then save the file and exit the vi editor.

{

    "class": "Telemetry",

    "My_Poller": {

        "class": "Telemetry_System_Poller",

        "interval": 0

    },

    "My_System": {

        "class": "Telemetry_System",

        "enable": "true",

        "systemPoller": [

            "My_Poller"

        ]

    },

    "metrics": {

        "class": "Telemetry_Pull_Consumer",

        "type": "Prometheus",

        "systemPoller": "My_Poller"

    }

}

 

 

Then execute the following command on the terminal on the same directory /tmp and change the username and password section with your F5 BIG-IP device credentials having the administrator privilege.

curl -X POST -u username:password -k https://localhost/mgmt/shared/telemetry/declare -d @ts-config.json -H “content-type:application/json”

 

 

 

To verify the available metrics

curl -u username:password -k https://localhost/mgmt/shared/telemetry/pullconsumer/metrics

 

 

Section III: Configuration of Prometheus

Once the telemetry streaming service has been successfully configured and the metrics are available on the path. We need to configure Prometheus in order to scrape the metrics data on the predefined path. The following are the steps to configure the Prometheus:

Note: On this user-guide demonstration, both Grafana and Prometheus are installed on the same host with different service ports as mentioned earlier. CentOS 7 is used as the OS for this host machine and you may have different syntax to view the following status check.

 

First, check the status of the Prometheus

sudo systemctl status prometheus.service

 

View the current working directory and change into /etc/prometheus

pwd

cd /etc/prometheus

ls -al

 

global:

  scrape_interval: 10s

 

scrape_configs:

  - job_name: 'TelemetryStreaming'

    scrape_timeout: 30s

    scrape_interval: 30s

    scheme: https

 

    tls_config:

     insecure_skip_verify: true

 

    metrics_path: '/mgmt/shared/telemetry/pullconsumer/metrics'

    basic_auth:

     username: 'F5-BIG-IP-username'

     password: 'F5-BIG-IP-password'

    static_configs:

      - targets: ['BIGIP-managementIP:443']

 

 

 

Then restart the Prometheus service and check the status of the Prometheus service.

sudo systemctl restart prometheus.service

sudo systemctl status prometheus.service

 

Note: If the configuration is correct, then the Prometheus service will be enabled otherwise, the status of the Prometheus service will be disabled.

 

To further verify whether instances has been discovered on the Prometheus:

-   Go to http://prometheus-ip:service/port

 

-   Click on the Status option and select the Target option

 

 

Section IV: Configuration on Grafana using Prometheus as a data source

In this section, we need to connect Prometheus as a data source on Grafana

 

Once the data source has been successfully configured on Grafna then Create a new dashboard and select Prometheus as the data source then select the relevant metrics and change the refresh interval as required. Save and apply the panel. Then, Save the dashboard and view the metrics on the Grafana dashboard.

 

 

The possible issue that can arise during the configuration

If you use the default TS declare from the official telemetry streaming document website then you may fail to view the available metrics on the mentioned link:

https://<f5-management-ip>/mgmt/shared/telemetry/pullconsumer/metrics