Example Declarations¶
This section contains example F5 BIG-IP Telemetry Streaming declarations. Use the index on the right to go directly to a specific declaration.
Base Declaration¶
This example shows the base declaration.
{
"class": "Telemetry",
"My_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 60
}
},
"My_Listener": {
"class": "Telemetry_Listener",
"port": 6514
},
"My_Consumer": {
"class": "Telemetry_Consumer",
"type": "Splunk",
"host": "192.168.2.1",
"protocol": "https",
"port": 8088,
"passphrase": {
"cipherText": "apikey"
}
}
}
Two Consumers¶
Note: This example shows only the Consumer class of the declaration and needs to be included with the rest of the base declaration.
{
"class": "Telemetry",
"My_Consumer": {
"class": "Telemetry_Consumer",
"type": "Azure_Log_Analytics",
"workspaceId": "workspaceid",
"passphrase": {
"cipherText": "sharedkey"
}
},
"My_Second_Consumer": {
"class": "Telemetry_Consumer",
"type": "Splunk",
"host": "192.168.2.1",
"protocol": "https",
"port": 8088,
"passphrase": {
"cipherText": "apikey"
}
}
}
External System (BIG-IP)¶
This example shows a case where Telemetry Streaming on one BIG-IP can pull statistics from an additional BIG-IP.
{
"My_Poller": {
"class": "Telemetry_System_Poller",
"interval": 60,
"host": "192.168.2.1",
"port": 443,
"username": "myuser",
"passphrase": {
"cipherText": "mypassphrase"
}
}
}
iHealth Poller¶
This example shows the iHealth Poller.
{
"class": "Telemetry",
"My_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 60
},
"iHealthPoller": {
"username": "username",
"passphrase": {
"cipherText": "passphrase"
},
"proxy": {
"host": "192.168.2.1",
"protocol": "https",
"port": 443,
"enableHostConnectivityCheck": false,
"allowSelfSignedCert": false,
"username": "username",
"passphrase": {
"cipherText": "passphrase"
}
},
"interval": {
"timeWindow": {
"start": "23:15",
"end": "02:15"
},
"frequency": "monthly",
"day": "5"
}
}
}
}
Referenced Pollers¶
This example shows referenced Pollers.
{
"class": "Telemetry",
"My_System_Inline_Pollers": {
"class": "Telemetry_System",
"enable": true,
"trace": false,
"host": "localhost",
"port": 8100,
"protocol": "http",
"allowSelfSignedCert": false,
"enableHostConnectivityCheck": false,
"username": "admin",
"passphrase": {
"cipherText": "passphrase"
},
"systemPoller": {
"enable": true,
"trace": false,
"interval": 60,
"httpAgentOpts": [
{ "name": "keepAlive", "value": true },
{ "name": "keepAliveMsecs", "value": 600000 },
{ "name": "maxFreeSockets", "value": 5 },
{ "name": "maxSockets", "value": 5 }
]
},
"iHealthPoller": {
"username": "username",
"passphrase": {
"cipherText": "passphrase"
},
"proxy": {
"host": "127.0.0.1",
"protocol": "http",
"port": 80,
"enableHostConnectivityCheck": false,
"allowSelfSignedCert": false,
"username": "username",
"passphrase": {
"cipherText": "passphrase"
}
},
"interval": {
"timeWindow": {
"start": "23:15",
"end": "07:15"
},
"frequency": "monthly",
"day": "5"
}
}
},
"My_System_Referenced_Pollers": {
"class": "Telemetry_System",
"enable": true,
"trace": false,
"host": "localhost",
"port": 8100,
"protocol": "http",
"allowSelfSignedCert": false,
"enableHostConnectivityCheck": false,
"username": "admin",
"passphrase": {
"cipherText": "passphrase"
},
"systemPoller": "My_Poller",
"iHealthPoller": "My_iHealth"
},
"My_Poller": {
"class": "Telemetry_System_Poller",
"enable": true,
"trace": false,
"interval": 60
},
"My_iHealth": {
"class": "Telemetry_iHealth_Poller",
"username": "username",
"passphrase": {
"cipherText": "passphrase"
},
"proxy": {
"host": "192.168.2.1",
"protocol": "https",
"port": 443,
"enableHostConnectivityCheck": false,
"allowSelfSignedCert": false,
"username": "username",
"passphrase": {
"cipherText": "passphrase"
}
},
"interval": {
"timeWindow": {
"start": "23:15",
"end": "04:15"
},
"frequency": "monthly",
"day": "5"
}
}
}
Custom Endpoints¶
See Configuring Custom Endpoints for more information on this feature.
{
"class": "Telemetry",
"Endpoints_Profiles": {
"class": "Telemetry_Endpoints",
"basePath": "/mgmt/tm/ltm/profile",
"items": {
"radiusProfiles": {
"name": "radiusProfiles",
"path": "radius/stats"
},
"ipOtherProfiles": {
"name": "ipOtherProfiles",
"path": "ipother/stats"
}
}
},
"Endpoints_Misc": {
"class": "Telemetry_Endpoints",
"items": {
"clientside.totConns": {
"name": "virtualTotConns",
"path": "/mgmt/tm/ltm/virtual/stats?$select=clientside.totConns"
},
"virtualAddress": {
"path": "/mgmt/tm/ltm/virtual-address/stats"
}
}
},
"Custom_System": {
"class": "Telemetry_System",
"systemPoller": [
"Custom_System_Poller1",
"Custom_System_Poller2",
{
"interval": 60
}
]
},
"Custom_System_Poller1": {
"class": "Telemetry_System_Poller",
"interval": 60,
"endpointList": "Endpoints_Profiles"
},
"Custom_System_Poller2": {
"class": "Telemetry_System_Poller",
"interval": 720,
"endpointList": [
"Endpoints_Misc/clientside.totConns",
{
"path": "/mgmt/tm/net/vlan/stats",
"name": "requiredWhenInline"
}
]
},
"Default_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 360
}
}
}
Value-based matching¶
See Value-based matching for more information on this feature.
{
"class": "Telemetry",
"My_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 60,
"actions": [
{
"includeData": {},
"ifAnyMatch": [
{
"virtualServers": {
"/test/*": {
"enabledState": "enabled",
"availabilityState": "available"
}
}
},
{
"virtualServers": {
"/test/*": {
"enabledState": "disabled",
"availabilityState": "available"
}
}
}
],
"locations": {
"virtualServers": {
".*": true
}
}
},
{
"excludeData": {},
"ifAllMatch": {
"system": {
"licenseReady": "no",
"provisionReady": "no"
}
},
"locations": {
".*": true
}
}
]
}
}
}
Generic HTTP with multiple passphrases¶
If you require multiple secrets for the Generic HTTP consumer, BIG-IP TS supports defining an additional secret within Shared
and referencing it using pointers as shown in this example.
For more details about pointers see the section on Pointer Syntax.
{
"class": "Telemetry",
"Shared": {
"class": "Shared",
"secretPath": {
"class": "Secret",
"cipherText": "/?token=secret"
}
},
"My_Consumer": {
"class": "Telemetry_Consumer",
"type": "Generic_HTTP",
"host": "192.168.2.1",
"protocol": "https",
"port": 443,
"path": "`>/Shared/secretPath`",
"method": "POST",
"headers": [
{
"name": "content-type",
"value": "application/json"
},
{
"name": "x-api-key",
"value": "`>@/passphrase`"
}
],
"passphrase": {
"cipherText": "apikey"
}
}
}
Specifying fallback hosts for Generic HTTP consumers¶
Configuring fallback hosts for Generic HTTP consumers is supported as of BIG-IP TS 1.23 (was experimental in 1.14-1.22).
This example shows how you can use the fallbackHosts property to specify fallback IP address(es) for a consumer.
{
"class": "Telemetry",
"Consumer_With_Fallback_Hosts": {
"class": "Telemetry_Consumer",
"type": "Generic_HTTP",
"host": "192.168.2.1",
"fallbackHosts": [
"192.168.2.2",
"192.168.2.3",
"192.168.2.4"
],
"protocol": "https",
"port": 443,
"path": "/",
"method": "POST",
"headers": [
{
"name": "content-type",
"value": "application/json"
},
{
"name": "x-api-key",
"value": "`>@/passphrase`"
}
],
"passphrase": {
"cipherText": "apikey"
}
}
}
Specifying proxy settings for Generic HTTP consumers¶
This example shows how you can configure proxy settings for Generic HTTP consumers in BIG-IP TS 1.17 and later. This allows you to send Telemetry Streaming data through a proxy.
For usage options, see Proxy in the Schema Reference.
The following example also uses BIG-IP Telemetry Streaming Namespaces. The proxy lines are highlighted in the example.
{
"class": "Telemetry",
"controls": {
"class": "Controls",
"logLevel": "debug",
"debug": true
},
"With_Proxy_HTTPS_target": {
"class": "Telemetry_Namespace",
"Poller": {
"class": "Telemetry_System_Poller",
"interval": 60
},
"HTTP": {
"class": "Telemetry_Consumer",
"type": "Generic_HTTP",
"host": "192.168.1.100",
"protocol": "https",
"port": "443",
"proxy": {
"host": "10.10.14.14",
"port": 5053,
"protocol": "http",
"username": "test_username",
"passphrase": {
"cipherText": "test_passphrase"
},
"allowSelfSignedCert": true
}
}
},
"With_Proxy_HTTP_Target": {
"class": "Telemetry_Namespace",
"Poller": {
"class": "Telemetry_System_Poller",
"interval": 100
},
"HTTP": {
"class": "Telemetry_Consumer",
"type": "Generic_HTTP",
"host": "192.168.10.100",
"protocol": "http",
"port": "8080",
"proxy": {
"host": "10.10.14.15",
"port": 5054,
"protocol": "http"
}
}
}
}
Specifying proxy settings for Splunk consumers¶
This example shows how you can configure proxy settings for Splunk consumers in BIG-IP TS 1.17 and later. This allows you to send BIG-IP Telemetry Streaming data through a proxy.
For usage options, see Proxy in the Schema Reference.
The following example also uses BIG-IP Telemetry Streaming Namespaces. The proxy lines are highlighted in the example.
{
"class": "Telemetry",
"controls": {
"class": "Controls",
"logLevel": "debug",
"debug": false
},
"With_Proxy_HTTPS_target": {
"class": "Telemetry_Namespace",
"Poller": {
"class": "Telemetry_System_Poller",
"interval": 60
},
"Splunk": {
"class": "Telemetry_Consumer",
"type": "Splunk",
"host": "192.168.2.1",
"protocol": "https",
"port": 8088,
"passphrase": {
"cipherText": "apikey"
},
"proxy": {
"host": "10.10.14.14",
"port": 5053,
"protocol": "https",
"username": "me",
"passphrase": {
"cipherText": "myself"
},
"allowSelfSignedCert": false
},
"trace": false,
"enable": true
}
},
"With_Proxy_HTTP_Target": {
"class": "Telemetry_Namespace",
"Poller": {
"class": "Telemetry_System_Poller",
"interval": 100
},
"Splunk": {
"class": "Telemetry_Consumer",
"type": "Splunk",
"host": "192.168.2.1",
"protocol": "https",
"port": 8088,
"passphrase": {
"cipherText": "apikey"
},
"proxy": {
"host": "10.10.14.15",
"port": 5053,
"protocol": "https"
},
"trace": false,
"enable": true
}
}
}
Generic HTTP consumer with TLS Client Authentication¶
This example shows how you can configure TLS client authentication for Generic HTTP consumers in a BIG-IP Telemetry Streaming declaration using version 1.18 and later.
{
"class": "Telemetry",
"My_Consumer": {
"class": "Telemetry_Consumer",
"type": "Generic_HTTP",
"host": "192.168.2.1",
"protocol": "https",
"port": 443,
"path": "/",
"method": "POST",
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"privateKey": {
"cipherText": "-----BEGIN KEY-----\nMIIE...\n-----END KEY-----"
},
"clientCertificate": {
"cipherText": "-----BEGIN CERTIFICATE-----\nMIID...\n-----END CERTIFICATE-----"
},
"rootCertificate": {
"cipherText": "-----BEGIN CERTIFICATE-----\nMIID...\n-----END CERTIFICATE-----"
}
}
}
Customizing the Generic HTTP consumer payload¶
Important
Customizing the Generic HTTP consumer payload is available in TS v1.20.0 and later. See Customizing the F5 BIG-IP Telemetry Streaming payload for complete information on this feature.
{
"class": "Telemetry",
"My_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 60
}
},
"My_Consumer": {
"class": "Telemetry_Consumer",
"type": "Generic_HTTP",
"host": "192.168.2.1",
"protocol": "http",
"port": 8080,
"path": "/bigip",
"actions": [
{
"JMESPath": {},
"expression": "{ virtuals: virtualServers, service: telemetryEventCategory, hostname: system.hostname, staticTag: 'any string value' }"
}
]
}
}
Using the addTags property for the StatsD consumer¶
Important
The addTags property is available in BIG-IP TS v1.21.0 and later. See StatsD addTags for more information on this feature.
The following example shows a declaration with a systemPoller, a Listener, and a StatsD consumer with addTags using the sibling method.
{
"class": "Telemetry",
"My_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 60
}
},
"My_Consumer_with_AutoTagging": {
"class": "Telemetry_Consumer",
"type": "Statsd",
"host": "192.168.2.1",
"protocol": "udp",
"port": 8125,
"addTags": {
"method": "sibling"
}
}
}
Next, we show the output from the System poller:
{
"pools": {
"/Common/app.app/app_pool": {
"activeMemberCnt": 0,
"serverside.bitsIn": 0,
"serverside.bitsOut": 0,
"serverside.curConns": 0,
"serverside.maxConns": 0,
"serverside.pktsIn": 0,
"serverside.pktsOut": 0,
"serverside.totConns": 0,
"availabilityState": "available",
"enabledState": "enabled",
"status.statusReason": "The pool is available",
"name": "/Common/app.app/app_pool",
"members": {
"/Common/10.0.3.5:80": {
"addr": "10.0.3.5",
"monitorStatus": "up",
"port": 0,
"serverside.bitsIn": 0,
"serverside.bitsOut": 0,
"serverside.curConns": 0,
"serverside.maxConns": 0,
"serverside.pktsIn": 0,
"serverside.pktsOut": 0,
"serverside.totConns": 0,
"availabilityState": "available",
"enabledState": "enabled",
"status.statusReason": "Pool member is available"
}
},
"tenant": "Common",
"application": "app.app"
}
}
}
Without the addTags property, the StatsD consumer sends only numeric metrics like serverside.bitsIn and so on.
With the addTags property, the StatsD consumer also sends numeric metrics but also sends the following tags along with each metric
For nested metrics under pools.-Common-app.app-app_pool, it sends following tags:
{ "availabilityState": "available", "enabledState": "enabled", "status.statusReason": "The pool is available", "name": "/Common/app.app/app_pool", "tenant": "Common", "application": "app.app" }
For nested metrics under pools.-Common-app.app-app_pool.memebers.-Common-10-0-3-5-80, it sends following tags:
{ "addr": "10.0.3.5", "monitorStatus": "up", "availabilityState": "available", "enabledState": "enabled", "status.statusReason": "Pool member is available" }
Querying SNMP using a custom endpoint¶
This example shows how you can query SNMP using a custom endpoint in a BIG-IP Telemetry Streaming declaration using version 1.29 and later. See Configuring Custom Endpoints for more information on this feature.
{
"class": "Telemetry",
"SysStat_Endpoints": {
"class": "Telemetry_Endpoints",
"items": {
"sysGlobalStat.sysStatMemoryUsed": {
"name": "usedMemory",
"protocol": "snmp",
"path": "sysGlobalStat.sysStatMemoryUsed"
},
"totalMemory": {
"protocol": "snmp",
"path": "sysGlobalStat.sysStatMemoryTotal"
},
"hrFSBootable": {
"protocol": "snmp",
"path": "hrFSBootable.1",
"numericalEnums": true
}
}
},
"Virtual_Endpoints": {
"class": "Telemetry_Endpoints",
"items": {
"clientside.totConns": {
"name": "virtualTotConns",
"path": "/mgmt/tm/ltm/virtual/stats?$select=clientside.totConns"
},
"virtualAddress": {
"path": "/mgmt/tm/ltm/virtual-address/stats"
}
}
},
"Custom_System": {
"class": "Telemetry_System",
"systemPoller": [
"Custom_System_Poller1",
"Custom_System_Poller2",
{
"interval": 60
}
]
},
"Custom_System_Poller1": {
"class": "Telemetry_System_Poller",
"interval": 60,
"endpointList": "SysStat_Endpoints"
},
"Custom_System_Poller2": {
"class": "Telemetry_System_Poller",
"interval": 720,
"endpointList": [
"Virtual_Endpoints",
{
"path": "sysTmmPagesStat.sysTmmPagesStatTable.sysTmmPagesStatEntry",
"protocol": "snmp",
"name": "tmmPages"
}
]
},
"Default_System": {
"class": "Telemetry_System",
"systemPoller": {
"interval": 360
}
}
}