Skip to content

Commit

Permalink
* Backported open_contexts to ES 5.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
anandnalya committed May 6, 2017
1 parent edc666c commit c057c85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The data sent to the StatsD server tries to be roughly equivalent to the [Indice
| Elasticsearch | Plugin | Release date |
| -------------- | -------------- | ------------ |
| 5.1.2 | 5.1.2.0 | Jan 19, 2017 |
| 5.1.1 | 5.1.1.0 | Jan 19, 2017 |
| 5.1.1 | 5.1.1.1 | May 6, 2017 |
| 5.0.2 | 5.0.2.0 | Jan 4, 2017 |
| 5.0.1 | 5.0.1.0 | Jan 4, 2017 |
| 5.0.0 | 5.0.0.0 | Nov 1, 2016 |
Expand Down Expand Up @@ -46,12 +46,12 @@ The plugin artifacts are published to Maven Central and Github. To install a pre
From Github:

```
./bin/elasticsearch-plugin install https://github.com/Automattic/elasticsearch-statsd-plugin/releases/download/5.1.2.0/elasticsearch-statsd-5.1.2.0.zip
./bin/elasticsearch-plugin install https://github.com/Automattic/elasticsearch-statsd-plugin/releases/download/5.1.1.1/elasticsearch-statsd-5.1.1.1.zip
```

From Maven Central:
```
./bin/elasticsearch-plugin install http://repo1.maven.org/maven2/com/automattic/elasticsearch-statsd/5.1.2.0/elasticsearch-statsd-5.1.2.0.zip
./bin/elasticsearch-plugin install http://repo1.maven.org/maven2/com/automattic/elasticsearch-statsd/5.1.1.1/elasticsearch-statsd-5.1.1.1.zip
```

Change the version to match your ES version. For ES `x.y.z` the version is `x.y.z.0`
Expand All @@ -67,7 +67,7 @@ mvn package -Dtests.security.manager=false
Once we have the artifact, install it with the following command:

```
./bin/elasticsearch-plugin install file:///Users/anandnalya/github/automattic/elasticsearch-statsd-plugin/target/releases/elasticsearch-statsd-5.1.2.0.zip
./bin/elasticsearch-plugin install file:///Users/anandnalya/github/automattic/elasticsearch-statsd-plugin/target/releases/elasticsearch-statsd-5.1.1.1.zip
```

## Installation Elasticsearch 2.x
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.automattic</groupId>
<artifactId>elasticsearch-statsd</artifactId>
<version>5.1.2.0</version>
<version>5.1.1.1</version>
<packaging>jar</packaging>

<name>elasticsearch-statsd</name>
Expand Down Expand Up @@ -42,7 +42,7 @@
</developers>

<properties>
<elasticsearch.version>5.1.2</elasticsearch.version>
<elasticsearch.version>5.1.1</elasticsearch.version>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected void sendGetStats(String name, GetStats getStats) {

protected void sendSearchStats(String name, SearchStats searchStats) {
if (null == searchStats) return;
this.sendGauge(name, "open_contexts", searchStats.getOpenContexts());
SearchStats.Stats totalSearchStats = searchStats.getTotal();
this.sendSearchStatsStats(name, totalSearchStats);

Expand Down

0 comments on commit c057c85

Please sign in to comment.