Elasticsearch is a distributed RESTful search server based on Lucene which provides a distributed multitenant-capable full text search engine. This extension collects cluster health metrics, nodes and indices stats from a Elasticsearch engine and presents them in AppDynamics Metric Browser.
Note: This extension works with a Java Machine Agent.
servers: - displayName: Server1 uri: "http://localhost:9200" username: "" password: "" #passwordEncrypted: "" # To get the metrics through CAT apis catEndPoints: - endPoint: "/_cat/health?v&h=cluster,st,nodeTotal,nodeData,shardsTotal,shardsPrimary,shardsRelocating,shardsInitializing,shardsUnassigned,pendingTasks" metricPrefix: "Cluster Stats" metricKeys: [ "cluster" ] - endPoint: "/_cat/allocation?v&bytes=b&h=node,shards,diskUsed,diskAvailable,diskTotal,diskPercent" # Any prefixes metricPrefix: "Allocation" # The keys to be used in metric path. Picks up in the same order. metricKeys: [ "node" ] - endPoint: "/_cat/indices?v&bytes=b&time=s&h=index,health,status,shardsPrimary,shardsReplica,docsCount,docsDeleted,storeSize,pri.store.size,searchQueryTime,searchQueryTotal,searchQueryCurrent,searchFetchTotal,searchFetchTime,searchFetchCurrent,indexingIndexTotal,indexingIndexTime" metricPrefix: "Indices" metricKeys: [ "index" ] - endPoint: "/_cat/recovery?v&bytes=b&h=index,shard,files,files_percent,bytes,bytes_percent" metricPrefix: "Recovery" metricKeys: [ "index" ] - endPoint: "_cat/thread_pool?v&bytes=b&h=host,bulk.active,bulk.size,bulk.queue,bulk.queueSize,bulk.rejected,bulk.largest,bulk.completed,bulk.min,bulk.max" metricPrefix: "ThreadPool" metricKeys: [ "host" ] - endPoint: "/_cat/shards?v&bytes=b&h=node,index,shard,docs,store" metricPrefix: "Shards" metricKeys: [ "node", "index" ] #encryptionKey: "" connection: socketTimeout: 2000 connectTimeout: 2000 # number of concurrent tasks. # This doesn't need to be changed unless many instances are configured numberOfThreads: 5
In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Individual Nodes | <Node> | Custom Metrics | Elastic Search
Cat Level Statistics: As mentioned https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html
Workbench is a feature that lets you preview the metrics before registering it with the controller. This is useful if you want to fine tune the configurations. Workbench is embedded into the extension jar. To use the workbench
java -jar /path/to/MachineAgent/monitors/MarkLogicMonitor/elasticsearch-monitoring-extension.jarThis starts an http server at
http://host:9090/. This can be accessed from the browser.
curl http://localhost:9090/api/stats#Get the registered metrics
To avoid setting the clear text password in the config.yml, please follow the process to encrypt the password and set the passwordEncrypted and the encryptionKey in the config.yml
java -cp "appd-exts-commons-1.1.2.jar" com.appdynamics.extensions.crypto.Encryptor encryptionKey password
config.ymlinstead of plain text password
<MachineAgent>/conf/logging/log4j.xmland update the level of the appender
Always feel free to fork and contribute any changes directly via GitHub.
For any support questions, please contact firstname.lastname@example.org.
|17th March, 2018|
2.0 - Added support for CAT apis.
2.1 - Added support for Authentication.
2.2 - Default node stats uri changed to ES ver 1.0
2.3 - Support for additional metrics
2.4 - Added cluster status metric and moved cat endpoints to global
2.4.1 - Updated Licenses