# Preferred metrics source: HTTP+JSON or JMX?

**URL:** <https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522>\
**Category:** Elasticsearch\
**Created:** [January 27, 2012, 6:40am UTC](https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522 "2012-01-27T06:40:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [January 27, 2012, 6:40am UTC](https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522/1 "2012-01-27T06:40:02Z")

</div>

Hello,

ElasticSearch exposes cluster/nodes/shard/OS metrics via HTTP+JSON,  
but also via JMX...though I think not everything that exists in the  
former is present in the latter?

If I wanted to collect ES metrics, should I rely on things being in  
JMX or should I always get data from HTTP+JSON API because JMX is  
going to get abandoned or maybe always be secondary and thus  
incomplete?

## Thanks, Otis

> **[Sematext – Solr / Elasticsearch Experts – Search & Big Data Analytics](https://sematext.com/)**
>
> Building innovative Cloud and On Premise solutions for performance monitoring, alerting and anomaly detection (SPM), and log management and analytics (Logsene)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 27, 2012, 8:51pm UTC](https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522/2 "2012-01-27T20:51:27Z")

</div>

HTTP is the more complete one, which has many stats. Started with JMX as well, but slowly gave up on it a bit and prefer people will use the HTTP interface because, well, that it sucks...

On Friday, January 27, 2012 at 8:40 AM, Otis Gospodnetic wrote:

> Hello,
> 
> Elasticsearch exposes cluster/nodes/shard/OS metrics via HTTP+JSON,  
> but also via JMX...though I think not everything that exists in the  
> former is present in the latter?
> 
> If I wanted to collect ES metrics, should I rely on things being in  
> JMX or should I always get data from HTTP+JSON API because JMX is  
> going to get abandoned or maybe always be secondary and thus  
> incomplete?
> 
> ## Thanks, Otis
> 
> [http://sematext.com/](http://sematext.com/)

---

<div class="post-metadata">

**Author:** ![Michael\_Sick](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@Michael\_Sick](https://discuss.elastic.co/u/Michael_Sick)\
**Post date:** [January 27, 2012, 8:55pm UTC](https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522/3 "2012-01-27T20:55:15Z")

</div>

Shay,

Parity here would be nice. No defense of JMX's nonsuckiness but most  
organizations have an ops tool that consumes JMX and when adopting a new  
technology it removes some frowns from the typically stressed and skeptical  
operations folk. 2c.

Mike

On Fri, Jan 27, 2012 at 3:51 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> HTTP is the more complete one, which has many stats. Started with JMX as  
> well, but slowly gave up on it a bit and prefer people will use the HTTP  
> interface because, well, that it sucks...
> 
> On Friday, January 27, 2012 at 8:40 AM, Otis Gospodnetic wrote:
> 
> Hello,
> 
> Elasticsearch exposes cluster/nodes/shard/OS metrics via HTTP+JSON,  
> but also via JMX...though I think not everything that exists in the  
> former is present in the latter?
> 
> If I wanted to collect ES metrics, should I rely on things being in  
> JMX or should I always get data from HTTP+JSON API because JMX is  
> going to get abandoned or maybe always be secondary and thus  
> incomplete?
> 
> ## Thanks, Otis
> 
> [http://sematext.com/](http://sematext.com/)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 27, 2012, 9:17pm UTC](https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522/4 "2012-01-27T21:17:25Z")

</div>

Sure, if JMX is what people are after, it pretty simple to add the relevant stats on JMX as well (there is actually quite a framework built in ES to easily expose JMX data), just open an issue and it can be easily added. But, the REST API is the prefer way to do it (JMX has a very large overhead).

On Friday, January 27, 2012 at 10:55 PM, Michael Sick wrote:

> Shay,
> 
> Parity here would be nice. No defense of JMX's nonsuckiness but most organizations have an ops tool that consumes JMX and when adopting a new technology it removes some frowns from the typically stressed and skeptical operations folk. 2c.
> 
> Mike
> 
> On Fri, Jan 27, 2012 at 3:51 PM, Shay Banon \<[kimchy@gmail.com](mailto:kimchy@gmail.com) ([mailto:kimchy@gmail.com](mailto:kimchy@gmail.com))\> wrote:
> 
> > HTTP is the more complete one, which has many stats. Started with JMX as well, but slowly gave up on it a bit and prefer people will use the HTTP interface because, well, that it sucks...
> > 
> > On Friday, January 27, 2012 at 8:40 AM, Otis Gospodnetic wrote:
> > 
> > > Hello,
> > > 
> > > Elasticsearch exposes cluster/nodes/shard/OS metrics via HTTP+JSON,  
> > > but also via JMX...though I think not everything that exists in the  
> > > former is present in the latter?
> > > 
> > > If I wanted to collect ES metrics, should I rely on things being in  
> > > JMX or should I always get data from HTTP+JSON API because JMX is  
> > > going to get abandoned or maybe always be secondary and thus  
> > > incomplete?
> > > 
> > > ## Thanks, Otis
> > > 
> > > [http://sematext.com/](http://sematext.com/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:41am UTC](https://discuss.elastic.co/t/preferred-metrics-source-http-json-or-jmx/6522/5 "2017-07-06T03:41:13Z")

</div>


