Giter Club home page Giter Club logo

monitoring-nagios-haproxy's People

Contributors

barbuk avatar jonathanio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitoring-nagios-haproxy's Issues

Define multiple backends with "--override" doesn't work in Icinga2

Hello,

I have strange problems, I've defined multiple backends in "--override" option in Icinga2. but somehow, Icinga command run ignores it. Trying to run command copy-pasted from "Inspect" in terminal give the same result.

'/usr/local/hs/icinga-plugins/check_haproxy' '--overrides' 'backend-gscache:,1,0 be-rancher:,2,0 be-letsencrypt:x' '--socket' '/var/lib/haproxy/stats'
HAPROXY CRITICAL: BACKEND be-letsencrypt has fallen below 2 available server(s) (0 up, 0 down, 0 disabled) (check_haproxy 1.0.3)

but if I remove single quotes for --override, it's working

 '/usr/local/hs/icinga-plugins/check_haproxy' '--overrides' backend-gscache:,1,0 be-rancher:,2,0 be-letsencrypt:x '--socket' '/var/lib/haproxy/stats'
HAPROXY OK: HAProxy is functioning within established parameters. (3 frontends, 3 backends, 6 servers, 6 services) (check_haproxy 1.0.3)

Not sure there is the bug, I'm using latest Icinga 2.10 with Director.

object Service "Check HAProxy" {
    host_name = "ldb.example.com"
    import "check haproxy"

    vars.haproxy_overrides = "backend-gscache:,1,0 be-rancher:,2,0 be-letsencrypt:x"
}

how to model a "at least one" check

Hi,

the script works fine to monitor that all servers behind a backend are UP. but what if i want only to check that AT LEAST one server is UP?

HAproxy provides already this check, since the backend status is UP if at least on of the server in its group is UP, and becomes DOWN if this is not the case.

How can this perl script be adapted / configured to achieve this check?

is it also possible to whitelist / blacklist certain backends only in/from the check?

Feature : Query a particular Backend

Hi,

I was looking at your excellent script and found one feature : in some case, when you host multiples backends on a haproxy, when you have one faulty server, you will have the notification; however in certain condition, if you have another another failed server in another backend, the previous notification will be overwritten.

I will try to add one new option in order to query particular backend.

Best regards,

Nicolas

Feature Request: disable sessions checks

In our setup we have just one connection per backend. So we always get an error for using more than 90% of the available sessions (1 of 1). I couldn't find a way to disable sessions check or tell them that 100% is still ok (101% seem to be changed to 90%).

Can you please add an options to disable session checks at all?

Check for master and optional message

Hi man!

First, sorry for my english, wich is not best.

I very like you nagios plugin for checking haproxy. We would like to use them in our datacenter / hosting company on a lot of server clusters. Functions is good, but we need some improvements. I made one, but my perl scripting skills is not on the same level like you.

I add a input argument "-M --message" wich gives you option to show a additional message like that :

if ($opt{'optmessage'}) {
printf "HAProxy %s: %s ( %s )\n", (EXIT_STATUS)[$status], $message, $opt{'optmessage'};
} else {
printf "HAProxy %s: %s\n", (EXIT_STATUS)[$status], $message;
}

But the second problem we have... I tried to edit your script, but not successfully.

Example.
We have 1 front and 1 backend for redis. When you setup redis cluster you have only 1 up (master), and 2 down. We need to check where is master. When master is on redis1 everything is OK, but when redis1 came down, and master transferred to redis2 thats not ok. I imagined that like add new override e.g. backend:m,redis1 and then check it and at the same time check if redis1 is really only one server in backend up.

Can you please edit the script for us? We are now using handwrited haproxy check in bash and your script is awesome !

Have a nice day !

Disable critical state

Hello,

I have an HAProxy backend with several hosts and an other backend as backup so all hosts can be down, there will be a fallback. I would like to return a warn when all hosts are down but not a crit as service is up.

Specifying zero values isn't working as check_haproxy uses defaults values:

$ ./check_haproxy --default 'C<u,1,1,80,90>' --overrides read-only:u,1,0 stats:x -d
build_checks{} setting defaults to u,1.00,1.00,0.80,0.90
build_checks{} processing override read-only:u,1,0
build_checks{} setting override for read-only to u,1,1,0.80,0.90

Lines were removed for readability.

Do you know how to disable critical state for a given backend?

Merge fork?

If have tried to add some features like performance data, reporting and other stuff. But ended up with rewriting most of the plugin code. Feel free to have a look DinoTools/monitoring-check_haproxy.

Are you interested in merging the code base? I would like to add more features in the future.

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.