Pull Consumers

Use this section to find example declarations and notes for pull-based monitoring systems. See Push Consumers for push-based consumers.

About Pull Consumers

F5 BIG-IP Telemetry Streaming 1.11 introduced a pull consumer to support pull-based monitoring systems using a new class called Telemetry_Pull_Consumer. External systems can use this Pull API to pull/scrape for metrics.

  • F5 BIG-IP Telemetry Streaming Pull Consumers expose a new HTTP API, which can be scraped for metrics.
  • You can only pull data from Systems and/or System Pollers that are already defined through an F5 BIG-IP Telemetry Streaming declaration.
  • With TS 1.11, you can set a Telemetry_System_Poller interval=0. This disables the background polling process, but keeps the Poller enabled. Using interval=0 on a Poller allows for the Poller to only collect data from a BIG-IP when the Pull Consumer API endpoint is scraped, so that the Poller doesn’t collect data from a BIG-IP when it is not needed.
  • If a Poller is used for both a Pull Consumer and a Push Consumer, the interval will need to be set to a non-zero number of seconds, so that the background polling process will collect data and push it to the configured Push Consumers.
  • Each Pull Consumer must reference, via the systemPoller property, which Telemetry_System_Poller the Pull Consumer will collect data from when the Pull Consumer HTTP API is called. This can be configured as a single systemPoller, or as an array of systemPollers, using the name of the configured System Poller.
  • If a Poller referred by a Pull Consumer was attached to two Systems, then the response from the Pull Consumer will contain data from those Systems.

Using a Pull Consumer

Telemetry Streaming now exposes the /mgmt/shared/telemetry/pullconsumer/<pull_consumer_name> HTTP endpoint, which returns metrics from the Pull Consumer referenced, by name, in the HTTP call.

Example CURL call: GET /mgmt/shared/telemetry/pullconsumer/My_Pull_Consumer

See Telemetry_Pull_Consumer in the Schema Reference for usage information.


Using Pull Consumers and Push Consumers

An F5 BIG-IP Telemetry Streaming declaration may contain multiple System Pollers, as well as both Push Consumer(s) and Pull Consumer(s).

The following example contains:

  • Two Telemetry_System_Pollers (My_Poller and My_VS_Poller), both attached to the Telemetry_System (My_System)
  • One Push Consumer (Splunk_Consumer)
  • One Pull Consumer (My_Pull_Consumer)

In this example:

  • The My_Poller System Poller queries the BIG-IP every 60 seconds for telemetry data. My_Poller pushes that telemetry data to all of the enabled Push Consumers – in this case, the Splunk_Consumer.
  • The My_VS_Poller System Poller has a polling interval equal to 0 – it does not poll the BIG-IP for telemetry data on its own schedule.
  • The My_Pull_Consumer Pull Consumer references the My_VS_Poller.
    When My_Pull_Consumer is queried (via an HTTP GET), it:
    • Invokes My_VS_Poller, causing My_VS_Poller to fetch telemetry data from the BIG-IP,
    • Applies the filtering defined in the actions block,
    • Returns the formatted data in the HTTP response body.
  • The telemetry data fetched by My_VS_Poller is NOT sent to the Splunk_Consumer Consumer.
{
    "class": "Telemetry",
    "My_System": {
        "class": "Telemetry_System",
        "enable": "true",
        "systemPoller": ["My_Poller", "My_VS_Poller"]
    },
    "My_Poller": {
        "class": "Telemetry_System_Poller",
        "interval": 60
    },
    "My_VS_Poller": {
        "class": "Telemetry_System_Poller",
        "interval": 0,
        "actions": [
                {
                    "includeData": {},
                    "locations": {
                        "virtualServers": true
                    }
                }
            ]
    },
    "Splunk_Consumer": {
        "class": "Telemetry_Consumer",
        "type": "Splunk",
        "host": "192.168.2.1",
        "protocol": "https",
        "port": 8088,
        "passphrase": {
            "cipherText": "apikey"
        }
    },
    "My_Pull_Consumer": {
    	"class": "Telemetry_Pull_Consumer",
    	"type": "default",
        "systemPoller": ["My_VS_Poller"]
    }
}


Default Pull Consumer

This example shows how to use the default pull consumer. For the default pull consumer, the type must be default in the Pull Consumer class as shown.

The primary use case of such type of pull consumer is troubleshooting.

Example declaration:

{
    "class": "Telemetry",
    "My_Poller": {
        "class": "Telemetry_System_Poller",
        "interval": 0
    },
    "My_System": {
        "class": "Telemetry_System",
        "enable": "true",
        "systemPoller": ["My_Poller"]
    },
    "My_Pull_Consumer": {
        "class": "Telemetry_Pull_Consumer",
        "type": "default",
        "systemPoller": ["My_Poller"]
    }
}

Prometheus Pull Consumer

Prometheus

This example shows how to use the Prometheus pull consumer. For this pull consumer, the type must be Prometheus in the Pull Consumer class as shown.

The Prometheus Pull Consumer outputs the telemetry data according to the Prometheus data model specification. For more information about the Prometheus data model, see https://prometheus.io/docs/concepts/data_model/.

NOTE: To access the consumer endpoint with a user other than admin, refer to this article on DevCentral. When you create the resource group while following this guide, you will need a resource group similar to the following:

{
   "name": "prometheusResourceGrup",
   "resources": [
      {
            "restMethod": "GET",
            "resourceMask": "/mgmt/shared/telemetry/pullconsumer/My_Pull_Consumer"
      }
   ]
}

Example declaration:

{
    "class": "Telemetry",
    "My_Poller": {
        "class": "Telemetry_System_Poller",
        "interval": 0
    },
    "My_System": {
        "class": "Telemetry_System",
        "enable": "true",
        "systemPoller": "My_Poller"
    },
    "My_Pull_Consumer": {
        "class": "Telemetry_Pull_Consumer",
        "type": "Prometheus",
        "systemPoller": "My_Poller"
    }
}