From 50d721ae0573dafcc3594cb727bab7c3610736e4 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Thu, 24 May 2018 14:58:43 -0400 Subject: [PATCH] Add additional examples for jolokia2 (#4191) --- .../inputs/jolokia2/examples/activemq.conf | 57 +++++++++++++ .../inputs/jolokia2/examples/bitbucket.conf | 39 +++++++++ .../jolokia2/examples/hadooop-hdfs.conf | 85 +++++++++++++++++++ plugins/inputs/jolokia2/examples/jboss.conf | 59 +++++++++++++ plugins/inputs/jolokia2/examples/tomcat.conf | 65 ++++++++++++++ .../inputs/jolokia2/examples/weblogic.conf | 56 ++++++++++++ 6 files changed, 361 insertions(+) create mode 100644 plugins/inputs/jolokia2/examples/activemq.conf create mode 100644 plugins/inputs/jolokia2/examples/bitbucket.conf create mode 100644 plugins/inputs/jolokia2/examples/hadooop-hdfs.conf create mode 100644 plugins/inputs/jolokia2/examples/jboss.conf create mode 100644 plugins/inputs/jolokia2/examples/tomcat.conf create mode 100644 plugins/inputs/jolokia2/examples/weblogic.conf diff --git a/plugins/inputs/jolokia2/examples/activemq.conf b/plugins/inputs/jolokia2/examples/activemq.conf new file mode 100644 index 000000000..b851cd54d --- /dev/null +++ b/plugins/inputs/jolokia2/examples/activemq.conf @@ -0,0 +1,57 @@ +## Jolokia is bundled with ActiveMQ + +[[inputs.jolokia2_agent]] + urls = ["http://localhost:8161/api/jolokia"] + name_prefix = "activemq." + username = "admin" + password = "admin" + + ### JVM Generic + + [[inputs.jolokia2_agent.metric]] + name = "OperatingSystem" + mbean = "java.lang:type=OperatingSystem" + paths = ["ProcessCpuLoad","SystemLoadAverage","SystemCpuLoad"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + paths = ["Uptime"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + paths = ["HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_garbage_collector" + mbean = "java.lang:name=*,type=GarbageCollector" + paths = ["CollectionTime", "CollectionCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:name=*,type=MemoryPool" + paths = ["Usage", "PeakUsage", "CollectionUsage"] + tag_keys = ["name"] + tag_prefix = "pool_" + + ### ACTIVEMQ + + [[inputs.jolokia2_agent.metric]] + name = "queue" + mbean = "org.apache.activemq:brokerName=*,destinationName=*,destinationType=Queue,type=Broker" + paths = ["QueueSize","EnqueueCount","ConsumerCount","DispatchCount","DequeueCount","ProducerCount","InFlightCount"] + tag_keys = ["brokerName","destinationName"] + + [[inputs.jolokia2_agent.metric]] + name = "topic" + mbean = "org.apache.activemq:brokerName=*,destinationName=*,destinationType=Topic,type=Broker" + paths = ["ProducerCount","DequeueCount","ConsumerCount","QueueSize","EnqueueCount"] + tag_keys = ["brokerName","destinationName"] + + [[inputs.jolokia2_agent.metric]] + name = "broker" + mbean = "org.apache.activemq:brokerName=*,type=Broker" + paths = ["TotalConsumerCount","TotalMessageCount","TotalEnqueueCount","TotalDequeueCount","MemoryLimit","MemoryPercentUsage","StoreLimit","StorePercentUsage","TempPercentUsage","TempLimit"] + tag_keys = ["brokerName"] diff --git a/plugins/inputs/jolokia2/examples/bitbucket.conf b/plugins/inputs/jolokia2/examples/bitbucket.conf new file mode 100644 index 000000000..c53614ec4 --- /dev/null +++ b/plugins/inputs/jolokia2/examples/bitbucket.conf @@ -0,0 +1,39 @@ +[[inputs.jolokia2_agent]] + urls = ["http://localhost:8778/jolokia"] + name_prefix = "bitbucket." + + [[inputs.jolokia2_agent.metric]] + name = "jvm_operatingsystem" + mbean = "java.lang:type=OperatingSystem" + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + + [[inputs.jolokia2_agent.metric]] + name = "jvm_thread" + mbean = "java.lang:type=Threading" + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + + [[inputs.jolokia2_agent.metric]] + name = "jvm_class_loading" + mbean = "java.lang:type=ClassLoading" + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:type=MemoryPool,name=*" + + [[inputs.jolokia2_agent.metric]] + name = "webhooks" + mbean = "com.atlassian.webhooks:name=*" + + [[inputs.jolokia2_agent.metric]] + name = "atlassian" + mbean = "com.atlassian.bitbucket:name=*" + + [[inputs.jolokia2_agent.metric]] + name = "thread_pools" + mbean = "com.atlassian.bitbucket.thread-pools:name=*" diff --git a/plugins/inputs/jolokia2/examples/hadooop-hdfs.conf b/plugins/inputs/jolokia2/examples/hadooop-hdfs.conf new file mode 100644 index 000000000..0b14e0d8c --- /dev/null +++ b/plugins/inputs/jolokia2/examples/hadooop-hdfs.conf @@ -0,0 +1,85 @@ +################ +# NAMENODE # +################ +[[inputs.jolokia2_agent]] + urls = ["http://localhost:8778/jolokia"] + name_prefix = "hadoop.hdfs.namenode." + + [[inputs.jolokia2_agent.metric]] + name = "FSNamesystem" + mbean = "Hadoop:name=FSNamesystem,service=NameNode" + paths = ["CapacityTotal", "CapacityRemaining", "CapacityUsedNonDFS", "NumLiveDataNodes", "NumDeadDataNodes", "NumInMaintenanceDeadDataNodes", "NumDecomDeadDataNodes"] + + [[inputs.jolokia2_agent.metric]] + name = "FSNamesystemState" + mbean = "Hadoop:name=FSNamesystemState,service=NameNode" + paths = ["VolumeFailuresTotal", "UnderReplicatedBlocks", "BlocksTotal"] + + [[inputs.jolokia2_agent.metric]] + name = "OperatingSystem" + mbean = "java.lang:type=OperatingSystem" + paths = ["ProcessCpuLoad", "SystemLoadAverage", "SystemCpuLoad"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + paths = ["Uptime"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + paths = ["HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_garbage_collector" + mbean = "java.lang:name=*,type=GarbageCollector" + paths = ["CollectionTime", "CollectionCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:name=*,type=MemoryPool" + paths = ["Usage", "PeakUsage", "CollectionUsage"] + tag_keys = ["name"] + tag_prefix = "pool_" + + +################ +# DATANODE # +################ +[[inputs.jolokia2_agent]] + urls = ["http://localhost:7778/jolokia"] + name_prefix = "hadoop.hdfs.datanode." + + [[inputs.jolokia2_agent.metric]] + name = "FSDatasetState" + mbean = "Hadoop:name=FSDatasetState,service=DataNode" + paths = ["Capacity", "DfsUsed", "Remaining", "NumBlocksFailedToUnCache", "NumBlocksFailedToCache", "NumBlocksCached"] + + [[inputs.jolokia2_agent.metric]] + name = "OperatingSystem" + mbean = "java.lang:type=OperatingSystem" + paths = ["ProcessCpuLoad", "SystemLoadAverage", "SystemCpuLoad"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + paths = ["Uptime"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + paths = ["HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_garbage_collector" + mbean = "java.lang:name=*,type=GarbageCollector" + paths = ["CollectionTime", "CollectionCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:name=*,type=MemoryPool" + paths = ["Usage", "PeakUsage", "CollectionUsage"] + tag_keys = ["name"] + tag_prefix = "pool_" diff --git a/plugins/inputs/jolokia2/examples/jboss.conf b/plugins/inputs/jolokia2/examples/jboss.conf new file mode 100644 index 000000000..a65d2a5b9 --- /dev/null +++ b/plugins/inputs/jolokia2/examples/jboss.conf @@ -0,0 +1,59 @@ +[[inputs.jolokia2_agent]] + urls = ["http://localhost:8080/jolokia"] + name_prefix = "jboss." + + ### JVM Generic + + [[inputs.jolokia2_agent.metric]] + name = "OperatingSystem" + mbean = "java.lang:type=OperatingSystem" + paths = ["ProcessCpuLoad","SystemLoadAverage","SystemCpuLoad"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + paths = ["Uptime"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + paths = ["HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_garbage_collector" + mbean = "java.lang:name=*,type=GarbageCollector" + paths = ["CollectionTime", "CollectionCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:name=*,type=MemoryPool" + paths = ["Usage", "PeakUsage", "CollectionUsage"] + tag_keys = ["name"] + tag_prefix = "pool_" + + ### JBOSS + + [[inputs.jolokia2_agent.metric]] + name = "connectors.http" + mbean = "jboss.as:https-listener=*,server=*,subsystem=undertow" + paths = ["bytesReceived","bytesSent","errorCount","requestCount"] + tag_keys = ["server","https-listener"] + + [[inputs.jolokia2_agent.metric]] + name = "connectors.http" + mbean = "jboss.as:http-listener=*,server=*,subsystem=undertow" + paths = ["bytesReceived","bytesSent","errorCount","requestCount"] + tag_keys = ["server","http-listener"] + + [[inputs.jolokia2_agent.metric]] + name = "datasource.jdbc" + mbean = "jboss.as:data-source=*,statistics=jdbc,subsystem=datasources" + paths = ["PreparedStatementCacheAccessCount","PreparedStatementCacheHitCount","PreparedStatementCacheMissCount"] + tag_keys = ["data-source"] + + [[inputs.jolokia2_agent.metric]] + name = "datasource.pool" + mbean = "jboss.as:data-source=*,statistics=pool,subsystem=datasources" + paths = ["AvailableCount","ActiveCount","MaxUsedCount"] + tag_keys = ["data-source"] diff --git a/plugins/inputs/jolokia2/examples/tomcat.conf b/plugins/inputs/jolokia2/examples/tomcat.conf new file mode 100644 index 000000000..d642d766f --- /dev/null +++ b/plugins/inputs/jolokia2/examples/tomcat.conf @@ -0,0 +1,65 @@ +[[inputs.jolokia2_agent]] + urls = ["http://localhost:8080/jolokia"] + name_prefix = "tomcat." + + ### JVM Generic + + [[inputs.jolokia2_agent.metric]] + name = "OperatingSystem" + mbean = "java.lang:type=OperatingSystem" + paths = ["ProcessCpuLoad","SystemLoadAverage","SystemCpuLoad"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + paths = ["Uptime"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + paths = ["HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_garbage_collector" + mbean = "java.lang:name=*,type=GarbageCollector" + paths = ["CollectionTime", "CollectionCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:name=*,type=MemoryPool" + paths = ["Usage", "PeakUsage", "CollectionUsage"] + tag_keys = ["name"] + tag_prefix = "pool_" + + ### TOMCAT + + [[inputs.jolokia2_agent.metric]] + name = "GlobalRequestProcessor" + mbean = "Catalina:name=*,type=GlobalRequestProcessor" + paths = ["requestCount","bytesReceived","bytesSent","processingTime","errorCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "JspMonitor" + mbean = "Catalina:J2EEApplication=*,J2EEServer=*,WebModule=*,name=jsp,type=JspMonitor" + paths = ["jspReloadCount","jspCount","jspUnloadCount"] + tag_keys = ["J2EEApplication","J2EEServer","WebModule"] + + [[inputs.jolokia2_agent.metric]] + name = "ThreadPool" + mbean = "Catalina:name=*,type=ThreadPool" + paths = ["maxThreads","currentThreadCount","currentThreadsBusy"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "Servlet" + mbean = "Catalina:J2EEApplication=*,J2EEServer=*,WebModule=*,j2eeType=Servlet,name=*" + paths = ["processingTime","errorCount","requestCount"] + tag_keys = ["name","J2EEApplication","J2EEServer","WebModule"] + + [[inputs.jolokia2_agent.metric]] + name = "Cache" + mbean = "Catalina:context=*,host=*,name=Cache,type=WebResourceRoot" + paths = ["hitCount","lookupCount"] + tag_keys = ["context","host"] diff --git a/plugins/inputs/jolokia2/examples/weblogic.conf b/plugins/inputs/jolokia2/examples/weblogic.conf new file mode 100644 index 000000000..c19475268 --- /dev/null +++ b/plugins/inputs/jolokia2/examples/weblogic.conf @@ -0,0 +1,56 @@ +[[inputs.jolokia2_agent]] + urls = ["http://localhost:8080/jolokia"] + name_prefix = "weblogic." + + ### JVM Generic + + [[inputs.jolokia2_agent.metric]] + name = "OperatingSystem" + mbean = "java.lang:type=OperatingSystem" + paths = ["ProcessCpuLoad","SystemLoadAverage","SystemCpuLoad"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_runtime" + mbean = "java.lang:type=Runtime" + paths = ["Uptime"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory" + mbean = "java.lang:type=Memory" + paths = ["HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_garbage_collector" + mbean = "java.lang:name=*,type=GarbageCollector" + paths = ["CollectionTime", "CollectionCount"] + tag_keys = ["name"] + + [[inputs.jolokia2_agent.metric]] + name = "jvm_memory_pool" + mbean = "java.lang:name=*,type=MemoryPool" + paths = ["Usage", "PeakUsage", "CollectionUsage"] + tag_keys = ["name"] + tag_prefix = "pool_" + + ### WLS + + [[inputs.jolokia2_agent.metric]] + name = "JTARuntime" + mbean = "com.bea:Name=JTARuntime,ServerRuntime=*,Type=JTARuntime" + paths = ["SecondsActiveTotalCount","TransactionRolledBackTotalCount","TransactionRolledBackSystemTotalCount","TransactionRolledBackAppTotalCount","TransactionRolledBackResourceTotalCount","TransactionHeuristicsTotalCount","TransactionAbandonedTotalCount","TransactionTotalCount","TransactionRolledBackTimeoutTotalCount","ActiveTransactionsTotalCount","TransactionCommittedTotalCount"] + tag_keys = ["ServerRuntime"] + tag_prefix = "wls_" + + [[inputs.jolokia2_agent.metric]] + name = "ThreadPoolRuntime" + mbean = "com.bea:Name=ThreadPoolRuntime,ServerRuntime=*,Type=ThreadPoolRuntime" + paths = ["StuckThreadCount","CompletedRequestCount","ExecuteThreadTotalCount","ExecuteThreadIdleCount","StandbyThreadCount","Throughput","HoggingThreadCount","PendingUserRequestCount"] + tag_keys = ["ServerRuntime"] + tag_prefix = "wls_" + + [[inputs.jolokia2_agent.metric]] + name = "JMSRuntime" + mbean = "com.bea:Name=*.jms,ServerRuntime=*,Type=JMSRuntime" + paths = ["ConnectionsCurrentCount","ConnectionsHighCount","ConnectionsTotalCount","JMSServersCurrentCount","JMSServersHighCount","JMSServersTotalCount"] + tag_keys = ["name","ServerRuntime"] + tag_prefix = "wls_"