Check_mk Multisite and PNP4nagios

Check_mk Multisite and PNP4nagios

Introduction-

Nagios Check_mk Multisite (plugin) allow user to view/manage distributed nagios using single Web based Interface. However by default
it doesn’t support pnp4nagios graphs (hosts/services from remote nagios) access using (single) Multisite URL.

* To access PNP4nagios graphs of hosts/services from remote nagios using (single) Multisite URL, we need to Add Apache Proxy redirect setting.

1] multisite.mk Conf file-

This is my “check_mk/multisite.mk” conf file. (from Primary multisite Server (prod), SITE1 and SITE2 are two remote nagios)

OMD[prod]:~$ cat etc/check_mk/multisite.mk

….
sites = {
#Primary site
“local” : {
“alias” : “PROD”
},
# Remote site
“SITE1”: {
“alias”: “SITE1”,
“socket”: “tcp:192.168.1.10:6557”,
“url_prefix”: “/SITE1/”,
“nagios_url”: “/SITE1/nagios”,
“nagios_cgi_url”: “/SITE1/nagios/cgi-bin”,
“pnp_url”: “/SITE1/pnp4nagios”,
},
# Remote site
“SITE2”: {
“alias”: “SITE2”,
“socket”: “tcp:192.168.2.10:6557”,
“url_prefix”: “/SITE2/”,
“nagios_url”: “/SITE2/nagios”,
“nagios_cgi_url”: “/SITE2/nagios/cgi-bin”,
“pnp_url”: “/SITE2/pnp4nagios”,
},
}
….
…..
OMD[prod]:~$

2] Apache Proxy Redirect for PNP4nagios –

OMD[prod]:~# cat /etc/httpd/conf.d/multisite_proxy.conf
#SITE1
<Location /SITE1/>
RewriteEngine On
RewriteRule ^/.+/SITE1/(.*) http://192.168.1.10/SITE1/$1 [P]
</Location>

#SITE2
<Location /SITE2/>
RewriteEngine On
RewriteRule ^/.+/SITE2/(.*) http://192.168.2.10/SITE2/$1 [P]
</Location>

OMD[prod]:~#

That’s it! Now you can access pnp4nagios graphs form remote nagios hosts/services using single Multisite URL.

Thank you,
Arun Bagul

Similar Posts:

Leave a Reply

Your email address will not be published.