-
2. Re: cli plugin - possible nagios plugin
shashin.shinde May 4, 2009 12:35 PM (in response to mazz)I am interested in a general purpose process monitoring functionality.
Admin should be able to provide information about the process to monitor on the system. This can be done via a free text box or by providing some script to use to monitor the process.
When process availability goes down fire an alert and then provide facility to execute an operation ( e.g. restart ).
I have a feeling that it is possible to do it using this CLI plugin and the parent for this type of resource should be the platform.
My 2 cents and need help on this one. -
3. Re: cli plugin - possible nagios plugin
mazz May 4, 2009 12:47 PM (in response to mazz)"sshinde@redhat.com" wrote:
This can be done via a free text box or by providing some script to use to monitor the process.
How the CLI plugin works is you give this kind of information in the plugin configuration properties. For example, to check availability, you tell the CLI plugin what arguments to pass to the CLI and you can tell it a regex to use to compare either the CLI's output or the CLI's exit code (or both). For example, "pass in the arguments "--test" and if the CLI exits with an exit code of "0" and outputs "OK", the resource is UP and should show green in the UI - otherwise, consider it DOWN and red"."sshinde@redhat.com" wrote:
When process availability goes down fire an alert and then provide facility to execute an operation ( e.g. restart ).
Yes, this can be done today using the new CLI plugin and our alert subsystem."sshinde@redhat.com" wrote:
the parent for this type of resource should be the platform.
Yes, that is how the CLI plugin is working. The parent is the platform.
Now all of this should/could be used for monitoring Nagios scripts. I don't know much about Nagios, but AFAIK, Nagios probes are just scripts that return statistics information. This CLI plugin can be used to execute the Nagios scripts and it would examine the Nagios script output for things like availability and measurement data. But we would need to add some type of discovery code that parses the Nagios configuration files so we can auto-discovery the Nagios probes that are on the system. This is the part I'm unclear about and would need help with. Once we auto-discovered Nagios, I think the CLI plugin can take it from there. -
4. Re: cli plugin - possible nagios plugin
shashin.shinde May 6, 2009 7:07 AM (in response to mazz)I think auto discovery of the installed nagios plugins will be a little complicated just because of the location of the plugins and the mechanism by which they are executed.
It could be that user is using NRPE, check_by_ssh or NSCA etc. and to discover this kind of stuff will not be trivial.
In the mean time I would like to use the CLI plugin to monitor a few pre-defined processes.
I have to integrate this in JON 2. Will there be a problem in using CLI with JON 2.1 ? If yes, will it work out of the box with JON 2.2 ? -
5. Re: cli plugin - possible nagios plugin
mazz May 6, 2009 9:29 AM (in response to mazz)CLI plugin should deploy fine in both 2.1 and 2.2.
-
6. Re: cli plugin - possible nagios plugin
shashin.shinde May 6, 2009 10:53 AM (in response to mazz)Right now I am having problems with setting up the build environment for jopr 2.2 GA svn checkout.
URL: http://anonsvn.jboss.org/repos/jopr/tags/Jopr_2_2_0_GA
Repository Root: http://anonsvn.jboss.org/repos/jopr
I am using the steps outlined here http://www.jboss.org/community/docs/DOC-13391
Do you have any working set of instructions that I can use ? -
7. Re: cli plugin - possible nagios plugin
ips May 6, 2009 11:20 AM (in response to mazz)What error(s) are you getting?
If you notice any specific information in http://www.jboss.org/community/wiki/Jopr-Building that is wrong or missing, please let us know, and we'll update the page.
I'm curious - why are you building the 2.2 tag, rather than building trunk?
Fyi, RHQ 1.2/Jopr 2.2 release artifacts are in the JBoss Maven repo, in case you were just trying to build in order to produce the artifacts for building a custom plugin via Maven:
http://repository.jboss.com/maven2/org/rhq/
http://repository.jboss.com/maven2/org/jboss/on/ -
8. Re: cli plugin - possible nagios plugin
shashin.shinde May 6, 2009 11:55 AM (in response to mazz)Do I need some specific configuration in settings.xml file in order to use the instructions on the Jopr-Building page ? I do not have anything apart from http proxy definition at the moment.
I have a feeling that my maven setup is wrong some how. If I just follow the steps on the above page then it is using the default maven repo i.e. repo1.maven.org. Please provide one working settings.xml file.
The reason I am building 2.2 is that eventually I need to deploy the plugin into JON 2.x -
9. Re: cli plugin - possible nagios plugin
mazz May 6, 2009 12:22 PM (in response to mazz)Because of the recent Jopr 2.2 release, I have a feeling some of the maven repos aren't fully updated
But I think it was recently fixed. So your problem might be fixed (??).
Here's a good set of docs that get you to build the full RHQ core (which is essentially the main Jopr piece, and it will include the CLI plugin). The Jopr SVN contains just a few plugins - you really need to build RHQ.
See:
http://support.rhq-project.org/display/RHQ/Building+RHQ
and
http://support.rhq-project.org/display/RHQ/Advanced+Build+Notes
If you need more help and you want to discuss in realtime, hop on freenode IRC, chat room #jopr - and you can discuss with some of us. -
10. Re: cli plugin - possible nagios plugin
mazz May 6, 2009 12:23 PM (in response to mazz)Oh, as for settings.xml - those URLs I gave talk about that. The "Advanced Build" page talks about settings.xml and it points to our example here:
http://svn.rhq-project.org/repos/rhq/trunk/etc/m2/settings.xml -
11. Re: cli plugin - possible nagios plugin
shashin.shinde May 6, 2009 1:02 PM (in response to mazz)Using the settings.xml template from the RHQ svn repo 1.2 GA branch now the compilation proceeds further until I get this failure:
Downloading: http://repository.jboss.org/maven2/org/rhq/rhq-enterprise-comm/1.2.0.GA/rhq-enterprise-comm-1.2.0.GA.pom
Downloading: http://snapshots.jboss.org/maven2/org/rhq/rhq-enterprise-comm/1.2.0.GA/rhq-enterprise-comm-1.2.0.GA.pom
Downloading: http://repo1.maven.org/maven2/org/rhq/rhq-enterprise-comm/1.2.0.GA/rhq-enterprise-comm-1.2.0.GA.pom
Downloading: http://repository.jboss.org/maven2/org/rhq/rhq-enterprise-comm/1.2.0.GA/rhq-enterprise-comm-1.2.0.GA.jar
Downloading: http://snapshots.jboss.org/maven2/org/rhq/rhq-enterprise-comm/1.2.0.GA/rhq-enterprise-comm-1.2.0.GA.jar
Downloading: http://repo1.maven.org/maven2/org/rhq/rhq-enterprise-comm/1.2.0.GA/rhq-enterprise-comm-1.2.0.GA.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.rhq:rhq-enterprise-comm:jar:1.2.0.GA
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.rhq -DartifactId=rhq-enterprise-comm -Dversion=1.2.0.GA -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.rhq -DartifactId=rhq-enterprise-comm -Dversion=1.2.0.GA -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.jboss.on:jopr-rhq-server-plugin:jar:2.2.0.GA
2) org.rhq:rhq-enterprise-comm:jar:1.2.0.GA
----------
1 required artifact is missing.
for artifact:
org.jboss.on:jopr-rhq-server-plugin:jar:2.2.0.GA
from the specified remote repositories:
jboss-snapshots (http://snapshots.jboss.org/maven2),
jboss (http://repository.jboss.org/maven2),
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] Trace -
12. Re: cli plugin - possible nagios plugin
ips May 6, 2009 1:31 PM (in response to mazz)Unfortunately, there are a couple plugins (namely rhq-server and rhq-agent) that depend on enterprise modules, which makes it tricky to build these plugins the very first time through.
You should be able to get past the issue as follows:cd <rhq-trunk>/modules/enterprise/comm mvn install -Dmaven.test.skip=true cd <rhq-trunk>/modules/enterprise/agent mvn install -Dmaven.test.skip=true
Then resume trying to run mvn from <rhq-trunk>. -
13. Re: cli plugin - possible nagios plugin
shashin.shinde May 6, 2009 2:21 PM (in response to mazz)Ok, Finally I have got the RHQ build to complete without problems and the plugins and the container are built correctly.
I would like to build the plugin with jopr 2.2 though. -
14. Re: cli plugin - possible nagios plugin
mazz May 6, 2009 2:37 PM (in response to mazz)You did already build it :)
Remember, "Jopr 2.2" is really the RHQ 1.2 build, plus a couple plugins.
So if you have RHQ built from trunk, you essentially have Jopr 2.2. Since you are using the CLI plugin, and its part of RHQ too, you really don't have to mess with the Jopr SVN or build it or anything.
Again, Jopr just adds some additional plugins (plus some branding in the UI).
Take your RHQ build and run with it :)