pcp
[Top] [All Lists]

Re: additional metrics for elasticsearch PMDA

To: Ryan Doyle <rdoyle@xxxxxxxxxx>
Subject: Re: additional metrics for elasticsearch PMDA
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 19 Mar 2013 02:12:28 -0400 (EDT)
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1104081411.1907000.1363670579654.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
(cc'ing the list as discussed on IRC)

----- Original Message -----
> 
> Heya Nathan,
> 
> Patch is attached.
> 

Thanks!

> It is not as clean as I would like it but that stems from how these
> metrics are exported from the elasticsearch status API:
> 
> Heres a nice output
> 
> {
> "_all": {
> "indices": {
> "qa4": {
> "primaries": {
> "search": {
> "fetch_current": 0,
> "fetch_time": "0s",
> 

Zimbra thinks little of your nice output, and has kindly removed
all whitespace.  Sorry 'bout that.

> 
> Where all hash keys map directly to the elasticsearch PMID name (EG:
> primaries. search. fetch_current). We take advantage of this in the
> PMDA using the es_value function and passing in a reference to the
> metric requested where each array member is separated by a period.
> 
> 
> Unfortunately , the settings hash does not follow the same convention
> and has periods in the key! EG:
> 

Ugh!

> 
> },
> "settings": {
> "index.gateway.snapshot_interval": "10000",
> "index.number_of_replicas": "1",
> "index.number_of_shards": "5",
> "index.version.created": "190199"
> },
> 
> This makes the code less clean, but it looks like these are the only
> 4 metrics that follow this convention. If you can think of a nicer
> way to do this, I'm all ears.
> 

You might be able to use a hashed instance domain here, instead of
the array based ones (which was all that existed when this PMDA was
originally coded).  Refer to the pmdasimple.pl PMDA for an example -
the %timeslices there is a perl hash.  Instance names can have dots
within them - would that make life easier for these metrics?

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>