How to use dockerized jmx4perl with icinga + graphite dockers

I am pretty new to both icinga and docker but I love how easy it’s been to get it up and going with docker. However I need to do a bunch of jmx monitoring and the easiest way seems to be with jmx4perl which I have working great from the same docker host using the jmx4perl docker. But now what I really want is to be able to use the check_jmx4perl in the jolokia/jmx4perl container from the icinga docker. So far I have managed to make this work with by_ssh and running it from the host, but that is making things difficult. Is there any chance of jmx4perl and check_jmx4perl being added into the icinga2 docker so that I can just call the check natively? Is there some other way to accomplish this?




as Docker works with image layers, you can use the Docker image you’re using at the moment as base in your own image. I would recommend to install and configure the plugin on top, making this available inside the same image/container - everything done in a custom Dockerfile.

I would avoid by_ssh when using containers, those network bridges overly complicate service communication.