Things I dont know how to do with plugins
by Bryan Kearney
Working through a plugin, there were a couple of things I did not know
how to do. Any pointers on best practices would be appreciated.
1) I would like to exposed operations based on the state (availability)
of the resource.
2) I would like to kick off discovery based on an operation being executed.
3) I would like to update availability based on an operation.
I assume some/all of this is supported.
-- bk
13 years, 10 months
About to change 17 plugins
by Lukas Krejci
Hi there,
In the next couple of days me and Filip are going to change the resource names
generated during the discovery in the following 17 plugins:
apache, grub, iis, jboss-as, jboss-as-5, jira, oracle, platforms, postfix,
postgres, rhq-agent, rhq-server, samba, script2, snmptrapd, tomcat, virt
If you feel particularly attached to one of those plugins or just are
interested in what we're going to change it to, take a look at
http://jopr.org/display/RHQ/New+Resource+Names+By+Plugin to find out.
If you think the changes don't make sense or some other approach would be more
suitable, now's the time to speak up.
Thanks,
Lukas
14 years, 3 months
RHQ 3.0.0.B03 Released
by Jason Dobies
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The latest community release has been published.
Release notes and download links can be found at:
http://rhq-project.org/display/RHQ/Download
Congrats to the team on another big sprint and, as always, thanks to
everyone in #rhq for contributions and feedback.
- --
Jason Dobies
http://rhq-project.org
RHCE# 805008743336126
Freenode: jdob @ #rhq
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLgpPZAAoJEOMmcTqOSQHCmf8H/2QB/IcYM+YezU3Cs7FYLe54
GAiPlWn7xv5s+xsTJd0wjmaw5TzhjY0qDlnmiVCzMh+r+nyUBSql8Q5piemOTCaX
sXicgVwUSU16fAhtxjkZFBjSw/ldJOZLc6LTNMwoB44Rdg36lq479LjakEFGUGWL
VAzn+CR3uoz5dL8M8ucS6nOpLQETnA3Metal8qdA3rIkt0o91auMLgUFy2Qf9utm
wKxERuVrMAHCDVFREE3lddQYpUFMiQ/BWqh7war0HWVAtL/gqWJU9wgwm5PWYoJy
7Qn9OVrIXfwvRJoGrBCgMifW5Yva6gkijZBihHpwjNgg5NUyL4y/2rUQ+xBrxxE=
=ufBA
-----END PGP SIGNATURE-----
14 years, 3 months
Plugins in the release
by Jason Dobies
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just an FYI, if you add a new plugin (agent or server) that you want as
part of the release, you'll need to add an entry for it in
enterprise/server/ear/pom.xml. You'll see in there a number of execution
entries for copying plugins, so be sure to add your new plugin to the
appropriate section.
- --
Jason Dobies
http://rhq-project.org
RHCE# 805008743336126
Freenode: jdob @ #rhq
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLfVoPAAoJEOMmcTqOSQHCSMUH/0qr2Qm6dpKP7kFUJNWICk6P
/Lpiv33bQlwCSMTu/XKkt/Rc9248w2s7f86rMA2F5XRo60I0aOWknVHGZgAyzryD
JXcvUvINm2Y1jElXZpToE5DavoN+t9xP07TkCppc+d0NvZHQoo/bog/Ep+Uy6nsO
4iBldOrcbYVSybzCaLV7UknJJoMX9vXASj1nEpcQEq5xMrh4DlYKoszf8WYKNjCt
//scUbpjdEZ4SMdT6Gj674skj2LTJ799dreq/DgFc1pkbbheelL/37lFYyjLK9ZM
F+C9KunS1B2aXsIo6DnfWDqobLWggiGGIdQ4e027KiUX6vJcqxVXz1Q+CIU/B+0=
=GmDM
-----END PGP SIGNATURE-----
14 years, 3 months
Re: Multiple Server instances
by Daniel Poggel
Thanks for help. I solved the problem with your hints (cause was the API Change ManualAddFacet ==> i didn't noticed that).
Now I have another problem with a metric. If i add a new service manual, i see no metric and no availabilty scan is executed. In the log file i noticed the following error:
2010-02-10 14:34:04,329 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.RuntimeDiscoveryExecutor)- Parent [Resource[id=10404, type=DX4DatabaseService, key=Database Monitoring BELEGE, name=Database Monitoring BELEGE, parent=Database Monitoring , version=2.3]] must be imported/commited before service scan can run.
If i make --cleanconfig with the agent the metric shows up. But that isn't a really nice solution. Can someone help?
> -----Ursprüngliche Nachricht-----
> Von: "Jay Shaughnessy" <jshaughn(a)redhat.com>
> Gesendet: 05.02.10 16:47:18
> An: rhq-devel(a)lists.fedorahosted.org
> Betreff: Re: Multiple Server instances
>
> Not sure but it sounds like the discovery code is not setting the plugin
> connection property correctly. A quick look suggests you may not be
> setting the plugin config properties. Certainly different discovered
> (server) resources should have different plugin configuration values.
> Check via the GUI to see what values are being set by discovery. If
> the values are not as you expect it is the discovery code setting values
> incorrectly.
>
> Also, for testing purposes you could edit the dx4database connection
> property (if it's not read only) and see if this gets the code working
> the way you expect.
>
> On 2/5/2010 3:58 AM, Daniel Poggel wrote:
> > Hello,
> > i developed a plugin to select some data from an oracle database. In Jopr (now RHQ) I can create multiple Server - Instances. In the rhq-plugin.xml I definied a metric, which scheduled every 35 seconds.
> >
> > In my Server Component I have some variables, which set in the start() method like:
> > dx4database = resourceContext.getPluginConfiguration().getSimple(CONFIG_DX4DB).getStringValue();
> >
> > The getValues() Method returns with a JDBC-SQL-SELECT the specific metric. In the SQL-Statement I used the variable, mentioned above.
> > Now it seems that each server in JOPR didn't use his own properties, definied under Connection. The dx4database is defined as "private String dx4database" in the ServerComponentClass.
> > Another Problem is: If i create a new Server in JOPR, the metric that I defined in the rhq-plugin.xml didn't show up under Schedules-Register.
> > Please, can anyone help? How Can I create with the two JAVA-Class (ServerComponent and ServerDiscoverComponent) more than one instance with their own properties and their own attributes?
> >
> >
> > Here are some code snippets:
> > rhqplugin.xml:
> > ......
> > <server name="Doxis4DatabaseMonitorServer"
> > class="Doxis4DatabaseMonitorComponent"
> > discovery="Doxis4DatabaseMonitorDiscoveryComponent"
> > description="Doxis 4 CSB Server"
> > supportsManualAdd="true">
> >
> > <plugin-configuration>
> > <c:simple-property name="dbname" default="nr-vm-oracle" displayName="Database Name" description="Oracle-Database name" required="true"/>
> > <c:simple-property name="SID" default="ser" displayName="Database SID" description="The Database SID" required="true"/>
> > <c:simple-property name="port" default="1521" displayName="Port" description="The Database Access-Port" required="true"/>
> > <c:simple-property name="username" default="UI_DOXIS4_UIT" displayName="Username" description="Database - Schema (User)" required="true"/>
> > <c:simple-property name="password" displayName="Password" description="Password" required="true"/>
> > <c:simple-property name="dx4database" displayName="Doxis4 Datenbank" description="Doxis4 Datenbank" required="true"/>
> > </plugin-configuration>
> >
> > <metric property="archivdocuments" displayType="summary" displayName="Anzahl archiv. Dokumente"/>
> > </server>
> > .........
> > DiscoveryComponent:
> > public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
> > Set<DiscoveredResourceDetails> result = new HashSet<DiscoveredResourceDetails>();
> > ResourceType resourceType = context.getResourceType();
> > Configuration configuration = null;
> > List<Configuration> configurations = context.getPluginConfigurations();
> > configuration=configurations.get(0);
> > String key = "Database Monitoring "+configuration.getSimpleValue("dx4database", null);
> > String name = key;
> > String version = "3.6";
> > String description = "Database Monitoring";
> > result.add(new DiscoveredResourceDetails(resourceType, key, name,
> > version, description, configuration, null));
> >
> > return result;
> > }
> >
> > ServerComponent:
> > ..............
> > public void start(ResourceContext con)
> > throws InvalidPluginConfigurationException, Exception {
> > this.resourceContext = con;
> > this.contentContext = con.getContentContext();
> > database_host = resourceContext.getPluginConfiguration().getSimple(
> > CONFIG_DATABASENAME).getStringValue();
> > database_user = resourceContext.getPluginConfiguration().getSimple(CONFIG_USER)
> > .getStringValue();
> > database_password = resourceContext.getPluginConfiguration().getSimple(
> > CONFIG_PASSWORD).getStringValue();
> > database_port = resourceContext.getPluginConfiguration().getSimple(CONFIG_PORT)
> > .getStringValue();
> > database_sid = resourceContext.getPluginConfiguration().getSimple(CONFIG_SID)
> > .getStringValue();
> > dx4database = resourceContext.getPluginConfiguration().getSimple(CONFIG_DX4DB)
> > .getStringValue();
> >
> > DataSource unpooled = DataSources.unpooledDataSource(
> > "jdbc:oracle:thin:@"
> > + database_host
> > + ":"
> > + database_port
> > + ":"
> > + database_sid, database_user,database_password);
> > pooled=DataSources.pooledDataSource(unpooled);
> > }
> >
> > public void getValues(MeasurementReport report,
> > Set<MeasurementScheduleRequest> metrics) throws Exception {
> >
> > for (MeasurementScheduleRequest request : metrics) {
> > archdocuments=getArchiveSize();
> > System.out.println("RequestName:"+request.getName());
> > if (request.getName().equals("archivdocuments"))
> > report.addData(new MeasurementDataNumeric(request, new Double(
> > archdocuments)));
> > }
> > }
> > .....................
> > ___________________________________________________________
> > NEU: Mit WEB.DE DSL über 1000,- ¿ sparen!
> > http://produkte.web.de/go/02/
> > _______________________________________________
> > rhq-devel mailing list
> > rhq-devel(a)lists.fedorahosted.org
> > https://fedorahosted.org/mailman/listinfo/rhq-devel
> >
> _______________________________________________
> rhq-devel mailing list
> rhq-devel(a)lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>
_________________________________________
NEU: Mit WEB.DE DSL über 1000,- ¿ sparen!
http://produkte.web.de/go/02/
14 years, 3 months
Master Freeze for Release 3.0.0.B03
by Jason Dobies
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just a reminder, the branch for release 3.0.0.B03 will be Thursday at
noon EST. I won't be doing a formal freeze of master, I'll just branch
at that time and work in there for the release.
I'll post a few reminders in #rhq on Thursday to make sure people aren't
shoving in any last minute fixes.
- --
Jason Dobies
http://rhq-project.org
RHCE# 805008743336126
Freenode: jdob @ #rhq
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLeqd0AAoJEOMmcTqOSQHCoEAH/1bSewSx7R8QxRoryUbfqj5f
2ElCxffwPIOIljqrbKD3/ueRvbN2qmNBnQ+Uo9ehH/wifo4jCuFbzYMqLg0SIQCm
xiJffVivs0MPG6QNCoyanJHWgR62/W6gnvPzO2qbE5ae6oGh1I2F0SlqfjJ2yQ2e
nI7yMbBKkl5jiJ2myEV81F41DLv1JWmJw6U7Oyg6ZpYnpmyuB/xvXYufEamw2iwM
zdpGdoiD3ZYLI9IYuz49NF/6LbuD1oX3mD09HL/CFM2Awm4oPbKjbR6N0K2DNnUD
NA4rkOLSIjCfFYTBA4USRzRlie4Ac3Qw/e9b5d/lZpjUt81b5B4jLD/TFEK/ra4=
=RMeD
-----END PGP SIGNATURE-----
14 years, 3 months
speed up your build by stripping unneeded plugins from the reactor
by Ian Springer
RHQ now includes 40 or so plugins, which is awesome. However, if you are
an RHQ developer, the large number of plugins can lower your
productivity for a few reasons:
1) Building 40 plugins makes a mvn install from the project root take
longer.
2) Deploying 40 plugins makes the startup of the RHQ Server take longer.
3) Some newer plugins that are not yet stable can cause issues that
affect the entire Agent JVM (heap leaks, permgen leaks, JVM crashes due
to misbehaved native code, etc.).
For 90% of my everyday development, I only need a handful of plugins, so
I wanted an easy way to only build (and dev-deploy) only those plugins
whenever I ran mvn from the project root or from modules/plugins/.
Thanks to the new profile deactivation capability added in Maven 2.0.10,
I found a way to do it:
1) In modules/plugins/pom.xml, I split out all but a few essential
plugins (platform, rhq-agent, and jmx) into profiles (jboss-plugins,
linux-plugins, etc.), grouping similar plugins. These profiles are
activated by default by activating them if the java.home sysprop is set
(which it always is). So if you just run 'mvn install', all 40 plugins
are built, as they were before. Here's what it looks like:
<modules>
<!-- core plugins -->
<module>platform</module>
<module>rhq-agent</module>
<module>jmx</module>
</modules>
<profiles>
<profile>
<id>jboss-plugins</id>
<activation>
<property>
<name>java.home</name>
</property>
</activation>
<modules>
<!-- NOTE: Order is important. -->
<module>augeas</module>
<module>apache</module>
<module>tomcat</module>
<module>jboss-as</module>
<module>hibernate</module>
<module>rhq-server</module>
<module>jboss-cache</module>
<module>jboss-as-5</module>
<module>jboss-cache-v3</module>
<!-- was not in Jopr build at merge time <module>jbossOSGi</module> -->
</modules>
</profile>
<profile>
<id>linux-plugins</id>
<activation>
<property>
<name>java.home</name>
</property>
</activation>
<modules>
<module>augeas</module>
<module>cron</module>
<module>script</module>
<module>script2</module>
<module>grub</module>
<!-- not behaving <module>hardware</module> -->
<module>hosts</module>
<module>cobbler</module>
<module>sudoers</module>
<module>hudson</module>
<module>netservices</module>
<module>perftest</module>
<module>samba</module>
<module>postfix</module>
<module>aliases</module>
<module>sshd</module>
<module>virt</module>
<module>kickstart</module>
</modules>
</profile>
<profile>
<id>misc-plugins</id>
<activation>
<property>
<name>java.home</name>
</property>
</activation>
<modules>
<module>iis</module>
<module>database</module>
<module>postgres</module>
<module>hudson</module>
<!-- error in code generation (see RHQ-1225) <module>jira</module> -->
<module>mysql</module>
<!-- non-public dependency <module>onewire</module> -->
<module>oracle</module>
<module>perftest</module>
<module>snmptrapd</module>
<module>twitter</module>
<!-- bundle plugins -->
<module>filetemplate-bundle</module>
</modules>
</profile>
<profile>
<id>validate-plugins</id>
<activation>
<property>
<name>java.home</name>
</property>
</activation>
<modules>
<!-- make this the last - it will validate all the plugins -->
<module>validate-all-plugins</module>
</modules>
</profile>
</profiles>
2) When running mvn, deactivate the plugin profiles that I don't want
using the Maven 2.0.10+ syntax, e.g.:
mvn -P'!linux-plugins' -P'!misc-plugins' -P'!validate-plugins'
This will build only the core plugins (platform, rhq-agent, and jmx) and
the jboss plugins (12 plugins instead of 40!). To pass these options by
default whenever mvn is run, I can define a shell alias in my .profile
as follows:
alias mvn="mvn -P'!linux-plugins' -P'!misc-plugins' -P'!validate-plugins'"
That's it. No more plugin overload!
The great part about this solution is that things still work as they did
before if you just run 'mvn install' and don't know about this trick.
I hope this will save others as much time as I know it will save me.
--Ian
P.S. I'd like to use the same trick to change the build so 'mvn install'
will build the container by default (i.e. so newbies won't need to know
to run 'mvn install -Penterprise' in order to build the full
distribution). Then everyday developers who want to run mvn from the
project root and skip building the container can do:
mvn -P'!container'
or add that option to their mvn alias.
14 years, 3 months
Debuggign <onc:config>
by Heiko W.Rupp
Hi,
I am currently working on gui snippet that has a <onc:config>
It displays nicely, but I don't get the results back into my managed bean.
What is the best way of debugging this?
Thanks
Heiko
--
Reg. Adresse: Red Hat GmbH, Otto-Hahn-Strasse 20, 85609 Dornach bei München
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera
14 years, 3 months
Splitting release bits
by Heiko W.Rupp
Hi,
currently our release is >> 100 MB with a big part of it being the underlying JBossAS server.
On one side, the fully contained archive is a great thing, as a user only needs to download and
unzip it and then is able to start via start script (modulo db install).
But for users that want to follow the community releases, this is less than optimal, as they
have to download the whole bits (including AS) again.
Could we for the future (in addition to the full release) also release a "patch" that users
can just apply on top of an existing install?
A way to create such a "patch" could be:
- install release n-1
- touch /tmp/now
- install release n over release n-1 (in place)
- do a find $release_root -newer /tmp/now and use this file list for files to go into
the patch (there may be even be an appropriate option to the zip command).
Heiko
--
Reg. Adresse: Red Hat GmbH, Otto-Hahn-Strasse 20, 85609 Dornach bei München
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera
14 years, 3 months