Question

I am using Nagios with Check_MK addon at a small ISP company I work for. I am a sole Nagios admin, but we have a few users who use the Nagios / Check_MK system (with Check_MK as the web frontend).

As most devices we use are MikroTik routers with proprietary OS within which I cannot install the check_mk agent (have to use SNMP), I am using Check_MK with generate_hostconf = False - I have to manually define WiFi interface checks (like signal strength check) anyways, so all host configuration is done in Nagios files.

All users who use the system are listed in cgi.cfg with authorized_for_all_services=user1,user2 and authorized_for_all_hosts=user1,user2 etc.

As I was not satisfied with the current configuration (there is not enough serverity-based differentiation among different hosts and service types - i.e. we want not only backbone / not-monitored host differentiation, but something more fine-grained like backbone / distribution layer 1 / distribution layer 2 / not-monitored client-side), I started to change the configuration to somewhat hackish setup with multiple contacts per real user, with different timeperiods assigned, so that e.g. 'distribution-layer 2' hosts don't wake people at 3 a.m. Perhaps this is not the proper way to do the thing.

Anyways, here is the problem - I created new contacts and contact groups and some rules for inventory - for services it works fine, it seems, but apparently hosts are not visible in Check_MK web interface (but they are visible in our Nagios website). Most likely it is so due to the fact I am logged in as the 'old' user, who is not a part of the new contact group, but still who is supposed to see all hosts (as defined in cgi.cfg). Can I do something to make hosts visible in Check_MK GUI with that setup and not only in Nagios web interface?

I had to use check_mk --flush hostname and re-inventory with check_mk -II hostname even after changing the settings back to the previous state to make the hosts appear again.

I haven't tried to add new contacts to .htaccess, as I don't really want to create multiple contacts with login permissions. Does Check_mk simply ignore the authorized_for_all_hosts / services directive defined in cgi.cfg in this case?

I can see that Check_MK itself is able to communicate with those hosts not show in GUI - I can do check_mk -II hostname or check_mk -N hostname. Appropriate entries are present in etc/check_mk.d/check_mk_objects.cfg and nagios/var/retention.dat; hostnames are listed with check_mk --list-tag TAG etc. so most likely it is a problem with GUI user permissions only.

I know I could use notification_period directives for hosts and custom SNMP services within Nagios configuration files and extra_service_conf['notification_period'] in main.mk, but I am actually using that for some exceptional cases and wasn't sure about the precedence rules.

Anyways, it is Ubuntu Server 12.04 LTS x86_64, Nagios Core 3.4.1, Check_MK 1.2.0p3.

Was it helpful?

Solution

Apparently it is enough to use default_user_role = "admin" in multisite.mk. Perhaps not the safest thing, but it gets the job done in this setup.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top