Page 1 of 2

check_tomcatSessions

Posted: Wed Jul 23, 2014 3:00 pm
by Tzogii13
I am currently trying to install this plugin to monitor tomcat, however I am getting and error reading

http://exchange.nagios.org/directory/Pl ... ns/details

Error : The permissions on one or more configuration files or scripts appear to be incorrect. This will prevent your configuration from being applied properly.

When I go to the command line portion though I do not know how many parameters to give and even when I follow the doc I still get errors.

Thanks in advance

Re: check_tomcatSessions

Posted: Wed Jul 23, 2014 8:17 pm
by Box293
Can you explain what actions you performed to get the error?

You should be able to upload this plugin vi Admin > Manage Plugins

The details for the plugin on code.google.com are as follows:

Code: Select all

Usage: check_tomcatSessions [ -H hostname or IP address ] [ -P port ] [ -u username ] [ -p password ] [ -s session_name ] [ -w warning ] [ -c critical ] [ -V tomcat_version (6 for tomcat pre-7 or 7) ]

If session_name is omitted (default) then the total number of sessions is calculated

DEFAULTS

hostname=localhost
port=8080
username=Administrator
password=password
session_name=
warning=100
critical=400
tomcat_version=6

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 9:08 am
by Tzogii13
I have tried that exactly but when I go to add it in Nagios I keep getting this error
Error : The permissions on one or more configuration files or scripts appear to be incorrect. This will prevent your configuration from being applied properly.

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 1:00 pm
by sreinhardt
Are you getting the error upon trying to execute the check, or when attempting to apply configuration?

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 1:04 pm
by Tzogii13
For both

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 1:30 pm
by sreinhardt
These would be completely separate cases. Getting a permissions error when attempting to write config files, indicates an issue with the permissions in /usr/local/nagios/etc/ getting them when attempting to execute the plugin, means that the plugin is missing a config file that you need to provide or correct permissions on. Could you show us a screenshot or text output from when you are seeing this error in both cases?

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 1:45 pm
by Tzogii13
Here are the errors I get

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 1:56 pm
by sreinhardt
OK so the first image, is an unknown likely due to the plugin not being able to communicate with your tomcat server, not due to permissions issues on nagios configs. The second message is due to XI scripts or the nagios configs having bad permissions. Let's check those out first. Please run the following and send back the results.

Code: Select all

ls -lart /usr/local/nagios/etc/services
ls -lart /usr/local/nagios/etc/services -d
ls -lart /usr/local/nagios/etc/hosts
ls -lart /usr/local/nagios/etc/hosts -d
ls -lart /usr/local/nagios/etc/
ls -lart /usr/local/nagios/etc/ -d
ls -lart /usr/local/nagios/ -d

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 2:02 pm
by Tzogii13
Ok here is what I get

Re: check_tomcatSessions

Posted: Mon Jul 28, 2014 3:00 pm
by sreinhardt
Those permissions look correct, but it seems to indicate that you currently have no hosts and services, is this correct? If so, there are (or at least were) known issues with having no configs in hosts and services folders, and this may be related.