sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
408 stars 148 forks source link

many livestatus connections per second #405

Closed liedekef closed 9 years ago

liedekef commented 10 years ago

I just got bitten by the limit of livestatus connections per second in xinetd (I configured 100 connections per second). Apparentlty thruk/panorama goes up to that limit, probably even more so if more than 1 person uses the same dashboards. So I was wondering if thruk uses persistent livestatus connections or not? I know mk_livestatus supports this (and probably also naemon livestatus). I tried using "keepalive=1" in thruk_local.conf like this:

<Component Thruk::Backend>
    <peer>
        name   = External Icinga
        type   = livestatus
        <options>
            peer    = 127.0.0.1:6557
        keepalive = 1
       </options>
    </peer>
</Component>

but I still see this in /var/log/messages:

Sep 22 13:06:35 xxx xinetd[1516]: START: livestatus pid=25727 from=127.0.0.1
Sep 22 13:06:35 xxx xinetd[1516]: START: livestatus pid=25730 from=127.0.0.1
Sep 22 13:06:35 xxx xinetd[1516]: EXIT: livestatus status=0 pid=25727 duration=0(sec)
Sep 22 13:06:35 xxx xinetd[1516]: START: livestatus pid=25733 from=127.0.0.1
Sep 22 13:06:35 xxx xinetd[1516]: EXIT: livestatus status=0 pid=25730 duration=0(sec)
Sep 22 13:06:35 xxx xinetd[1516]: EXIT: livestatus status=0 pid=25733 duration=0(sec)
Sep 22 13:06:35 xxx xinetd[1516]: START: livestatus pid=25736 from=127.0.0.1
Sep 22 13:06:35 xxx xinetd[1516]: EXIT: livestatus status=0 pid=25736 duration=0(sec)

So it doesn't seem to be like it is doing "keepalive" here ...

Btw: I switched to using the livestatus unix socket for now, but apparently the config wants "peer" to point to the socket, not "socket".

sni commented 10 years ago

Thruk does not use persistent connections. Local unix sockets are also faster than xinetd.

liedekef commented 10 years ago

Hi Sven,

yes, I know that unix sockets are faster. But the power of thruk comes from the fact that you can install it (if wanted) on another server than the one running naemon/nagios/icinga. Also, the Livestatus perl library that comes with thruk is ready to use "keepalive" connections, so adding it as an option should not be difficult I guess (I was under the impresson that it was already supported, but apparently I'm wrong).

sni commented 9 years ago

The livestatus perl library was prepared to support keepalive but it never worked. Thats why there is no switch to enable it. There were more problems with keepalive than without like hanging connections, etc...