Hi i've followed several guides about configuring tomcat plugin on a munin node but all of them was for tomcat 6 although i did neccessary corrections in tomcat-users.xml and whatnot, i couldn't get any data from the plugin.

Is there anyone who did this for Tomcat 8?

Edit : The steps i've followed :

Create symlinks :

sudo ln -s /usr/share/munin/plugins/tomcat_access /etc/munin/plugins/tomcat_access
 sudo ln -s /usr/share/munin/plugins/tomcat_jvm /etc/munin/plugins/tomcat_jvm
 sudo ln -s /usr/share/munin/plugins/tomcat_threads /etc/munin/plugins/tomcat_threads
 sudo ln -s /usr/share/munin/plugins/tomcat_volume /etc/munin/plugins/tomcat_volume

Edit tomcat-users.xml :

<role rolename="manager-gui"/> <user username="munin" password="secret" roles="manager-gui"/>

Create manager.xml :

<Context privileged="true" antiResourceLocking="false"
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.0\.0\.1" />

Edit munin-node conf in plugin-conf.d :

env.ports 8080
env.user munin
env.password secret

Run plugins :

munin-run tomcat_access

Restart munin node :

sudo service munin-node restart

Did I miss something?

  • Please don't edit the answer into your question. Server Fault is a question and answer site and answers should be separate from questions. You can answer your own question instead. – DavidPostill Feb 27 '17 at 13:28
  • Alright will do that instead, sorry. Answered and edit approved. – Mustafa Yılmaz Feb 27 '17 at 13:48

Finally found myself a solution :

What I did was create a manager.xml in $CATALINA_BASE/conf/Catalina/localhost and add these inside :

<Context privileged="true" antiResourceLocking="false"
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />

Of course, you need to change the "allow" section however you want, if you need to access from a remote host you should write the ip there.

After this in $CATALINA_BASE/conf/context.xml I commented out this line :

<!-- <Valve className="org.apache.catalina.authenticator.SSLAuthenticator" securePagesWithPragma="false" />-->

I absolutely don't know what this will cause but it let me login into the manager page.

Finally added these to the munin-node configuration :

env.request /manager/status?XML=true
env.ports 8080
env.connector "http-nio-8080"

You can find the correct connector in the manager web page. Hope this helps someone else too.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.