Hi all,
I’m trying to move a deployment to docker, and I can’t work out how to run it behind a proxy. I’ve found some documentation for multi-site installs around url_prefix, but nothing for a standard installation.
My use case is that I want to proxy requests from https://mysite.com/monitoring/ to my check_mk_server.mysite.com:5000
Any documentation / pointers would be much appreciated,
Thanks,
Wayne
Hi Wayne,
The way I interpret your issue makes me think you need another system (non-Check_MK) to use as a proxy.
I don’t think this is strictly a Check_MK thing.
Two alternatives come to mind, but both require the second URL
check_mk_server.mysite.com:5000
to be reachable for end users.
As this is not proxying it’s probably not of any use, but here goes.
Distributed setup:
Have a main site at https://mysite.com/monitoring and add the docker site(s) as slave site(s).
Main site shouldn’t monitor anything, use it as Check_MK frontend only and let this main site do the notifying.
Mod_rewrite:
https://httpd.apache.org/docs/current/mod/mod_rewrite.html. Rewrite the URL on the fly.
Again, this is not proxying – second site must be reachable for end users.
Arno
On Behalf Of Wayne Pascoe
···
Hi all,
I’m trying to move a deployment to docker, and I can’t work out how to run it behind a proxy. I’ve found some documentation for multi-site installs around url_prefix, but nothing for a standard installation.
My use case is that I want to proxy requests from
https://mysite.com/monitoring/ to my
check_mk_server.mysite.com:5000
Any documentation / pointers would be much appreciated,
Thanks,
Wayne
Hi Wayne,
The way I interpret your issue makes me think you need another system (non-Check_MK) to use as a proxy.
I don’t think this is strictly a Check_MK thing.
Two alternatives come to mind, but both require the second URL
check_mk_server.mysite.com:5000
to be reachable for end users.
As this is not proxying it’s probably not of any use, but here goes.
Distributed setup:
Have a main site at https://mysite.com/monitoring and add the docker site(s) as slave site(s).
Main site shouldn’t monitor anything, use it as Check_MK frontend only and let this main site do the notifying.
Mod_rewrite:
https://httpd.apache.org/docs/current/mod/mod_rewrite.html. Rewrite the URL on the fly.
Again, this is not proxying – second site must be reachable for end users.
Arno
On Behalf Of Wayne Pascoe
···
Hi all,
I’m trying to move a deployment to docker, and I can’t work out how to run it behind a proxy. I’ve found some documentation for multi-site installs around url_prefix, but nothing for a standard installation.
My use case is that I want to proxy requests from
https://mysite.com/monitoring/ to my
check_mk_server.mysite.com:5000
Any documentation / pointers would be much appreciated,
Thanks,
Wayne
I set up a similar scenario using proxypass in apache:
ProxyRequests Off
ProxyPreserveHost On
# I chose to use the url http://apache-server.site/monitor/ instead of the root, but you could do it there too...
ProxyPassMatch "^/monitor/(.*)$" "https://my_check_mk_server.site/monitor/$1" connectiontimeout=5 timeout=450
ProxyPassReverse "/monitor/" "https://my_check_mk_server"
Chris
···
---------------
On Mon, 22 Oct 2018 09:37:51 +0100 Wayne Pascoe <wayne@penguinpowered.org> wrote:
---------------
Hi Arno,
The issue I’m trying to solve is that check_mk.mysite.com:5000 cannot be
accessible by end users.
The plan is to use nginx or apache on a publicly available server to proxy
requests to check_mk
With other applications that we do this with (e.g kibana) we specify a url
prefix or base url of Mysite.com/monitoring in the kibana config. Kibana then
uses this to rewrite all of the links it sends back so that they are valid.
For example, it may normally return a link of mysite.com/settings/indexpage
but with this configuration it would return a link of
mysite.com/monitoring/indexpage
Regards,
> On 22 Oct 2018, at 09:09, Arno Wijnhoven <arnow@vsnsystemen.nl> wrote:
>
> Hi Wayne,
>
> The way I interpret your issue makes me think you need another system
> (non-Check_MK) to use as a proxy. I don’t think this is strictly a Check_MK
> thing.
>
> Two alternatives come to mind, but both require the second URL
> check_mk_server.mysite.com:5000 to be reachable for end users. As this is
> not proxying it’s probably not of any use, but here goes.
>
> Distributed setup:
>
> Have a main site at https://mysite.com/monitoring and add the docker
> site(s) as slave site(s). Main site shouldn’t monitor anything, use it as
> Check_MK frontend only and let this main site do the notifying.
>
> Mod_rewrite:
> mod_rewrite - Apache HTTP Server Version 2.4. Rewrite the URL
> on the fly. Again, this is not proxying – second site must be reachable for
> end users.
>
> Arno
>
> From: checkmk-en [mailto:checkmk-en-bounces@lists.mathias-kettner.de] On
> Behalf Of Wayne Pascoe Sent: zondag 21 oktober 2018 21:04
> To: checkmk-en@lists.mathias-kettner.de
> Subject: [Check_mk (english)] Running check_mk behind proxy - changing
> url_prefix
> Hi all,
>
> I'm trying to move a deployment to docker, and I can't work out how to run
> it behind a proxy. I've found some documentation for multi-site installs
> around url_prefix, but nothing for a standard installation. My use case is
> that I want to proxy requests from https://mysite.com/monitoring/ to my
> check_mk_server.mysite.com:5000 Any documentation / pointers would be much
> appreciated,
> Thanks,
>
> Wayne
Hi Chris,
I’m still struggling with this a little. Does the proxypassreverse rewrite the URLs coming from check_mk ?
Where I’m at so far is:
Check_mk is running on http://somehost:6000/sitename/check_mk/ and I need to access it from https://example.com/arbitraryprefix/check_mk/
I can access check_mk for the first time at https://example.com/arbitraryprefix/check_mk/index.py - This works
However, all links in the returned page are invalid because they’re not aware of the proxy. So they’re things like https://example.com/sitename/check_mk/dashboard.py instead of https://example.com/arbitraryprefix/check_mk/dashboard.py
Did you have to do anything in addition to your proxy setup to make check_mk work at these URLs ?
Thanks,
···
–
Wayne Pascoe (gpg --keyserver www.co.uk.pgp.net --recv-keys 79A7C870)
On 22 Oct 2018, at 19:26, Chris Vance csv7@msstate.edu wrote:
I set up a similar scenario using proxypass in apache:
ProxyRequests Off
ProxyPreserveHost On
I chose to use the url http://apache-server.site/monitor/ instead of the root, but you could do it there too…
ProxyPassMatch “^/monitor/(.*)$” “https://my_check_mk_server.site/monitor/$1” connectiontimeout=5 timeout=450
ProxyPassReverse “/monitor/” “https://my_check_mk_server”
Chris
On Mon, 22 Oct 2018 09:37:51 +0100 > Wayne Pascoe wayne@penguinpowered.org wrote:
Hi Arno,
The issue I’m trying to solve is that check_mk.mysite.com:5000 cannot be
accessible by end users.
The plan is to use nginx or apache on a publicly available server to proxy
requests to check_mk
With other applications that we do this with (e.g kibana) we specify a url
prefix or base url of Mysite.com/monitoring in the kibana config. Kibana then
uses this to rewrite all of the links it sends back so that they are valid.
For example, it may normally return a link of mysite.com/settings/indexpage
but with this configuration it would return a link of
mysite.com/monitoring/indexpage
Regards,
On 22 Oct 2018, at 09:09, Arno Wijnhoven arnow@vsnsystemen.nl wrote:
Hi Wayne,
The way I interpret your issue makes me think you need another system
(non-Check_MK) to use as a proxy. I don’t think this is strictly a Check_MK
thing.
Two alternatives come to mind, but both require the second URL
check_mk_server.mysite.com:5000 to be reachable for end users. As this is
not proxying it’s probably not of any use, but here goes.
Distributed setup:
Have a main site at https://mysite.com/monitoring and add the docker
site(s) as slave site(s). Main site shouldn’t monitor anything, use it as
Check_MK frontend only and let this main site do the notifying.
Mod_rewrite:
https://httpd.apache.org/docs/current/mod/mod_rewrite.html. Rewrite the URL
on the fly. Again, this is not proxying – second site must be reachable for
end users.
Arno
From: checkmk-en [mailto:checkmk-en-bounces@lists.mathias-kettner.de] On
Behalf Of Wayne Pascoe Sent: zondag 21 oktober 2018 21:04
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Running check_mk behind proxy - changing
url_prefix
Hi all,
I’m trying to move a deployment to docker, and I can’t work out how to run
it behind a proxy. I’ve found some documentation for multi-site installs
around url_prefix, but nothing for a standard installation. My use case is
that I want to proxy requests from https://mysite.com/monitoring/ to my
check_mk_server.mysite.com:5000 Any documentation / pointers would be much
appreciated,
Thanks,
Wayne
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en