We are migrating from Nagios Core to Checkmk Raw and are reusing some Nagios scripts we have written. We have put the scripts in: $OMD_ROOT/local/lib/nagios/plugins and configured the checks in: Setup - Services - Other services - Integrate Nagios plugins
Nagios seems to use /etc/hosts or it’s own config-files for host-lookups first and then dns.
Checkmk seems to use dns directly and does not use /etc/hosts or it’s own config-files.
Is this correct?
We are using a proxy on the Checkmk-server. How can we instruct Checkmk to lookup some sites locally through /etc/hosts or equivalent and not through the proxy?
Example:
$OMD_ROOT/local/lib/nagios/plugins/example-script.sh server1.domain.se value1 value2
this check goes through the proxy and does not use /etc/hosts
so it does not help that we have
192.168.10.10 server1.domain.se
for example in the /etc/hosts file on the Checkmk-server.
Also under which user does the “Integrate Nagios plugins”-checks execute on the Checkmk-server? Is it under the site-name user that is created in /etc/passwd?
Nagios seems to use /etc/hosts or it’s own config-files for host-lookups first and then dns.
Checkmk seems to use dns directly and does not use /etc/hosts or it’s own config-files.
Is this correct?
/etc/hosts ( or the equivalent on windows C:\Windows\System32\drivers\etc) has always been an Override mechanism for DNS resolvers.
So aslong as you are not running own DNS locally you will have to keep using them.
I myself am running local DNS-servers for my domain, and all hosts are looking at it internally, and the DNS-servers themselves are allowed to lookup everything ‘outside’ my domain with DNS-servers on the Internet (Forwarders).
Next to that the domain itself has on the internet -DNS- servers configured has references to the services i expose over my WAN, so has public IP references.
This creates a so-called ‘split-dns’ -situation, where there is no need to deal with overrides on a/the host(s) to resolve something.
Now what i am curious about is where the proxy comes in, as in my thought/world a proxy should only be used for WAN/Internet traffic.
So local (LAN) traffic (usually defined by a domain-name) is excluded from a/the proxy.
Our Checkmk Raw server connects through a proxy to access the internet. One check that I had created connected to a name of a host that is accessible from the internet also. Therefore the Checkmk server connected to the proxy and then back to the host. This was not allowed since the host is configured with ip-restrictions.
We solved it by adding the FQDN of the host to environment variable no_proxy so that the IP that connects to the host is the Checkmk-server IP.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.