Need advice about agent plugin design
by Steven North
I am trying to design an RHQ/JON agent plugin to manage a software
resource with the following characteristics:
- there is the software itself (the installation);
- there are a variable number of "bundles" of configuration information
about 250KB in size each which need to be read from and written to the
agent; and
- there are "log" files which can 10-50MB in size each which need to be
read from the agent.
I think I am pretty clear on how to handle the software itself--just
like any number of other agents.
I am not sure how to handle the configuration bundles and the large log
files.
We might want to have the RHQ/JON server manage different versions of
these configuration files and distribute them to multiple remote agents.
Is there some existing domain object that would handle the read/write
aspect of the configuration bundles (zip files)? Could the "package"
concept be used for these? Would we need to create a new domain object
on the server side for these bundles? If so, is there an example of
this kind of thing?
For the log files, I see some mention of the SupportFacet. Would this
be appropriate for retrieving large log files? Is there an example of this?
We expect to access the configuration bundles and the log files using
remote client operations because we have a separate GUI tool to
build/edit the configuration bundles and to correlate and analyze the
log files. Is there an example of using a remote client to pull files
from and push files to remote agents?
Thanks in advance for any advice you can give or examples you can point to.
Steve
10 years, 1 month
MeasurementUnits (EPOCH_MILLISECONDS, EPOCH_SECONDS)
by Jiri Kremser
Hi,
in plugin descriptor, there can be a metric definition with unit type "epoch_milliseconds" or "epoch_seconds" (rhq-configuration.xsd allows it). What kind of metric should could be represented by epoch_milliseconds? Shouldn't the exact time moments (what values epoch_milliseconds represent) be addressed rather by traits?
I am asking because the values of this type are not formatted (https://bugzilla.redhat.com/show_bug.cgi?id=857144).
I think these two unit types should be removed from MeasurementUnits and xml schema, however there might be some plugins out there using it, so what about deprecation? Are there any edge cases, when these unit types do make sense?
JK
10 years, 2 months
RHQ CLI alert scripts
by Ken Rumer
I'm seeing different results in CLI scripts depending on if I run them from
the CLI or the alert kicks them off. A simple example is here:
---CLI---------------------
var tomcatServer = ProxyFactory.getResource(14008);
tomcatServer;
#ResourceClientProxy_$$_javassist_0:
# availability: ?
# children:
# contentTypes: {}
# createdDate: Mon Mar 18 13:42:11 PDT 2013
# description: Tomcat Web Application Server
(tstcdemo3)
# handler:
org.rhq.bindings.client.ResourceClientProxy$ClientProxyMethodHandler@d751189
# id: 14008
# measurements: [Server Identifier, Availability]
# modifiedDate: Mon Mar 18 13:42:11 PDT 2013
# name: Tomcat (8080)
# operations: [restart, start,
storeConfiguration, shutdown]
# pluginConfiguration:
# pluginConfigurationDefinition: ConfigurationDefinition[id=10314,
name=Tomcat Server]
# resourceType: Tomcat Server
# serverIdentifier: ?
# version: 7.0.37.0
tomcatServer.restart(); // This works like a charm
---CLI Alert--(tomcat.restart.js)---
var myResource = ProxyFactory.getResource(
alert.alertDefinition.resource.id);
var e = exporter;
e.setTarget('raw', '/local/mnt/workspace/tomcat.restart.out');
e.write(myResource);
myResource.restart();
---CLI Alert output----------
Ran script tomcat.restart.js in version rhqadmin: 1.0 from repo
cli.remediation as user rhqadmin.
javax.script.ScriptException:org.mozilla.javascript.EcmaError: TypeError:
Cannot find function restart in object [14008] Tomcat (8080) (Tomcat
Server::Tomcat). (#9) in at line number 9 in script tomcat.restart.js
(rhqadmin: 1.0) in repo cli.remediation at line number 9
---exporter output-----------
cat tomcat.restart.out
#ResourceClientProxy:
# id: 14008
# name: Tomcat (8080)
# version: 7.0.37.0
# resourceType: Tomcat Server
# children:
# contentTypes: {}
# createdDate: Mon Mar 18 13:42:11 PDT 2013
# description: Tomcat Web Application Server (tstcdemo3)
# measurements: [Server Identifier, Availability]
# modifiedDate: Mon Mar 18 13:42:11 PDT 2013
# operations: [restart, start, storeConfiguration, shutdown]
Why is the object different in CLI vs export output?
"ResourceClientProxy_$$_javassist_0" vs "ResourceClientProxy"
If there's a better way to do this, let me know!
11 years, 1 month
AUTO: David A. Webster is on vacation (returning 04/02/2013)
by David A. Webster
I am out of the office until 04/02/2013.
In Houston, TX for the weekend
Note: This is an automated response to your message "RHQ CLI alert
scripts" sent on 3/28/2013 1:17:31 PM.
This is the only notification you will receive while this person is away.
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
11 years, 1 month
Re: rhq-devel Digest, Vol 41, Issue 37
by Mark Addy
Hi,
I have added the patch to BZ. My fedora account is "markaddy"
Cheers
On 27/03/13 12:00, rhq-devel-request(a)lists.fedorahosted.org wrote:
> Send rhq-devel mailing list submissions to
> rhq-devel(a)lists.fedorahosted.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> or, via email, send a message with subject or body 'help' to
> rhq-devel-request(a)lists.fedorahosted.org
>
> You can reach the person managing the list at
> rhq-devel-owner(a)lists.fedorahosted.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rhq-devel digest..."
>
>
> Today's Topics:
>
> 1. Re: Alert Maintenance & Permissions (Heiko W.Rupp)
> 2. About agent preferences handling (was Re: reverting commit)
> (Thomas Segismont)
> 3. Re: About agent preferences handling (was Re: reverting
> commit) (Elias Ross)
> 4. Re: About agent preferences handling (was Re: reverting
> commit) (Thomas Segismont)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 26 Mar 2013 22:37:56 +0100
> From: "Heiko W.Rupp" <hrupp(a)redhat.com>
> To: rhq-devel(a)lists.fedorahosted.org
> Subject: Re: Alert Maintenance & Permissions
> Message-ID: <050DDE0D-F6D8-458E-9933-4B8902A930B5(a)redhat.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Mark,
>
> please add it as patch to the BZ
>
> do you have a fedora account system user id?
>
> Heiko
>
> Am 26.03.2013 um 22:34 schrieb Mark Addy:
>
>> Hello again,
>> I have a patch for the current master branch that resolves the Alert Maintenance issue I raised before.
>> It also includes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=846451.
>> Please let me know where I should submit it!
>> Thanks
>> Mark
>>
>> _______________________________________________
>> rhq-devel mailing list
>> rhq-devel(a)lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
--
Mark Addy
Senior Consultant
C2B2
The Leading Independent Middleware Experts.
T: 08450 539457
M: 07920 100627
E: maddy(a)c2b2.co.uk
W: www.c2b2.co.uk
C2B2 Consulting Limited
Unit 33, Malvern Hills Science Park
Geraldine Road
Malvern
Worcestershire
WR14 3SZ
Registered in England and Wales: 4563419
Registered Office: Ardendale, Old Hollow, Malvern, Worcestershire
11 years, 1 month
master broken
by John Mazzitelli
Once I merged master into a local branch I have, the server started getting errors. I think its due to the dependency changes in the poms:
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/collections/SetUtils
at org.quartz.JobDetail.<init>(JobDetail.java:85) [quartz-1.6.5.jar:1.6.5]
at org.rhq.enterprise.server.scheduler.EnhancedSchedulerImpl.createJobDetail(EnhancedSchedulerImpl.java:476) [rhq-enterprise-server-ejb3.jar:4.7.0-SNAPSHOT]
Anything that needs to run a quartz job will fail.
I'll see if I can fix this - but wanted to bring this up if you pull master and try to run a build from it.
If anyone has any ideas how this broke and how to fix let me know - otherwise, I'm goin' in and if I'm not back in an hour, call for help :}
11 years, 1 month
Re: reverting commit
by Ian
Mazz, sorry about that. I thought a constructor of a history class would be
safe to change API-wise. In any case, after pulling the latest from master
(including your revert), I'm not seeing the GWT compile error anymore, even
after cleaning org/rhq/** from my local repo then doing a mvn clean
install. Very strange. If I do see it again, I'll create a BZ.
---------
[Ian - feel free to commit this back in a branch (not master) and create a
BZ for this. We'll cherry pick in master at the appropriate time.]
Its been requested that we revert commit df18b71df2d5114d9edc8a26ad42e0
d7a9036eb2:
"do not pass not-yet-fully-initialized "this" reference to
GroupOperationHistory.addResourceOperationHistory() in
ResourceOperationHistory's constructor, as the GWT compiler fails when it
sees this (at least in my OS X 10.7.5, Oracle JDK 1.7.0_17 environment)"
We are reverting for a couple reasons:
* This broke a jenkins build - an API change has been introduced and it
therefore fails the API check job. (I think its due to a change in a public
domain object's constructor). Keep in mind that for awhile now we have a
jenkins job that runs to make sure there are no backward compatible changes
to public APIs - if it detects one, the build will fail. In this case, it
appears a public domain object's constructor was changed thus breaking that
API check.
* Also, There is no BZ for this - we don't know what this addressed.
Please make sure BZs are written before committing bug fixes so they can be
tracked appropriately.
11 years, 1 month
RHQ & Powershell
by Stefan Negrea
Hello Everybody,
The current RHQ Windows scripts use Batch. While this works out of box on all Windows versions, the scripts are quite complicated and very brittle. For the past few years Microsoft built Powershell to replace Batch. With Windows 7 PowerShell got integrated in Windows; and for older versions (eg. XP, Vista, Server 2003) Powershell can be easily installed. As far as I know, it's just a program that runs on .Net framework.
Here is the official Microsoft tutorial for Powershell:
http://technet.microsoft.com/en-us/library/cc196356.aspx
Should we consider migrating current Windows Batch scripts to PowerShell?
Thank you,
Stefan Negrea
Software Engineer
11 years, 1 month
Ant Versions - Revert? Update?
by Stefan Negrea
Hello Everybody,
I reverted the ant version changes from yesterday since this is one the few user facing dependencies (being used in bundles).
Here is the revert:
http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=d15e5ceedb318119b...
Based on the pom information, version 1.8.0 is used for the ant-bundle related modules. Does anybody see a problem upgrading the rest of the project to use 1.8.0? I think it's a safe change since the only other module that would be truly affected is the db-utils and it's easy to catch to regression with the db-upgrade Jenkins jobs that we have.
I am working on a report to show the list of dependencies before and after this I started working on BZ 923458 to give a better picture on how the dependency list changed.
Thank you,
Stefan Negrea
Software Engineer
11 years, 1 month
reverting commit
by John Mazzitelli
[Ian - feel free to commit this back in a branch (not master) and create a BZ for this. We'll cherry pick in master at the appropriate time.]
Its been requested that we revert commit df18b71df2d5114d9edc8a26ad42e0d7a9036eb2:
"do not pass not-yet-fully-initialized "this" reference to GroupOperationHistory.addResourceOperationHistory() in ResourceOperationHistory's constructor, as the GWT compiler fails when it sees this (at least in my OS X 10.7.5, Oracle JDK 1.7.0_17 environment)"
We are reverting for a couple reasons:
* This broke a jenkins build - an API change has been introduced and it therefore fails the API check job. (I think its due to a change in a public domain object's constructor). Keep in mind that for awhile now we have a jenkins job that runs to make sure there are no backward compatible changes to public APIs - if it detects one, the build will fail. In this case, it appears a public domain object's constructor was changed thus breaking that API check.
* Also, There is no BZ for this - we don't know what this addressed. Please make sure BZs are written before committing bug fixes so they can be tracked appropriately.
11 years, 1 month