Example Declarations

This section contains example 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.0.2.1",
        "protocol": "https",
        "port": 8088,
        "passphrase": {
            "cipherText": "apikey"
        }
    }
}

Back to top


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.0.2.1",
        "protocol": "https",
        "port": 8088,
        "passphrase": {
            "cipherText": "apikey"
        }
    }
}

Back to top


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.0.2.1",
        "port": 443,
        "username": "myuser",
        "passphrase": {
            "cipherText": "mypassphrase"
        }
    }
}

Back to top


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.0.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"
            }
        }
    }
}

Back to top


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
        },
        "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.0.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"
        }
    }
}

Back to top


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
        }
    }
}

Back to top


Value-based matching

Important

Value-based matching is available in TS v1.10.0 and later. 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
                    }
                }
            ]
        }
    }
}

Back to top


Generic HTTP with multiple passphrases

If you require multiple secrets for the Generic HTTP consumer, 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.0.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

Important

Configuring fallback hosts for Generic HTTP consumers is currently EXPERIMENTAL and is available in TS v1.14 and later.

This example shows how you can use the experimental 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.0.2.1",
        "fallbackHosts": [
            "192.0.2.2",
            "192.0.2.3",
            "192.0.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 (including F5 Beacon) in 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 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.0.1.100",
            "protocol": "https",
            "port": "443",
            "proxy": {
                "host": "10.10.14.14",
                "port": 5053,
                "protocol": "http",
                "username": "someuser",
                "passphrase": {
                    "cipherText": "somepassphrase"
                },
                "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.0.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 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 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.0.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.0.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 Telemetry Streaming declaration using version 1.18 and later.

{
    "class": "Telemetry",
    "My_Consumer": {
        "class": "Telemetry_Consumer",
        "type": "Generic_HTTP",
        "host": "192.0.2.1",
        "protocol": "https",
        "port": 443,
        "path": "/",
        "method": "POST",
        "headers": [
            {
                "name": "content-type",
                "value": "application/json"
            }
        ],
        "privateKey": {
            "cipherText": "-----BEGIN PRIVATE KEY-----\nMIIE...\n-----END PRIVATE 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 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.0.2.1",
        "protocol": "http",
        "port": 8080,
        "path": "/bigip",
        "actions": [
            {
                "JMESPath": {},
                "expression": "{ virtuals: virtualServers, service: telemetryEventCategory, hostname: system.hostname, staticTag: 'any string value' }"
            }
        ]
    }
}

Back to top