check_tomcat.pl doesn't work

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

check_tomcat.pl doesn't work

Post by Frédéric GRANAT »

Hi,

/usr/local/nagios/libexec/check_tomcat.pl -H xxxxx -p xxxx -l xxxxxx -a xxxxxxx -w 25%,5% -c 10%,2%
CRITICAL: http://xxxxxxxxx:xxxx/manager/status?XML=true HTTP/1.1 403 Forbidden

Please read the post I opened in 2018.
I always have that problem on a particular server.
Ports are opened ont the server firewall.

Do you have any idea to diagnose that problem ?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: check_tomcat.pl doesn't work

Post by vtrac »

Hi Frédéric GRANAT,
The 403 Forbidden error telling you that Tomcat is blocking the connection and not allowing the Nagios server to connect.

Please check your logs for more details as that will give you more details info.

Also, please check with your network team and see if it is allow outside connection to your tomcat.

There are three common causes for this error. Here they are listed from most likely to least likely:
-An empty website directory
-No index page
-Permission / Ownership error

Regards,
Vinh
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: check_tomcat.pl doesn't work

Post by Frédéric GRANAT »

Hi,
Thanks,
Please check your logs for more details as that will give you more details info.
Could you please tell me where these logs are ?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_tomcat.pl doesn't work

Post by ssax »

You would need to reach out to your Tomcat admins in order to find out where the tomcat logs are stored on that system, we have limited Tomcat experience.

You can try this:

https://community.wegalvanize.com/s/art ... uage=en_US

You may need to reach out to Tomcat support on this.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: check_tomcat.pl doesn't work

Post by Frédéric GRANAT »

Hi,

I'm going to check the logs
Could you please tell me which tomcat role is required in order a tomcat user can run check_tomcat.pl ?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: check_tomcat.pl doesn't work

Post by vtrac »

Hi Frédéric GRANAT,
I believe your Tomcat's user must belong to the "nagios" group.

Here's an example of user "apache" running http on our XI machine:

Code: Select all

grep apache /etc/group

apache:x:48:
nagios:x:1001:nagios,apache,snmptt
nagcmd:x:1002:nagios,apache,snmptt
Regards,
Vinh
Locked