Git Product home page Git Product logo

xymon-varnish's Introduction

xymon-varnish

xymon-varnish is a perl script that you can use to monitor a varnish installation and graph its counters into your BB/Hobbit/Xymon server.

A xymon page featuring some varnish counters

How it works

xymon_varnish.pl connects to your varnish server to get the needed data by issuing this command:

  • /usr/local/bin/varnishstat -1

The values are then posted into the host's trends data channel.

Some HTML code is also posted as a status, in order to be able to see the graphs alone on one page (ugly but works). If you only want the graphs to appear in the trends page, you can remove the line that send the status and then set the TRENDS variable in xymonserver.cfg.

Installation

  • Copy xymon_varnish.pl somewhere executable by your xymon client (typically $HOBBITCLIENTHOME/ext or $XYMONCLIENTHOME/ext). Set the permissions accordingly.

  • Edit the script to provide the path to the varnishstat executable (which might not be in /usr/local/bin on your system).

my $data = `/usr/local/bin/varnishstat -j`;
my $data_full = `/usr/local/bin/varnishstat -1`;
  • Makes xymon execute the script periodically. In hobbitlaunch.cfg (Hobbit)
[varnishd]
    ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
    CMD $HOBBITCLIENTHOME/ext/varnishd.pl
    LOGFILE $HOBBITCLIENTHOME/logs/hobbit-varnishd.log
    INTERVAL 3m

or in clientlaunch.cfg (Xymon)

[varnishd]
    ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
    CMD $XYMONCLIENTHOME/ext/varnishd.pl
    LOGFILE $XYMONCLIENTLOGS/xymon-varnishd.log
    INTERVAL 3m
  • Append or include the provided file to graphs.cfg.

  • Restart xymon-client.

Sample graphs:

Varnish Connections

Varnish Requests

Varnish Cache

Varnish Backend Connections

Credits:

xymon-varnish was written in February 2014 by: ZeWaren / Erwan Martin <[email protected]>.

It is licensed under the MIT License.

xymon-varnish's People

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.