[Check_mk (english)] mod proxy for distributed sites

Hi community,

Based on this article, https://mathias-kettner.de/checkmk_multisite_modproxy.html

I am assuming that the work needs to be done on the master site? I have 1 master and 6 slaves.

I use omd2.2

I have populated the info on master, yet I still get this error on the graphs when trying to access a slave sites graphs, ERROR:Received an unexpected response while trying to display the PNP-Graphs. Maybe there is a problem with the authentication.

The graphs work if I select the graph icon next to the service (as previously always have), but it always takes me to a login screen. So it directs to the slave site itself.

What am I doing wrong?

Here is my config.

~/etc/check_mk/multisite.mk

sites = {

“Master” : {

“alias” : “Master”

},

“atlantic” : {

“alias” : “Atlantic”,

“socket”: “tcp:my_ip:6557”,

“url_prefix”: “/atlantic/”,

},

}

~/etc/apache/conf.d/multisite_proxy.conf

<Location /atlantic>

RewriteEngine On

RewriteRule ^/.+/atlantic/(.*) http://my_ip/atlantic/$1 [P]

I restarted apache and the omd sites.

Dino Charalambous

Hi Dino,

If you are using WATO then under the connection settings for your slaves, make sure you set the relative url prefix. It’s under ‘Livestatus settings’ you should see the Url Prefix setting. Just add the relative path. eg. /sitename/

Also, on your master you will need some rewrite rules. Add them in a file under /etc/httpd/conf.d/ like so;

<Location /sitea>

Options +FollowSymLinks

RewriteEngine On

RewriteRule ^/.+/sitea/(.*) http://sitea.mydomain.com/sitea/$1 [P]

<Location /siteb>

Options +FollowSymLinks

RewriteEngine On

RewriteRule ^/.+/siteb/(.*) http://siteb.mydomain.com/siteb/$1 [P]

Restart check_mk and apache and you should be good.

···

On Fri, Jun 30, 2017 at 2:06 AM, Charalambous, Dino DCharalambous@fnb.co.za wrote:

Hi community,

Based on this article, https://mathias-kettner.de/checkmk_multisite_modproxy.html

I am assuming that the work needs to be done on the master site? I have 1 master and 6 slaves.

I use omd2.2

I have populated the info on master, yet I still get this error on the graphs when trying to access a slave sites graphs, ERROR:Received an unexpected response while trying to display the PNP-Graphs. Maybe there is a problem with the authentication.

The graphs work if I select the graph icon next to the service (as previously always have), but it always takes me to a login screen. So it directs to the slave site itself.

What am I doing wrong?

Here is my config.

~/etc/check_mk/multisite.mk

sites = {

“Master” : {

“alias” : “Master”

},

“atlantic” : {

“alias” : “Atlantic”,

“socket”: “tcp:my_ip:6557”,

“url_prefix”: “/atlantic/”,

},

}

~/etc/apache/conf.d/multisite_proxy.conf

<Location /atlantic>

RewriteEngine On

RewriteRule ^/.+/atlantic/(.*) http://my_ip/atlantic/$1 [P]

I restarted apache and the omd sites.

Dino Charalambous

To read FirstRand Bank’s Disclaimer for this email click on the following address or copy into your Internet browser:
https://www.fnb.co.za/about-fnb/legal-matters/email-disclaimer.html

If you are unable to access the Disclaimer, send a blank e-mail to firstrandbankdisclaimer@fnb.co.za
and we will send you a copy of the Disclaimer.


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Hi Paul,

thank you for your response. i have implemented your suggestion, and find that it does work.

I would like to know, is there a way that it can continue to work when i have closed my browser down completely?

It seems to only work if i keep my browser session open. once i close or restart the browser, it requests for one time to authenticate. Fortunately it is only once and i dont have to authenticate each and every site

Regards,

Dino Charalambous

···

From: Paul D paulmonitoring@gmail.com
Sent: Friday, June 30, 2017 6:45:16 PM
To: Charalambous, Dino
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] mod proxy for distributed sites

Hi Dino,

If you are using WATO then under the connection settings for your slaves, make sure you set the relative url prefix. It’s under ‘Livestatus settings’ you should see the Url Prefix setting. Just add the relative path. eg. /sitename/

Also, on your master you will need some rewrite rules. Add them in a file under /etc/httpd/conf.d/ like so;

<Location /sitea>

Options +FollowSymLinks

RewriteEngine On

RewriteRule ^/.+/sitea/(.*)
http://sitea.mydomain.com/sitea/$1
[P]

<Location /siteb>

Options +FollowSymLinks

RewriteEngine On

RewriteRule ^/.+/siteb/(.*)
http://siteb.mydomain.com/siteb/$1
[P]

Restart check_mk and apache and you should be good.

On Fri, Jun 30, 2017 at 2:06 AM, Charalambous, Dino
DCharalambous@fnb.co.za wrote:

Hi community,

Based on this article,
https://mathias-kettner.de/checkmk_multisite_modproxy.html

I am assuming that the work needs to be done on the master site? I have 1 master and 6 slaves.

I use omd2.2

I have populated the info on master, yet I still get this error on the graphs when trying to access a slave sites graphs, ERROR:Received an unexpected response while trying to display the PNP-Graphs. Maybe there is a problem with the authentication.

The graphs work if I select the graph icon next to the service (as previously always have), but it always takes me to a login screen. So it directs to the slave site itself.

What am I doing wrong?

Here is my config.

~/etc/check_mk/multisite.mk

sites = {

“Master” : {

“alias” : “Master”

},

“atlantic” : {

“alias” : “Atlantic”,

“socket”: “tcp:my_ip:6557”,

“url_prefix”: “/atlantic/”,

},

}

~/etc/apache/conf.d/multisite_proxy.conf

<Location /atlantic>

RewriteEngine On

RewriteRule ^/.+/atlantic/(.*)
http://my_ip/atlantic/$1
[P]

I restarted apache and the omd sites.

Dino Charalambous

To read FirstRand Bank’s Disclaimer for this email click on the following address or copy into your Internet browser:

https://www.fnb.co.za/about-fnb/legal-matters/email-disclaimer.html

If you are unable to access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer@fnb.co.za and we will send you a copy of the Disclaimer.


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

To read FirstRand Bank’s Disclaimer for this email click on the following address or copy into your Internet browser:
https://www.fnb.co.za/about-fnb/legal-matters/email-disclaimer.html

If you are unable to access the Disclaimer, send a blank e-mail to firstrandbankdisclaimer@fnb.co.za
and we will send you a copy of the Disclaimer.