diff --git a/embedded-jmxtrans-webapp-coktail/src/main/copperegg/README.md b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/README.md new file mode 100644 index 0000000..df3e493 --- /dev/null +++ b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/README.md @@ -0,0 +1,97 @@ +# Using the CopperEggWriter Output Writer + +## Deploying with the Cocktail Demo App + +### 1. Save a copy of your current resources/jmxtrans.json file + +```xml + cd + mv embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json.original +``` + +### 2. Copy the CocktailDemo-specific copperegg_config.json and jmxtrans.json to resources/ + +```xml + cd + cp embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/*.json embedded-jmxtrans-webapp-coktail/src/main/resources/ +``` + +### 3. Edit the (newly-copied) jmxtrans.json file + +```xml + cd + nano embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json + In the "OutputWriters" array, find the CopperEggWriter settings. + Replace with your user name + Replace with your Uptime Cloud Monitor APIKEY + Optionally, add any other OutputWriters to the OutputWriters array. + Save and close jmxtrans.json +``` + +### 4. Build and Deploy the Cocktail Demo App as usual. + + +## Integrating with your Spring-enabled or Plain Java Servlet + +### 1. Save a copy of your current resources/jmxtrans.json file, as in Step 1 above + +### 2. Copy the copperegg_config.json and jmxtrans.json to resources/ + +```xml + cp src/main/copperegg/*.json +``` +### 3. Edit the (newly-copied) jmxtrans.json file, as descibed in Step 3 above + + +### 4. Follow the embedded-jmxtrans instructions for building and deploying + +For Spring integration: + + [embedded-jmxtrans wiki](https://github.com/jmxtrans/embedded-jmxtrans/wiki/Spring-Integration) + +For Plain-Java-Servlet integration: + + [embedded-jmxtrans wiki](https://github.com/jmxtrans/embedded-jmxtrans/wiki/Plain-Java-Servlet-Integration) + + +For the documentation about the embedded-jmxtrans module, refer to: +* [Documentation](https://github.com/jmxtrans/embedded-jmxtrans/wiki) +* [Latest javadocs](http://jmxtrans.github.com/embedded-jmxtrans/apidocs/) + +To learn more about Uptime Cloud Monitor, and to sign up for a free trial: +* [Uptime Cloud Monitor Homepage] (https://www.idera.com/infrastructure-monitoring-as-a-service/) +* [Uptime Cloud Monitor Signup] (https://www.idera.com/infrastructure-monitoring-as-a-service/freetrialsubscriptionform) +* [Uptime Cloud Monitor Login] (https://app.copperegg.com/login) + + +License +================== + +Please refer to the LICENSE and NOTIFICATION files included by the authors of embedded-jmxtrans and embedded-jmxtrans-samples. + +Uptime Cloud Monitor has provided three JSON files in this repository, which can be used to configure the CopperEggWriter. +These files are made available under the terms of the MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + + + + + diff --git a/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_config.json b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_config.json new file mode 100644 index 0000000..9d53ce1 --- /dev/null +++ b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_config.json @@ -0,0 +1,368 @@ +{"config": + { "metric_groups" : + [ + { + "name":"jvm_os_Metrics", + "label":"jvm os Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.os.OpenFileDescriptorCount","unit":"descriptors"}, + {"type":"ce_gauge_f","name":"jvm.os.CommittedVirtualMemorySize","unit":"MB"}, + {"type":"ce_gauge_f","name":"jvm.os.ProcessCpuTime","unit":"seconds"} + ] + }, + { + "name":"jvm_gc_Metrics", + "label":"jvm gc Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.gc.Copy.CollectionCount","unit":"total collections"}, + {"type":"ce_gauge","name":"jvm.gc.Copy.CollectionTime","unit":"milliseconds"}, + {"type":"ce_gauge","name":"jvm.gc.MarkSweepCompact.CollectionCount","unit":"total collections"}, + {"type":"ce_gauge","name":"jvm.gc.MarkSweepCompact.CollectionTime","unit":"milliseconds"} + ] + }, + { + "name":"jvm_runtime_Metrics", + "label":"jvm runtime Metrics", + "frequency":15, + "metrics": + [ + + {"type":"ce_counter_f","name":"jvm.runtime.Uptime","unit":"minutes"} + + ] + }, + { + "name":"jvm_class_Metrics", + "label":"jvm Class Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.loadedClasses.LoadedClassCount","unit":"classes"} + ] + }, + { + "name":"jvm_thread_Metrics", + "label":"jvm thread Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.thread.ThreadCount","unit":"threads"} + ] + }, + { + "name":"heap_memory_Metrics", + "label":"Heap memory", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge_f","name":"jvmHeapMemoryUsage","unit":"MB"} + ] + }, + { + "name":"nonheap_memory_Metrics", + "label":"NonHeap memory", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge_f","name":"jvmNonHeapMemoryUsage","unit":"MB"} + ] + }, + { + "name":"tomcat_grp_Metrics", + "label":"Tomcat GRP Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_counter","name":"tomcat.global-request-processor.bytesSent","unit":"bytes"}, + {"type":"ce_counter","name":"tomcat.global-request-processor.bytesReceived","unit":"bytes"}, + {"type":"ce_counter_f","name":"tomcat.global-request-processor.processingTime","unit":"seconds"}, + {"type":"ce_counter","name":"tomcat.global-request-processor.errorCount","unit":"errors"}, + {"type":"ce_counter","name":"tomcat.global-request-processor.requestCount","unit":"requests"} + ] + }, + { + "name":"tomcat_thread_pool_Metrics", + "label":"Tomcat thread pool metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"tomcat.thread-pool.currentThreadsBusy","unit":"threads"}, + {"type":"ce_gauge","name":"tomcat.thread-pool.currentThreadCount","unit":"threads"} + ] + }, + { + "name":"tomcat_servlet_Metrics", + "label":"Tomcat Servlet Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_counter","name":"tomcat.servlet.processingTime","unit":"milliseconds"}, + {"type":"ce_counter","name":"tomcat.servlet.errorCount","unit":"errors"}, + {"type":"ce_counter","name":"tomcat.servlet.requestCount","unit":"requests"} + ] + }, + { + "name":"tomcat_manager_Metrics", + "label":"Tomcat Manager Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"tomcat.manager.activeSessions","unit":"sessions"} + ] + } + ], + "dashboards" : + [ + { + "name":"jvm_dashboard", + "data":{ + "widgets":{ + "0":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_os_Metrics", + "0", + "jvm.os.OpenFileDescriptorCount" + ] + }, + "1":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_os_Metrics", + "1", + "jvm.os.CommittedVirtualMemorySize" + ] + }, + "2":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_os_Metrics", + "2", + "jvm.os.ProcessCpuTime" + ] + }, + "3":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_runtime_Metrics", + "0", + "jvm.runtime.Uptime" + ] + }, + "4":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_class_Metrics", + "0", + "jvm.loadedClasses.LoadedClassCount" + ] + }, + "5":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_thread_Metrics", + "0", + "jvm.thread.ThreadCount" + ] + }, + "6":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "0", + "jvm.gc.Copy.CollectionCount" + ] + }, + "7":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "1", + "jvm.gc.Copy.CollectionTime" + ] + }, + "8":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "2", + "jvm.gc.MarkSweepCompact.CollectionCount" + ] + }, + "9":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "3", + "jvm.gc.MarkSweepCompact.CollectionTime" + ] + }, + "10":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "heap_memory_Metrics", + "0", + "jvmHeapMemoryUsage" + ] + }, + "11":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "nonheap_memory_Metrics", + "0", + "jvmNonHeapMemoryUsage" + ] + } + }, + "order":[ "0","1","2","3","4","5","6","7","8","9","10","11"] + } + }, + { + "name":"tomcat_dashboard", + "data":{ + "widgets":{ + "0":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_thread_pool_Metrics", + "0", + "tomcat.thread-pool.currentThreadsBusy" + ] + }, + "1":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_thread_pool_Metrics", + "1", + "tomcat.thread-pool.currentThreadCount" + ] + }, + "2":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "0", + "tomcat.global-request-processor.bytesSent" + ] + }, + "3":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "1", + "tomcat.global-request-processor.bytesReceived" + ] + }, + "4":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "2", + "tomcat.global-request-processor.processingTime" + ] + }, + "5":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "3", + "tomcat.global-request-processor.errorCount" + ] + }, + "6":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "4", + "tomcat.global-request-processor.requestCount" + ] + }, + "7":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_manager_Metrics", + "0", + "tomcat.manager.activeSessions" + ] + }, + "8":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_servlet_Metrics", + "0", + "tomcat.servlet.processingTime" + ] + }, + "9":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_servlet_Metrics", + "1", + "tomcat.servlet.errorCount" + ] + }, + "10":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_servlet_Metrics", + "2", + "tomcat.servlet.requestCount" + ] + } + }, + "order":[ "0","1","2","3","4","5","6","7","8","9","10"] + } + } + ] + } +} diff --git a/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/copperegg_config.json b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/copperegg_config.json new file mode 100644 index 0000000..f629225 --- /dev/null +++ b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/copperegg_config.json @@ -0,0 +1,469 @@ +{"config": + { "metric_groups" : + [ + { + "name":"jvm_os_Metrics", + "label":"jvm os Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.os.OpenFileDescriptorCount","unit":"descriptors"}, + {"type":"ce_gauge_f","name":"jvm.os.CommittedVirtualMemorySize","unit":"MB"}, + {"type":"ce_gauge_f","name":"jvm.os.ProcessCpuTime","unit":"seconds"} + ] + }, + { + "name":"jvm_gc_Metrics", + "label":"jvm gc Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.gc.Copy.CollectionCount","unit":"total collections"}, + {"type":"ce_gauge","name":"jvm.gc.Copy.CollectionTime","unit":"milliseconds"}, + {"type":"ce_gauge","name":"jvm.gc.MarkSweepCompact.CollectionCount","unit":"total collections"}, + {"type":"ce_gauge","name":"jvm.gc.MarkSweepCompact.CollectionTime","unit":"milliseconds"} + ] + }, + { + "name":"jvm_runtime_Metrics", + "label":"jvm runtime Metrics", + "frequency":15, + "metrics": + [ + + {"type":"ce_counter_f","name":"jvm.runtime.Uptime","unit":"minutes"} + + ] + }, + { + "name":"jvm_class_Metrics", + "label":"jvm Class Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.loadedClasses.LoadedClassCount","unit":"classes"} + ] + }, + { + "name":"jvm_thread_Metrics", + "label":"jvm thread Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"jvm.thread.ThreadCount","unit":"threads"} + ] + }, + { + "name":"heap_memory_Metrics", + "label":"Heap memory", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge_f","name":"jvmHeapMemoryUsage","unit":"MB"} + ] + }, + { + "name":"nonheap_memory_Metrics", + "label":"NonHeap memory", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge_f","name":"jvmNonHeapMemoryUsage","unit":"MB"} + ] + }, + { + "name":"tomcat_grp_Metrics", + "label":"Tomcat GRP Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_counter","name":"tomcat.global-request-processor.bytesSent","unit":"bytes"}, + {"type":"ce_counter","name":"tomcat.global-request-processor.bytesReceived","unit":"bytes"}, + {"type":"ce_counter_f","name":"tomcat.global-request-processor.processingTime","unit":"seconds"}, + {"type":"ce_counter","name":"tomcat.global-request-processor.errorCount","unit":"errors"}, + {"type":"ce_counter","name":"tomcat.global-request-processor.requestCount","unit":"requests"} + ] + }, + { + "name":"tomcat_thread_pool_Metrics", + "label":"Tomcat thread pool metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"tomcat.thread-pool.currentThreadsBusy","unit":"threads"}, + {"type":"ce_gauge","name":"tomcat.thread-pool.currentThreadCount","unit":"threads"} + ] + }, + { + "name":"tomcat_servlet_Metrics", + "label":"Tomcat Servlet Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_counter","name":"tomcat.servlet.processingTime","unit":"milliseconds"}, + {"type":"ce_counter","name":"tomcat.servlet.errorCount","unit":"errors"}, + {"type":"ce_counter","name":"tomcat.servlet.requestCount","unit":"requests"} + ] + }, + { + "name":"tomcat_manager_Metrics", + "label":"Tomcat Manager Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_gauge","name":"tomcat.manager.activeSessions","unit":"sessions"} + ] + }, + { + "name":"Cocktail_Sales_Metrics", + "label":"Cocktail App Sales Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_counter","name":"sales.ordersCounter","unit":"orders"}, + {"type":"ce_counter","name":"sales.itemsCounter","unit":"items"}, + {"type":"ce_counter","name":"sales.revenueInCentsCounter","unit":"cents"} + ] + }, + { + "name":"Cocktail_App_Metrics", + "label":"Cocktail App Metrics", + "frequency":15, + "metrics": + [ + {"type":"ce_counter","name":"cocktail.SearchedCocktailCount","unit":"searches"}, + {"type":"ce_counter","name":"cocktail.DisplayedHomeCount","unit":"times"}, + {"type":"ce_counter","name":"cocktail.DisplayedCocktailCount","unit":"times"}, + {"type":"ce_counter","name":"cocktail.AddedCommentCount","unit":"times"} + ] + } + ], + "dashboards" : + [ + { + "name":"jvm_dashboard", + "data":{ + "widgets":{ + "0":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_os_Metrics", + "0", + "jvm.os.OpenFileDescriptorCount" + ] + }, + "1":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_os_Metrics", + "1", + "jvm.os.CommittedVirtualMemorySize" + ] + }, + "2":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_os_Metrics", + "2", + "jvm.os.ProcessCpuTime" + ] + }, + "3":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_runtime_Metrics", + "0", + "jvm.runtime.Uptime" + ] + }, + "4":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_class_Metrics", + "0", + "jvm.loadedClasses.LoadedClassCount" + ] + }, + "5":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_thread_Metrics", + "0", + "jvm.thread.ThreadCount" + ] + }, + "6":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "0", + "jvm.gc.Copy.CollectionCount" + ] + }, + "7":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "1", + "jvm.gc.Copy.CollectionTime" + ] + }, + "8":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "2", + "jvm.gc.MarkSweepCompact.CollectionCount" + ] + }, + "9":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "jvm_gc_Metrics", + "3", + "jvm.gc.MarkSweepCompact.CollectionTime" + ] + }, + "10":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "heap_memory_Metrics", + "0", + "jvmHeapMemoryUsage" + ] + }, + "11":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "nonheap_memory_Metrics", + "0", + "jvmNonHeapMemoryUsage" + ] + } + }, + "order":[ "0","1","2","3","4","5","6","7","8","9","10","11"] + } + }, + { + "name":"app_dashboard", + "data":{ + "widgets":{ + "0":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_Sales_Metrics", + "0", + "sales.ordersCounter" + ] + }, + "1":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_Sales_Metrics", + "1", + "sales.itemsCounter" + ] + }, + "2":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_Sales_Metrics", + "2", + "sales.revenueInCentsCounter" + ] + }, + "3":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_App_Metrics", + "0", + "cocktail.SearchedCocktailCount" + ] + }, + "4":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_App_Metrics", + "1", + "cocktail.DisplayedHomeCount" + ] + }, + "5":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_App_Metrics", + "2", + "cocktail.DisplayedCocktailCount" + ] + }, + "6":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "Cocktail_App_Metrics", + "3", + "cocktail.AddedCommentCount" + ] + } + }, + "order":[ "0","1","2","3","4","5","6"] + } + }, + { + "name":"tomcat_dashboard", + "data":{ + "widgets":{ + "0":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_thread_pool_Metrics", + "0", + "tomcat.thread-pool.currentThreadsBusy" + ] + }, + "1":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_thread_pool_Metrics", + "1", + "tomcat.thread-pool.currentThreadCount" + ] + }, + "2":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "0", + "tomcat.global-request-processor.bytesSent" + ] + }, + "3":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "1", + "tomcat.global-request-processor.bytesReceived" + ] + }, + "4":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "2", + "tomcat.global-request-processor.processingTime" + ] + }, + "5":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "3", + "tomcat.global-request-processor.errorCount" + ] + }, + "6":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_grp_Metrics", + "4", + "tomcat.global-request-processor.requestCount" + ] + }, + "7":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_manager_Metrics", + "0", + "tomcat.manager.activeSessions" + ] + }, + "8":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_servlet_Metrics", + "0", + "tomcat.servlet.processingTime" + ] + }, + "9":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_servlet_Metrics", + "1", + "tomcat.servlet.errorCount" + ] + }, + "10":{ + "type":"timeline", + "style":"values", + "match":"all", + "metric":[ + "tomcat_servlet_Metrics", + "2", + "tomcat.servlet.requestCount" + ] + } + }, + "order":[ "0","1","2","3","4","5","6","7","8","9","10"] + } + } + ] + } +} diff --git a/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/jmxtrans.json b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/jmxtrans.json new file mode 100644 index 0000000..5d88dab --- /dev/null +++ b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/copperegg_configCocktailApp/jmxtrans.json @@ -0,0 +1,84 @@ +{ + "queries": [ + { + "objectName": "java.lang:type=ClassLoading", + "resultAlias": "jvm.loadedClasses", + "attributes": [ + { + "name": "LoadedClassCount", + "type": "gauge" + } + ] + }, + { + "objectName": "java.lang:type=Threading", + "resultAlias": "jvm.thread", + "attributes": [ + { + "name": "ThreadCount", + "type": "gauge" + } + ] + }, + { + "objectName": "java.lang:type=MemoryPool,name=*", + "resultAlias": "jvm.memorypool.%name%", + "attributes": [ + "Usage" + ] + }, + { + "objectName": "java.lang:type=Runtime", + "resultAlias": "jvm.runtime", + "attributes": [ + "Uptime" + ] + }, + { + "objectName": "cocktail:type=ShoppingCartController,name=ShoppingCartController", + "resultAlias": "", + "attributes": [ + { + "name": "SalesOrdersCounter", + "resultAlias": "sales.ordersCounter" + }, + { + "name": "SalesItemsCounter", + "resultAlias": "sales.itemsCounter" + }, + { + "name": "SalesRevenueInCentsCounter", + "resultAlias": "sales.revenueInCentsCounter" + } + ] + + }, + { + "objectName": "cocktail:type=CocktailController,name=CocktailController", + "resultAlias": "cocktail", + "attributes": [ + "AddedCommentCount", + "DisplayedCocktailCount", + "DisplayedHomeCount", + "SearchedCocktailCount" + ] + + } + + ], "outputWriters": [ + { + "@class": "org.jmxtrans.embedded.output.CopperEggWriter", + "settings": { + "source": "${CopperEgg.source:#hostname#}", + "username": "${CopperEgg.username:}", + "token": "${CopperEgg.token:}", + "enabled": "${CopperEgg.enabled:true}" + } + } +], + "queryIntervalInSeconds": "${jmxtrans.queryIntervalInSeconds:15}", + "numQueryThreads": "${jmxtrans.numQueryThreads:2}", + "numExportThreads": "${jmxtrans.numExportThreads:2}", + "exportIntervalInSeconds": "${jmxtrans.exportIntervalInSeconds:15}", + "exportBatchSize": "${jmxtrans.exportBatchSize:30}" +} diff --git a/embedded-jmxtrans-webapp-coktail/src/main/copperegg/jmxtrans.json b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/jmxtrans.json new file mode 100644 index 0000000..50a31b3 --- /dev/null +++ b/embedded-jmxtrans-webapp-coktail/src/main/copperegg/jmxtrans.json @@ -0,0 +1,54 @@ +{ + "queries": [ + { + "objectName": "java.lang:type=ClassLoading", + "resultAlias": "jvm.loadedClasses", + "attributes": [ + { + "name": "LoadedClassCount", + "type": "gauge" + } + ] + }, + { + "objectName": "java.lang:type=Threading", + "resultAlias": "jvm.thread", + "attributes": [ + { + "name": "ThreadCount", + "type": "gauge" + } + ] + }, + { + "objectName": "java.lang:type=MemoryPool,name=*", + "resultAlias": "jvm.memorypool.%name%", + "attributes": [ + "Usage" + ] + }, + { + "objectName": "java.lang:type=Runtime", + "resultAlias": "jvm.runtime", + "attributes": [ + "Uptime" + ] + } + + ], "outputWriters": [ + { + "@class": "org.jmxtrans.embedded.output.CopperEggWriter", + "settings": { + "source": "${CopperEgg.source:#hostname#}", + "username": "${CopperEgg.username:}", + "token": "${CopperEgg.token:}", + "enabled": "${CopperEgg.enabled:true}" + } + } +], + "queryIntervalInSeconds": "${jmxtrans.queryIntervalInSeconds:15}", + "numQueryThreads": "${jmxtrans.numQueryThreads:2}", + "numExportThreads": "${jmxtrans.numExportThreads:2}", + "exportIntervalInSeconds": "${jmxtrans.exportIntervalInSeconds:15}", + "exportBatchSize": "${jmxtrans.exportBatchSize:30}" +} diff --git a/embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json b/embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json index 61331f5..cfe6990 100644 --- a/embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json +++ b/embedded-jmxtrans-webapp-coktail/src/main/resources/jmxtrans.json @@ -108,4 +108,4 @@ "numExportThreads": "${jmxtrans.numExportThreads:2}", "exportIntervalInSeconds": "${jmxtrans.exportIntervalInSeconds:5}", "exportBatchSize": "${jmxtrans.exportBatchSize:50}" -} \ No newline at end of file +}