[global_tags] # the env tag is used by the application for multi-environments management env = "Dev" # the label tag is an optional tag used by the application that you can use as additional label for the services or infrastructure label = "sample-application" [agent] interval = "10s" flush_interval = "10s" ## Logging configuration: ## Run telegraf with debug log messages. debug = true ## Run telegraf in quiet mode (error log messages only). quiet = false ## Specify the log file name. The empty string means to log to stderr. logfile = "" # outputs [[outputs.http]] url = "https://splunk:8088/services/collector" timeout = "15s" insecure_skip_verify = true data_format = "splunkmetric" ## Provides time, index, source overrides for the HEC splunkmetric_hec_routing = true ## Additional HTTP headers [outputs.http.headers] # Should be set manually to "application/json" for json data_format Content-Type = "application/json" Authorization = "Splunk splunk_telegraf_hec_token" # <-- Ask your Splunk administrator dor a valid token X-Splunk-Request-Channel = "splunk_telegraf_hec_token" [[inputs.cpu]] [[inputs.disk]] [[inputs.diskio]] [[inputs.jolokia2_agent]] urls = ["http://sample-application:8778/jolokia/"] # <-- Url of your jolokia agent # Kafka JVM monitoring [[inputs.jolokia2_agent.metric]] name = "java_lang_memory" mbean = "java.lang:type=Memory" [[inputs.jolokia2_agent.metric]] name = "java_lang_memory_pool" mbean = "java.lang:type=MemoryPool,name=*" paths = ["Usage"] tag_keys = ["name"] [[inputs.jolokia2_agent.metric]] name = "java_lang_threading" mbean = "java.lang:type=Threading" paths = ["ThreadCount","PeakThreadCount","DaemonThreadCount"] [[inputs.jolokia2_agent.metric]] name = "java_lang_garbage_collector" mbean = "java.lang:type=GarbageCollector,name=*" paths = ["CollectionCount","CollectionTime"] tag_keys = ["name"] ## Producer [[inputs.jolokia2_agent.metric]] name = "kafka_producer_app_info" mbean = "kafka.producer:type=app-info,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_producer_producer_metrics" mbean = "kafka.producer:type=producer-metrics,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_producer_producer_node_metrics" mbean = "kafka.producer:type=producer-node-metrics,client-id=*,node-id=*" tag_keys = ["client-id", "node-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_producer_producer_topic_metrics" mbean = "kafka.producer:type=producer-topic-metrics,client-id=*,topic=*" tag_keys = ["client-id", "topic"] ## Streams [[inputs.jolokia2_agent.metric]] name = "stream_metrics" mbean = "kafka.streams:type=stream-metrics,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "stream_processor_node_metrics" mbean = "kafka.streams:type=stream-processor-node-metrics,client-id=*,task-id=*,processor-node-id=*" tag_keys = ["client-id","task-id","processor-node-id"] [[inputs.jolokia2_agent.metric]] name = "stream_record_cache_metrics" mbean = "kafka.streams:type=stream-record-cache-metrics,client-id=*,task-id=*,record-cache-id=*" tag_keys = ["client-id","task-id","record-cache-id"] [[inputs.jolokia2_agent.metric]] name = "stream_rocksdb_state_metrics" mbean = "kafka.streams:type=stream-rocksdb-state-metrics,client-id=*,task-id=*,rocksdb-state-id=*" tag_keys = ["client-id","task-id","rocksdb-state-id"] [[inputs.jolokia2_agent.metric]] name = "stream_rocksdb_window_metrics" mbean = "kafka.streams:type=stream-rocksdb-window-metrics,client-id=*,rocksdb-window-id=*,task-id=*" tag_keys = ["client-id","task-id","rocksdb-window-id"] [[inputs.jolokia2_agent.metric]] name = "stream_task_metrics" mbean = "kafka.streams:type=stream-task-metrics,client-id=*,task-id=*" tag_keys = ["client-id","task-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_metrics_count" mbean = "kafka.streams:type=kafka-metrics-count" ## Consumer [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_app_info" mbean = "kafka.consumer:type=app-info,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_consumer_fetch_manager_metrics" mbean = "kafka.consumer:type=consumer-fetch-manager-metrics,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_consumer_fetch_manager_metrics" mbean = "kafka.consumer:type=consumer-fetch-manager-metrics,client-id=*,topic=*" tag_keys = ["client-id", "topic"] [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_consumer_fetch_manager_metrics" mbean = "kafka.consumer:type=consumer-fetch-manager-metrics,client-id=*,topic=*,partition=*" tag_keys = ["client-id", "topic", "partition"] [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_consumer_coordinator_metrics" mbean = "kafka.consumer:type=consumer-coordinator-metrics,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_consumer_metrics" mbean = "kafka.consumer:type=consumer-metrics,client-id=*" tag_keys = ["client-id"] [[inputs.jolokia2_agent.metric]] name = "kafka_consumer_consumer_node_metrics" mbean = "kafka.consumer:type=consumer-node-metrics,client-id=*,node-id=*" tag_keys = ["client-id", "node-id"]