Code Monkey home page Code Monkey logo

memcached_newrelic_ia's Introduction

New Relic Infrastructure Agent

Gem for collecting memcached, disk, cpu and IO statistics. Collected stats are sent to the New Relic RPM application.

Memcached statistics sampler collects subset of stats provided by memcached daemon. In addition it computes other stats dervied from memcached stats. Also support stats derivatives over time to compute rate etc. Specify Memcached nodes configuration in memcached-nodes.txt file under the IA agent directory

DESCRIPTION:

Use this gem to collect statistics from a given host by running newrelic_ia -a as a daemon. This will contribute System/* metrics to your RPM console which can be viewed with custom dashboards.

SYNOPSIS:

newrelic_ia [ options ] aspect, aspect.. 

aspect: one or more of 'iostat' or 'disk' or 'memcached' (more to come)

-a, --all                        use all available aspects
-v, --verbose                    debug output
-q, --quiet                      quiet output
-e, --environment=ENV            use ENV section in newrelic.yml
    --install                    create a default newrelic.yml
-h, --help                       Show this help message.

REQUIREMENTS:

  • New Relic Agent version 2.9.2 or later

  • Gold Subscription for creating and viewing custom dashboards

INSTALL:

sudo gem install newrelic_ia

Once installed, run from the home directory of your Rails application, or create a separate working directory and run

newrelic_ia --install

to create a template newrelic.yml file you can use. Edit this file and substitute your license key and app_name value.

specify memcached nodes in memcached-nodes.txt.

Memcached Stats

Memcached stats are reported for each node and also sample reports aggregated stats

Stats provided by memcached daemon 
  uptime                     Number of seconds this server has been running
  curr_items                 Current number of items stored by the server
  total_items                Total number of items stored by this server 
                             ever since it started
  bytes                      Current number of bytes used by this server 
                             to store items
  curr_connections           Number of open connections
  total_connections          Total number of connections opened since 
                             the server started running
  connection_structures      Number of connection structures allocated 
                             by the server
  cmd_get                    Cumulative number of retrieval requests
  cmd_set                    Cumulative number of storage requests
  get_hits                   Number of keys that have been requested and 
                             found present
  get_misses                 Number of items that have been requested 
                             and not found
  evictions                  Number of valid items removed from cache                                                                           
                             to free memory for new items                                                                                       
  bytes_read                 Total number of bytes read by this server 
                             from network
  bytes_written              Total number of bytes sent by this server to 
                             network
  limit_maxbytes             Number of bytes this server is allowed to
                             use for storage. 
  threads                    Number of worker threads requested.
                                (see doc/threads.txt)

Derived Stats (computed stats) 
  free_maxbytes              Number of free bytes this server has available for storage

Stats Derivatives (time derivatives of stats) 
  hit_ratio                  Percent of keys that have been requested and 
                             found present
  miss_ratio                 Percent of keys that have been requested and

found missing

rpm                        Requests per minutes 
gpm                        Gets per minutes
hpm                        Hits per minutes
mpm                        Misses per minutes
spm                        Sets per minutes
fpm                        Flushes per minutes
epm                        Evictions per minutes

Sample Cutsom Dashboard for dashboard

Liquid template for NewRelic custom dashboard

<div>
    <div style="float: left; width: 50%;">
        {% line_chart value:average_value title:'Cache Miss Ratio' metric:'/System/MemcachedAgg/Miss Ratio' simple_tooltip:true label:segment_3 value_suffix:'%' %}
    </div>
    <div style="float: left; width: 50%;">
        {% line_chart value:average_value title:'Cache Memory' regexp:'/System/MemcachedAgg/(Bytes|Free Bytes|Limit Maxbytes)' simple_tooltip:true label:segment_3 %}
    </div>
    <br style="clear: both" />
</div>

<div style="padding-top: 20px">&nbsp;</div>

<div>
    <div style="float: left; width: 50%;">
        {% line_chart value:average_value title:'Cache Gets & Sets' regexp:'/System/MemcachedAgg/(Gpm|Spm)' simple_tooltip:true label:segment_3 %}
    </div>
    <div style="float: left; width: 50%;">
        {% line_chart value:average_value title:'Cache Misses, Flushes, & Evictions' regexp:'/System/MemcachedAgg/(Mpm|Epm|Fpm)' simple_tooltip:true label:segment_3 %}
    </div>
    <br style="clear: both" />
</div>

<div style="padding-top: 20px">&nbsp;</div>

<div>
    <div style="float: left; width: 50%;">
    {% line_chart value:average_value title:'Active Connections' metric:'/System/MemcachedAgg/Curr Connections' simple_tooltip:true hide_legend:true %}
    </div>
    <div style="float: left; width: 50%;">
    {% line_chart value:average_value title:'Cache Objects' metric:'/System/MemcachedAgg/Curr Items' simple_tooltip:true hide_legend:true %}
    </div>
    <br style="clear: both" />
</div>

LICENSE:

(The MIT License)

Copyright © 2009-2010 Bill Kayser, Chandra Patni, Tony Ford

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

memcached_newrelic_ia's People

Contributors

cpatni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.