Skip to content

NET-A-PORTER/solr-plugin-cloudwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudWatch Solr Plugin

This plugin will publish JVM heap and thread stats to CloudWatch as described here

Installation

  1. Build with sbt assembly and drop target/solr-plugin-cloudwatch-assembly-0.2.jar into the directory specified by the sharedLib in your solr.xml

  2. Add the following to your solr.xml

    com.netaporter.solr.CloudWatchAdminHandler

  3. Add the following system properties when you launch Solr, replacing MySolrHost with an identifier for this specific host, and replacing MySolrCluster with an identifier for your Solr cluster.

    -Dawsmetrics.host-metric-name=MySolrHost -Dcom.amazonaws.sdk.enableDefaultMetrics=metricNameSpace=MySolrCluster,cloudwatchRegion=eu-west-1

You can use your EC2 Instance ID for the awsmetrics.host-metric-name system property like so:

-Dawsmetrics.host-metric-name=`ec2-metadata -i | cut -d' ' -f2`
  1. Restart Solr and check the installation is working by going to the following URL:

    $ curl 'http://localhost/admin/cores?action=CLOUDWATCH&wt=json' {"responseHeader":{"status":0,"QTime":0},"metricsEnabled":true,"hostMetricName":"i-1234abcd","metricNamespace":"MySolrCluster"}

You should now start stats appear in the CloudWatch web UI.

Optional

Per Host Metrics Included

-Dawsmetrics.per-host-metrics-included=true
  • true: Publish all metrics a second time with a host dimension/namespace (see: awsmetrics.single-metric-namespace)
  • false: Do not publish host level metrics

Default: true

Single Metric Namespace

-Dawsmetrics.single-metric-namespace=false
  • true: Host level metrics and global metrics are put into the same namespace. Host level metrics have an additional dimension
  • false: Host level metrics and global metrics are put into the different namespaces with no extra dimensions

Default: true

About

Solr plugin to enable publishing JVM metrics to CloudWatch

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages