[Thruk] Remote Peer

1,138 views
Skip to first unread message

Jtknnn

unread,
Jun 15, 2012, 4:30:56 AM6/15/12
to Thruk
Hello all,

I've some trouble between Thruk and my remote peer ( Nagios and
Omd ) , when I start thrurk I have this answer "Starting thruk....
(13851) OK" and this in my error.log:

[2012/06/14 18:38:29][srv-thruk][ERROR][Thruk.Action.AddDefaults] data
source error: failed to open socket /var/nagios/rw/live: No such file
or directory at /usr/lib/thruk/perl5/Monitoring/Livestatus/Class/Base/
Table.pm line 189
at /usr/lib/thruk/perl5/Monitoring/Livestatus/Class/Base/Table.pm
line 189
[2012/06/14 18:38:29][srv-thruk][ERROR][Thruk.Controller.error] No
Backend available
[2012/06/14 18:38:29][srv-thruk][ERROR][Thruk.Controller.error] on
page: http://10.101.0.124/thruk/cgi-bin/status.cgi?hostgroup=all&style=overview&_=1339746868496


I haven't change the thruk.conf, however I have add my remote peer in
thruk_local.conf:

<peer>
name = srv-nagios
type = livestatus
<options>
peer = 10.101.0.27:6557
</options>
</peer>


<peer>
name = srv-nagios-omd
type = livestatus
<options>
peer = 10.101.0.190:6557
</options>
</peer>


My Thruk server is in the same lan than my remote peer.
I will let my livestatus cfg too, if that can help you to find my
mistake.

#srv-
nagios
service livestatus
{
type = UNLISTED
port = 6557
socket_type = stream
protocol = tcp
wait = no
cps = 100 3
instances = 500
per_source = 250
flags = NODELAY
user = nagios
server = /usr/bin/unixcat
server_args = /var/lib/nagios3/rw/live
only_from = 127.0.0.1
disable = no
}

#srv-nagios-
omd
#site.conf
service
livestatus
CONFIG_LIVESTATUS_TCP='on'

CONFIG_LIVESTATUS_TCP_PORT='6557'
{
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
cps = 100 3
instances = 500
per_source = 250
flags = NODELAY
only_from = 127.0.0.1 10.0.20.1 10.0.20.2
disable = no
port = 6557
user = mysite
server = /omd/sites/mysite/bin/unixcat
server_args = /omd/sites/mysite/tmp/run/live
}

Thank you !

Sven Nierlein

unread,
Jun 15, 2012, 5:02:47 AM6/15/12
to th...@googlegroups.com
Hi,

Seems like your peer settings have no affect. Did you put the peer config in
<Component Thruk::Backend> tags?

Full thruk_local.conf entry would be:

<Component Thruk::Backend>
<peer>
name = srv-nagios
type = livestatus
<options>
peer = 10.101.0.27:6557
</options>
</peer>
</Component>

Bye,
Sven

Jtknnn

unread,
Jun 15, 2012, 5:19:39 AM6/15/12
to th...@googlegroups.com
Yes sorry, I have already <Component Thruk::Backend> tags, in my thruk_local.conf, now my thruk service failed "Starting thruk..................failed" and I haven't update in my error.log ( I Have just change the peer IP ).

Jtknnn

unread,
Jun 15, 2012, 5:28:14 AM6/15/12
to th...@googlegroups.com
My problems have been fixed, now the thruk service is OK, and I can reached the thruk gui, but when I select the services of my peer, I have this errors :

No Backend available
None of the configured Backends could be reached, please have a look at the logfile for detailed information.

Details:
ERROR: socket error (10.101.0.27:6557)

Sven Nierlein

unread,
Jun 15, 2012, 5:34:55 AM6/15/12
to th...@googlegroups.com
On 15.06.2012 11:28, Jtknnn wrote:
>
> Details:
> ERROR: socket error (10.101.0.27:6557)

So you have the error already. Make sure the socket is reachable.

phiphi917

unread,
Jun 20, 2012, 6:07:25 AM6/20/12
to Thruk

Do you have sommething like that on the definition of local server :

<options>
peer = /usr/local/nagios/var/rw/live
resource_file = /usr/local/nagios/etc/resource.cfg
</options>

Once I have the same problem. Because it was the wrong path of "live"
You have to check the permission on resource.cfg too.

Krishna Shrestha

unread,
Nov 26, 2013, 10:46:22 PM11/26/13
to th...@googlegroups.com
Hello all,
             how to make socket reachable. i have the same problem like above. i have installed the thruk and starting well, but when i click on the services and other,
i got error
No Backend available
None of the configured Backends could be reached, please have a look at the logfile for detailed information.

Details:
ERROR: socket error (37.157.32.85:6557)


and also i do

<options>
            peer          =  37.157.32.85
            resource_file = /etc/nagios3/resource.cfg
       </options>

Where is the problem please help



Krishna Shrestha

unread,
Nov 26, 2013, 10:55:38 PM11/26/13
to th...@googlegroups.com
in nagios.cfg
i put
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /var/lib/nagios/rw/live

but i didnot see the /var/lib/nagios/rw/live in ubuntu 12.04 how should i connect ? please help me

i installed both the nagios and mk_livestatus.

where should these modules load from i have no idea so could you please help me please



Reply all
Reply to author
Forward
0 new messages