sni / lmd

Livestatus Multitool Daemon - Create livestatus federation from multiple sources
https://labs.consol.de/omd/packages/lmd/
GNU General Public License v3.0
42 stars 31 forks source link

Some backend configs are read-only #107

Closed it-native closed 3 years ago

it-native commented 3 years ago

Hi, since I activated LMD, the config of some backends is read-only on the umbrella. If LMD is deactivated, they can be edited. Is there a setting in ~/etc/thruk/lmd.ini ?

All backends are 'http' backends

Or could it be a version issue? Umbrella = OMD 4.00, Backends= OMD 3.30

Thx & BR Oliver

sni commented 3 years ago

LMD just creates a configtool attribute in the sites table.

echo -e "GET sites\nColumns: name configtool\n" | unixcat tmp/thruk/lmd/live.sock

Everything else is done by Thruk and works for quite some time now.

it-native commented 3 years ago

From my point of view this looks good - no object is located in check_mk_objects.cfg [["Umbrella",{}] ,["SITE1",{"core_type":"","obj_check_cmd":"1","obj_readonly":"[check_mk_objects\\.cfg]","obj_reload_cmd":"1"}] ,["SITE2",{"core_type":"","obj_check_cmd":"1","obj_readonly":"[check_mk_objects\\.cfg]","obj_reload_cmd":"1"}] ,["SITE3",{"core_type":"","obj_check_cmd":"1","obj_readonly":"[check_mk_objects\\.cfg]","obj_reload_cmd":"1"}] ]

I can only configure objects on SITE3. There is nothing in the Umbrella-Thruk config that indicates a Read-Only to me.

cat etc/thruk/thruk_local.conf
ssl_verify_hostnames = 0

<Component Thruk::Backend>
    <peer>
        name    = Umbrella
        id      = c55c8
        type    = livestatus
        <options>
            peer          = /omd/sites/monitoring/tmp/run/live
        </options>
        <configtool>
            core_conf      = /omd/sites/monitoring/tmp/core/core.cfg
            obj_check_cmd  = /omd/sites/monitoring/etc/init.d/core check
            obj_reload_cmd = /omd/sites/monitoring/etc/init.d/core reload
#            obj_readonly   = check_mk_objects\.cfg
        </configtool>
    </peer>
    <peer>
        name    = SITE1
        id      = 54fb7
        type    = http
        section = Kunden
        <options>
            peer          = https://...
            auth          = ...
        </options>
    </peer>
    <peer>
        name    = SITE2
        id      = e4fd7
        type    = http
        section = Kunden
        <options>
            peer          = https://...
            auth          = ...
        </options>
    </peer>
    <peer>
        name    = SITE3
        type    = http
        section = Kunden
        <options>
            peer          = https://...
            auth          = ...
        </options>
    </peer>
</Component>

I tried with "omdadmin" who has different PWDs on each monitoring host, Could this be an issue?

sni commented 3 years ago

no idea tbh. If it works with standalone Thruk it should work with LMD as well. Do all backends show up in the config tool or only one?

it-native commented 3 years ago

Yes, everything shows up correctly image

sni commented 3 years ago

Should be better now with latest lmd. Also https://github.com/sni/Thruk/commit/890eeca68cadf8aa0aa362147b7909cb53acd1e5 might help if the readonly pattern is not set at all.

it-native commented 3 years ago

Great - thx