###################### Metricbeat Configuration Example ####################### #========================== Modules configuration ============================ metricbeat.modules: #------------------------------ jolokia Module ----------------------------- - module: jolokia metricsets: ["jmx"] enabled: true period: 10s namespace: "jolokia_metrics" hosts: ["localhost:4008"] jmx.mappings: - mbean: 'java.lang:type=Runtime' attributes: - attr: Uptime field: uptime - mbean: 'java.lang:type=GarbageCollector,name=ConcurrentMarkSweep' attributes: - attr: CollectionTime field: gc.cms_collection_time - attr: CollectionCount field: gc.cms_collection_count - mbean: 'java.lang:type=Memory' attributes: - attr: HeapMemoryUsage field: memory.heap_usage - attr: NonHeapMemoryUsage field: memory.non_heap_usage - module: jolokia metricsets: ["jmx"] enabled: true period: 10s namespace: "jolokia_metrics" hosts: ["localhost:4002"] jmx.mappings: - mbean: 'org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency' attributes: - attr: OneMinuteRate field: client_request.read_latency_one_min_rate - attr: Count field: client_request.read_latency - mbean: 'org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency' attributes: - attr: OneMinuteRate field: client_request.write_latency_one_min_rate - attr: Count field: client_request.write_latency - mbean: 'org.apache.cassandra.metrics:type=Compaction,name=CompletedTasks' attributes: - attr: Value field: compaction.completed_tasks - mbean: 'org.apache.cassandra.metrics:type=Compaction,name=PendingTasks' attributes: - attr: Value field: compaction.pending_tasks - module: jolokia metricsets: ["jmx"] enabled: true period: 10s namespace: "jolokia_metrics" hosts: ["localhost:4004"] jmx.mappings: - mbean: 'Catalina:type=Server' attributes: - attr: serverInfo field: server_info target: url: 'service:jmx:rmi:///jndi/rmi://jolokia:7091/jmxrmi' user: 'monitorRole' password: 'QED' #================================ Outputs ===================================== #-------------------------- Elasticsearch output ------------------------------ output.elasticsearch: # Array of hosts to connect to. hosts: ["localhost:9200"] # Optional protocol and basic auth credentials. #protocol: "https" #username: "elastic" #password: "changeme"