GithubHelp home page GithubHelp logo

radziejewicz / monitoring-munin-haproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonathanio/monitoring-munin-haproxy

0.0 0.0 0.0 18 KB

Extensive Munin plugin for monitoring HAProxy services.

License: GNU General Public License v2.0

Perl 100.00%

monitoring-munin-haproxy's Introduction

haproxyng Munin Plugin

This is a Munin plugin which allows you to monitor a large number of statistics from within HAPRoxy, including:

  • Bandwidth for Frontends
    • Broken down by Service
  • Bandwidth for Backends
    • Broken down by Service
      • Broken down by Host
  • Timings for Backends
    • Broken down by Service
      • Broken down by Host
  • Sessions for Frontends
    • Broken down by Service
  • Sessions for Backends
    • Broken down by Service
      • Broken down by Host
  • Response Codes for Frontends
    • Broken down by Service (aggregating by Status Code)
      • Broken down by Status Code
  • Response Codes for Backends
    • Broken down by Service (aggregating by Server)
      • Broken down by Server
    • Broken down by Service (aggregating by Status Codes)
      • Broken down by Status (aggregating by Server)
        • Broken down by Server

Warning

This can product a lot of graphs: With about 50 servers and around 10 services you can probably exceed over 1000 graphs being produced covering all the above.

This setup either required some very fast hardware, or it's best to make sure that you are using something like rrdcached and SSDs to make sure that you are aggregating updates, caching reads, etc. Additionally, creating graphs on-the-fly via CGI may end up being better, unless you can safely produce a very large number of graphs every five minutes with room to spare and grow!

Usage

You will need Munin 2.0 as this is a multigraph plugin and will output all graphs in a single run.

[haproxyng*]
env.socket /path/to/socket
env.clean prefix-

haproxyng takes two environmental options:

  • socket which is the path to the UNIX socket to HAProxy. This script only needs the user level permission to get read access to the statistics. No write or admin level access is required.
  • clean which can be used to strip common parts of a name from the configuration. For example if you're configuration is automatically generated and everything is prefixed with "staging-" or "production_" then put that (or any other regex) into clean and it will be cleaned from any titles before being output to Munin.

Beyond that, copy/symlink it to the plugins/ directory on the relevant node and wait for it to run. Running

munin-run haproxyng config

is also possible to verify that it can see everything and output the configuration data for Munin.

Licence

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

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.