Page 2 of 5
Re: These definition can be placed in their own file or adde
Posted: Tue Mar 08, 2016 3:56 pm
by tmcdonald
Also, was that all you modified? There should have been some files where you had to do things like define host { and define service { to get this working. Can you post those as well?
Re: These definition can be placed in their own file or adde
Posted: Tue Mar 08, 2016 3:56 pm
by lmiltchev
Also, can you run the following command and show the output?
Re: These definition can be placed in their own file or adde
Posted: Tue Mar 08, 2016 4:19 pm
by bmurtha
Re: These definition can be placed in their own file or adde
Posted: Tue Mar 08, 2016 6:27 pm
by Box293
What is the output of:
Code: Select all
cd /usr/local/nagios/libexec/
ls -la SqlJobMon.class url.properties check_sqljob.sh sqljdbc.jar
Re: These definition can be placed in their own file or adde
Posted: Wed Mar 09, 2016 9:18 am
by bmurtha
-rwxr-xr-x 1 root nagios 1656 Mar 8 15:04 check_sqljob.sh
-rw-r--r-- 1 root nagios 583286 Feb 24 16:11 sqljdbc.jar
-rwxr-xr-x 1 root nagios 7540 Mar 2 17:01 SqlJobMon.class
-rw-r--r-- 1 root nagios 68 Mar 7 09:39 url.properties
Re: These definition can be placed in their own file or adde
Posted: Wed Mar 09, 2016 9:23 am
by bmurtha
After chaning all the files to chmod 755 I get this as the output
Code: Select all
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
./check_sqljob.sh: line 42: /usr/local/nagios/libexec/SqlJobMon.class: cannot execute binary file
UNKNOWN:
Re: These definition can be placed in their own file or adde
Posted: Wed Mar 09, 2016 11:11 am
by tmcdonald
Can you please address our questions above?
hsmith wrote:Where did you get this script from?
tmcdonald wrote:Also, was that all you modified? There should have been some files where you had to do things like define host { and define service { to get this working. Can you post those as well?
Re: These definition can be placed in their own file or adde
Posted: Wed Mar 09, 2016 11:21 am
by bmurtha
I got the script where I got the components to the plugin:
https://exchange.nagios.org/directory/P ... ng/details. I looked around but I can't remember where I put define host and define service. I thought I added them to the default ms_sql_server plugin put it wasn't there when I looked. Besides that was written in php and others were written in python. I'd image I'd have to have added it to one that was just a shell script.
Thanks again,
Bryan
Re: These definition can be placed in their own file or adde
Posted: Wed Mar 09, 2016 5:54 pm
by rkennedy
What is the output of which java on your system?
Re: These definition can be placed in their own file or adde
Posted: Thu Mar 10, 2016 9:05 am
by bmurtha
/usr/bin/java
Thank you for the help,
Bryan