pcp
[Top] [All Lists]

Additional metrics for elasticsearch PMDA

To: pcp@xxxxxxxxxxx
Subject: Additional metrics for elasticsearch PMDA
From: Ryan Doyle <rdoyle@xxxxxxxxxx>
Date: Tue, 19 Mar 2013 16:32:13 +1100 (EST)
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1262945734.1907221.1363671006469.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxx>
Hi All, 

Please see attached patch for additional index metrics for the elasticsearch PMDA.

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", 


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:

 }, 
                "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.


Cheers!

----
Ryan Doyle

Attachment: elasticsearch-PMDA-implement-index-settings.patch
Description: Text Data

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