Hello, I am new to the forum, I greet all.
I would like to know how to develop a plug-in in Java. Also useful are guidelines set up, tutorials or other material.
Thanks to all
Java plug-in
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Java plug-in
Plugins can be developed in any language including java as long as they can be run from the command line, return a proper exit code and print the output you desire.
Here is link to a plugin developers guide
http://nagiosplug.sourceforge.net/devel ... lines.html
Here is link to a plugin developers guide
http://nagiosplug.sourceforge.net/devel ... lines.html
Re: Java plug-in
Command type: java -jar MyPlugin.jar localhost serviceA serviceBscottwilkerson wrote:Plugins can be developed in any language including java as long as they can be run from the command line, return a proper exit code and print the output you desire.
Here is link to a plugin developers guide
http://nagiosplug.sourceforge.net/devel ... lines.html
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Java plug-in
I'm not sure if this is a question or an example...
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Java plug-in
Ok, got it, then that would be close, for the command definition you would likely want to include the full path to java as well as the full path to your .jar file, like:joaquin wrote:It 's an example.
Code: Select all
/usr/bin/java -jar $USER1$/MyPlugin.jar localhost serviceA serviceBFinally you need to make sure the nagios user has access to your .jar file.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Java plug-in
No problem. This all of course assumes you have the JRE or JDK installed