You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(927) |
Apr
(419) |
May
(352) |
Jun
(431) |
Jul
(463) |
Aug
(345) |
Sep
(304) |
Oct
(596) |
Nov
(466) |
Dec
(414) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(348) |
Feb
(313) |
Mar
(665) |
Apr
(688) |
May
(434) |
Jun
(311) |
Jul
(540) |
Aug
(554) |
Sep
(467) |
Oct
(341) |
Nov
(365) |
Dec
(272) |
2009 |
Jan
(386) |
Feb
(293) |
Mar
(279) |
Apr
(239) |
May
(229) |
Jun
(199) |
Jul
(186) |
Aug
(111) |
Sep
(196) |
Oct
(146) |
Nov
(116) |
Dec
(140) |
2010 |
Jan
(170) |
Feb
(159) |
Mar
(151) |
Apr
(161) |
May
(90) |
Jun
(56) |
Jul
(28) |
Aug
(22) |
Sep
(5) |
Oct
|
Nov
(23) |
Dec
(12) |
2011 |
Jan
(8) |
Feb
(8) |
Mar
(22) |
Apr
(24) |
May
(4) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pn...@hy...> - 2010-03-31 23:34:45
|
Author: pnguyen Date: 2010-03-31 16:34:31 -0700 (Wed, 31 Mar 2010) New Revision: 14457 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14457 Modified: trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java Log: [HHQ-3772] Log the exception as a warning and continue with the delete process. Modified: trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java 2010-03-31 21:20:27 UTC (rev 14456) +++ trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java 2010-03-31 23:34:31 UTC (rev 14457) @@ -1329,8 +1329,11 @@ throw new VetoException("Could not remove resource " + aeid + " because a downtime schedule exists."); } - } catch (SchedulerException se) { - throw new ApplicationException(se); + } catch (Throwable t) { + // HHQ-3772: This should not happen. However, if it does, + // log the exception as a warning and continue with the delete. + log.warn("Failure getting the downtime schedule for group[" + aeid + "]. " + + "Ignoring and continuing with the delete process.", t); } } if (res == null) { |
From: <tr...@hy...> - 2010-03-31 21:20:37
|
Author: trader Date: 2010-03-31 14:20:27 -0700 (Wed, 31 Mar 2010) New Revision: 14456 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14456 Modified: trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java Log: Add test case specific to HHQ-3852 Modified: trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java =================================================================== --- trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java 2010-03-31 21:15:12 UTC (rev 14455) +++ trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java 2010-03-31 21:20:27 UTC (rev 14456) @@ -164,6 +164,22 @@ assertTrue(tsd.isInstallTypeVersion(installPath)); } + public void testNullVersionFile() throws Exception { + assertNotNull(tmpDir); + assertNotNull(simpleFile); + + // substring match + Properties props = new Properties(); + String installPath = simpleFile.getParent(); + TestServerDetector tsd; + + props.setProperty(TestServerDetector.getInstallPathNoMatch(), installPath); + tsd = new TestServerDetector(props); + + // Should fail, no version file + assertFalse(tsd.isInstallTypeVersion(installPath)); + } + private static class TestServerDetector extends ServerDetector { private Properties props; |
From: <tr...@hy...> - 2010-03-31 21:15:22
|
Author: trader Date: 2010-03-31 14:15:12 -0700 (Wed, 31 Mar 2010) New Revision: 14455 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14455 Added: trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java Modified: trunk/src/org/hyperic/hq/product/ServerDetector.java Log: HHQ-3852: Sendmail not discovered, NPE during auto-discovery Modified: trunk/src/org/hyperic/hq/product/ServerDetector.java =================================================================== --- trunk/src/org/hyperic/hq/product/ServerDetector.java 2010-03-31 20:53:17 UTC (rev 14454) +++ trunk/src/org/hyperic/hq/product/ServerDetector.java 2010-03-31 21:15:12 UTC (rev 14455) @@ -84,9 +84,9 @@ private static final String SERVER_SIGS = "etc/hq-server-sigs.properties"; - private static final String VERSION_FILE = "VERSION_FILE"; - private static final String INSTALLPATH_MATCH = "INSTALLPATH_MATCH"; - private static final String INSTALLPATH_NOMATCH = "INSTALLPATH_NOMATCH"; + protected static final String VERSION_FILE = "VERSION_FILE"; + protected static final String INSTALLPATH_MATCH = "INSTALLPATH_MATCH"; + protected static final String INSTALLPATH_NOMATCH = "INSTALLPATH_NOMATCH"; protected static final String INSTALLPATH = "INSTALLPATH"; protected static final String INVENTORY_ID = "INVENTORY_ID"; protected static final String AUTOINVENTORY_NAME = "AUTOINVENTORY_NAME"; @@ -479,28 +479,31 @@ String installPathMatch = getTypeProperty(INSTALLPATH_MATCH); String installPathNoMatch = getTypeProperty(INSTALLPATH_NOMATCH); - if(versionFile.startsWith("**/")){ // recursive & regexpr - versionFile=versionFile.substring(3); - File f=findVersionFile(new File(installpath),versionFile); - if(f==null) - return false; - getLog().debug(VERSION_FILE + "=" + versionFile + " matches -> " + f); - Matcher m = Pattern.compile(versionFile).matcher(f.getAbsolutePath()); - m.find(); - if(m.groupCount()!=0){ // have version group - if(!getTypeInfo().getVersion().equals(m.group(1))){ - getLog().debug(installpath + " not a match for version " + getTypeInfo().getVersion() + ", skipping"); + if (versionFile != null) { + if (versionFile.startsWith("**/")) { // recursive & regexpr + versionFile=versionFile.substring(3); + File f=findVersionFile(new File(installpath),versionFile); + if (f==null) { return false; } - } - }else{ - if (versionFile != null) { + + getLog().debug(VERSION_FILE + "=" + versionFile + " matches -> " + f); + Matcher m = Pattern.compile(versionFile).matcher(f.getAbsolutePath()); + m.find(); + if(m.groupCount()!=0){ // have version group + if(!getTypeInfo().getVersion().equals(m.group(1))){ + getLog().debug(installpath + " not a match for version " + getTypeInfo().getVersion() + ", skipping"); + return false; + } + } + } else { File instPath = new File(installpath); if (instPath.isFile() && !instPath.isDirectory()) { instPath = instPath.getParentFile(); } - File file = (instPath != null) ? new File(instPath, versionFile) : - new File(installpath, versionFile); + File file = (instPath != null) ? + new File(instPath, versionFile) : + new File(versionFile); if (!file.exists()) { String[] expanded = PluginLoader.expand(file); if ((expanded == null) || (expanded.length == 0)) { Added: trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java =================================================================== --- trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java (rev 0) +++ trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java 2010-03-31 21:15:12 UTC (rev 14455) @@ -0,0 +1,192 @@ +package org.hyperic.hq.product; + +import java.io.File; +import java.util.Properties; + +import junit.framework.TestCase; + +public class ServerDetector_test + extends TestCase +{ + private File tmpDir; + private File simpleFile; + private File deepFile; + + protected void setUp() throws Exception { + String tmpDirStr = System.getProperty("java.io.tmpdir"); + if (tmpDirStr != null) { + try { + tmpDir = new File(tmpDirStr); + simpleFile = new File(tmpDir, "installFile"); + simpleFile.createNewFile(); + File d = new File(tmpDir, "deep/dir/structure"); + d.mkdirs(); + deepFile = new File(d, "otherInstallFile"); + deepFile.createNewFile(); + } catch (Exception e) { + tmpDir = null; + simpleFile = null; + deepFile = null; + } + } else { + tmpDir = null; + simpleFile = null; + deepFile = null; + } + } + + public void testDefault() throws Exception { + assertNotNull(tmpDir); + assertNotNull(simpleFile); + + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), simpleFile.getName()); + TestServerDetector tsd = new TestServerDetector(props); + + assertTrue(tsd.isInstallTypeVersion(simpleFile.getParent())); + } + + public void testMatch() throws Exception { + assertNotNull(tmpDir); + assertNotNull(simpleFile); + + // substring match + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), simpleFile.getName()); + String installPath = simpleFile.getParent(); + TestServerDetector tsd; + if (installPath != null && installPath.length() > 2) { + String substringMatch = installPath.substring(1, installPath.length() - 2); + props.setProperty(TestServerDetector.getInstallPathMatch(), substringMatch); + tsd = new TestServerDetector(props); + + assertTrue(tsd.isInstallTypeVersion(simpleFile.getParent())); + } + + // full match + props.setProperty(TestServerDetector.getInstallPathMatch(), installPath); + tsd = new TestServerDetector(props); + + assertTrue(tsd.isInstallTypeVersion(installPath)); + } + + public void testNoMatch() throws Exception { + assertNotNull(tmpDir); + assertNotNull(simpleFile); + + // substring match + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), simpleFile.getName()); + String installPath = simpleFile.getParent(); + TestServerDetector tsd; + if (installPath != null && installPath.length() > 2) { + String substringMatch = installPath.substring(1, installPath.length() - 2); + props.setProperty(TestServerDetector.getInstallPathNoMatch(), substringMatch); + tsd = new TestServerDetector(props); + + assertFalse(tsd.isInstallTypeVersion(installPath)); + } + + // full match + props.setProperty(TestServerDetector.getInstallPathNoMatch(), installPath); + tsd = new TestServerDetector(props); + + assertFalse(tsd.isInstallTypeVersion(installPath)); + } + + public void testMatchAndNoMatchOnSameString() throws Exception { + assertNotNull(tmpDir); + assertNotNull(simpleFile); + + // substring match + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), simpleFile.getName()); + String installPath = simpleFile.getParent(); + TestServerDetector tsd; + + // full match and no match -- logical contradiction, should fail + props.setProperty(TestServerDetector.getInstallPathMatch(), installPath); + props.setProperty(TestServerDetector.getInstallPathNoMatch(), installPath); + tsd = new TestServerDetector(props); + + assertFalse(tsd.isInstallTypeVersion(installPath)); + } + + public void testMatchAndNoMatchOnDifferentStrings() throws Exception { + assertNotNull(tmpDir); + assertNotNull(simpleFile); + + // substring match + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), simpleFile.getName()); + String installPath = simpleFile.getParent(); + String badPath = "gibberish"; + TestServerDetector tsd; + + props.setProperty(TestServerDetector.getInstallPathMatch(), installPath); + props.setProperty(TestServerDetector.getInstallPathNoMatch(), badPath); + tsd = new TestServerDetector(props); + + assertTrue(tsd.isInstallTypeVersion(installPath)); + } + + public void testRecursiveMatch() throws Exception { + assertNotNull(tmpDir); + assertNotNull(deepFile); + + // substring match + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), "**/" + deepFile.getName()); + String installPath = simpleFile.getParent(); + TestServerDetector tsd; + + // full match and no match -- logical contradiction, should fail + props.setProperty(TestServerDetector.getInstallPathMatch(), installPath); + tsd = new TestServerDetector(props); + + assertTrue(tsd.isInstallTypeVersion(installPath)); + } + + public void testRecursiveNoMatch() throws Exception { + assertNotNull(tmpDir); + assertNotNull(deepFile); + + // substring match + Properties props = new Properties(); + props.setProperty(TestServerDetector.getVersionFile(), "**/" + deepFile.getName()); + String installPath = simpleFile.getParent(); + TestServerDetector tsd; + + // full match and no match -- logical contradiction, should fail + props.setProperty(TestServerDetector.getInstallPathNoMatch(), "gobbledygook"); + tsd = new TestServerDetector(props); + + assertTrue(tsd.isInstallTypeVersion(installPath)); + } + + private static class TestServerDetector extends ServerDetector { + + private Properties props; + + public TestServerDetector(Properties props) { + this.props = props; + } + + public String getTypeProperty(String key) { + return props.getProperty(key); + } + + // Expose some protected constants + public static String getVersionFile() { + return VERSION_FILE; + } + + public static String getInstallPathMatch() { + return INSTALLPATH_MATCH; + } + + public static String getInstallPathNoMatch() { + return INSTALLPATH_NOMATCH; + } + } +} |
From: <pn...@hy...> - 2010-03-31 20:53:28
|
Author: pnguyen Date: 2010-03-31 13:53:17 -0700 (Wed, 31 Mar 2010) New Revision: 14454 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14454 Modified: trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/DefaultServerDetector.java trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/Measurement.java Log: [HHQ-3636] Output the errors in debug mode so that environments without DB2 will not see the exceptions in the agent.log unless debug logging is enabled. Modified: trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/DefaultServerDetector.java =================================================================== --- trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/DefaultServerDetector.java 2010-03-31 17:25:15 UTC (rev 14453) +++ trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/DefaultServerDetector.java 2010-03-31 20:53:17 UTC (rev 14454) @@ -1,7 +1,28 @@ /* - * To change this template, choose Tools | Templates - * and open the template in the editor. + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2004-2010], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. */ + package org.hyperic.hq.plugin.db2jdbc; import java.io.BufferedReader; @@ -39,7 +60,11 @@ private String list_database; public List getServerResources(ConfigResponse conf) throws PluginException { - getLog().debug("[getServerResources] conf=" + conf); + boolean debug = getLog().isDebugEnabled(); + + if (debug) { + getLog().debug("[getServerResources] conf=" + conf); + } Pattern regExpVersion = Pattern.compile(getTypeInfo().getVersion().replaceAll("[X|x]", "\\d*")); List res = new ArrayList(); @@ -54,40 +79,52 @@ key = RegistryKey.LocalMachine.openSubKey("SOFTWARE\\IBM\\DB2\\InstalledCopies\\" + instances[n] + "\\CurrentVersion"); String version = key.getStringValue("Version") + "." + key.getStringValue("Release") + "." + key.getStringValue("Modification") + "." + key.getStringValue("Fix Level"); key.close(); - getLog().debug(instances[n] + "-->" + version); + if (debug) { + getLog().debug(instances[n] + "-->" + version); + } if (regExpVersion.matcher(version).find()) { key = RegistryKey.LocalMachine.openSubKey("SOFTWARE\\IBM\\DB2\\InstalledCopies\\" + instances[n]); String path = key.getStringValue("DB2 Path Name"); key.close(); res.addAll(createServers(path.trim())); } else { - getLog().debug("[getServerResources] bad version: '" + instances[n] + " " + version + "'"); + if (debug) { + getLog().debug("[getServerResources] bad version: '" + instances[n] + " " + version + "'"); + } } } } catch (Win32Exception ex) { - Logger.getLogger(DefaultServerDetector.class.getName()).log(Level.SEVERE, null, ex); + if (debug) { + getLog().debug("[getServerResources] error: " + ex.getMessage(), ex); + } } } else { try { Process cmd = Runtime.getRuntime().exec(db2ls); cmd.waitFor(); String sal = inputStreamAsString(cmd.getInputStream()); - getLog().debug("[getServerResources] sal=" + sal); + if (debug) { + getLog().debug("[getServerResources] sal=" + sal); + } String[] installs = sal.split("\n"); for (int n=0;n<installs.length;n++) { Matcher m = regExpInstall.matcher(installs[n]); if (m.find()) { if (regExpVersion.matcher(m.group(2)).find()) { - getLog().debug("[getServerResources] found: '" + m.group() + "'"); + if (debug) { + getLog().debug("[getServerResources] found: '" + m.group() + "'"); + } res.addAll(createServers(m.group(1))); } else { - getLog().debug("[getServerResources] bad version: '" + m.group() + "'"); + if (debug) { + getLog().debug("[getServerResources] bad version: '" + m.group() + "'"); + } } } } } catch (Exception ex) { - if (getLog().isDebugEnabled()) { - getLog().error(ex.getMessage(), ex); + if (debug) { + getLog().debug("[getServerResources] error: " + ex.getMessage(), ex); } } } @@ -102,16 +139,20 @@ list_database = manager.getProperties().getProperty("db2.jdbc.list_database"); - getLog().debug("[getServerResources] db2.jdbc.db2ls=" + db2ls); - getLog().debug("[getServerResources] db2.jdbc.entry_types=" + entry_types); - getLog().debug("[getServerResources] db2.jdbc.list_database=" + list_database); + if (getLog().isDebugEnabled()) { + getLog().debug("[getServerResources] db2.jdbc.db2ls=" + db2ls); + getLog().debug("[getServerResources] db2.jdbc.entry_types=" + entry_types); + getLog().debug("[getServerResources] db2.jdbc.list_database=" + list_database); + } super.init(manager); } protected boolean checkEntryTypes(String type) { boolean res = entry_types.contains("*") || entry_types.contains(type.toLowerCase()); - getLog().debug("[checkEntryTypes] type='" + type + "' res='" + res + "'"); + if (getLog().isDebugEnabled()) { + getLog().debug("[checkEntryTypes] type='" + type + "' res='" + res + "'"); + } return res; } Modified: trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/Measurement.java =================================================================== --- trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/Measurement.java 2010-03-31 17:25:15 UTC (rev 14453) +++ trunk/plugins/db2jdbc/src/org/hyperic/hq/plugin/db2jdbc/Measurement.java 2010-03-31 20:53:17 UTC (rev 14454) @@ -1,7 +1,28 @@ /* - * To change this template, choose Tools | Templates - * and open the template in the editor. + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2004-2010], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. */ + package org.hyperic.hq.plugin.db2jdbc; import java.sql.Connection; @@ -24,6 +45,7 @@ */ public class Measurement extends CachedJDBCMeasurement { + private static final String JDBC_DRIVER = "com.ibm.db2.jcc.DB2Driver"; private static final String KEY = "key"; private static final String EXEC_TIME_ATTR = "QueryExecTime"; private static final Hashtable cache = new Hashtable(); @@ -50,9 +72,11 @@ protected void getDriver() throws ClassNotFoundException { try { - Class.forName("com.ibm.db2.jcc.DB2Driver"); + Class.forName(JDBC_DRIVER); } catch (ClassNotFoundException ex) { - getLog().error(ex.getMessage(), ex); + // log in debug mode only for + // environments without the driver + getLog().debug(ex.getMessage(), ex); throw ex; } } |
From: Thiago F. de M. <sig...@hy...> - 2010-03-31 18:17:37
|
In contact with Debian developers, appeared some doubts. Above our talk: > On Tue, Mar 30, 2010 at 10:03:05AM -0400, Michael Hanke wrote: > > On Tue, Mar 30, 2010 at 09:41:29AM -0300, Thiago Franco Moraes wrote: > > > Michael, Why did you compile the sigar as a static lib? It was because > > > a compiling problem? > > > > No, compiling as a shared library works fine (I tested it, including > > linking the bindings against it). However, we cannot ship an unversioned > > shared library in Debian. > > Yes, but in several cases the Debian maintainer "invented" a soversion, > mostly 0.0.0 or something like this to enable easy upgrades. > > > At the same time we cannot use the current > > version, since this is an SVN snapshot and we don't know whether > > upstream will break API/ABI before the release. > > Teaching upstream about sonames does not harm - this finally reduces the > packaging work later on because you do not need to invent it. Upstream knows about versions and they do use them already. However, this SVN snapshot still uses the old stable version -- nobody knows how often they will break the ABI before they release -- after all this is a development snapshot. I only say that we should not step forward with shared-lib packaging without coordination and a proper release! Thank! |
From: Thiago F. de M. <sig...@hy...> - 2010-03-31 18:17:36
|
Hi, I'm creating a package of SIGAR. |
From: Thiago F. de M. <sig...@hy...> - 2010-03-31 18:17:34
|
Hi all, I'm creating a debian package. To do that I need some informations: The authors and the copyright. Above how the file look like. Thanks! This package was debianized by Thiago Franco de Moraes <tfm...@ct...> on Wed, 24 Mar 2010 12:54:50 -0300. It was downloaded from <http://svn.hyperic.org/projects/sigar_mirror/trunk> Upstream Author(s): <put author's name and email here> <likewise for another author> Copyright: <Copyright (C) YYYY Name OfAuthor> <likewise for another author> License: <Put the license of the package here indented by 4 spaces> The Debian packaging is: Copyright (C) 2010 Thiago Franco de Moraes <tfm...@ct...> and is licensed under the GPL version 3, see `/usr/share/common-licenses/GPL-3'. # Please also look if there are files or directories which have a # different copyright/license attached and list them here. |
From: <dcr...@hy...> - 2010-03-31 17:25:28
|
Author: dcrutchf Date: 2010-03-31 10:25:15 -0700 (Wed, 31 Mar 2010) New Revision: 14453 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14453 Modified: trunk/plugins/sybase/etc/hq-plugin.xml Log: HHQ-3792 -Update note details for Configure Sybase 15.x for Monitoring within Configuration Properties Modified: trunk/plugins/sybase/etc/hq-plugin.xml =================================================================== --- trunk/plugins/sybase/etc/hq-plugin.xml 2010-03-31 08:02:18 UTC (rev 14452) +++ trunk/plugins/sybase/etc/hq-plugin.xml 2010-03-31 17:25:15 UTC (rev 14453) @@ -398,22 +398,14 @@ <help name="Sybase"> <![CDATA[ <p> - <h3>Configure Sybase ${product.version} for Monitoring</h3> + <h3>Configure Sybase ${product.version} for Monitoring</h3> </p> <p> - Please run the HQ agent on the local Sybase server as the sybase user. - <br> - This is neccessary to get the proper ENV vars setup in order to execute - <br> - the sp_sysmon procedure. - </p> - <p> <b>NOTES:</b> - <br> - The jdbcUrl may not work using localhost. Please specify the actual hostname. - <br> - On Windows install <a href="http://www.activestate.com/activeperl">ActivePerl</a> - and bind the extension .pl to automatically execute perl when the file type is invoked. + <ul> + <li>To configure the jdbcUrl, specifiy the fully qualified domain name or IP address of the host machine. The use of localhost is invalid.</li> + <li>On Windows install <a href="http://www.activestate.com/activeperl">ActivePerl</a> and bind the extension .pl to automatically execute perl when the file type is invoked.</li> + </ul> </p> ]]> </help> |
From: <bo...@hy...> - 2010-03-31 08:02:27
|
Author: bob Date: 2010-03-31 01:02:18 -0700 (Wed, 31 Mar 2010) New Revision: 14452 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14452 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1394 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-03-31 07:36:14 UTC (rev 14451) +++ trunk/etc/version.properties 2010-03-31 08:02:18 UTC (rev 14452) @@ -1,3 +1,3 @@ -#Tue Mar 30 00:18:08 PDT 2010 +#Wed Mar 31 00:16:13 PDT 2010 version=4.3.0 -build=1393 +build=1394 |
From: <sc...@hy...> - 2010-03-31 07:36:24
|
Author: scottmf Date: 2010-03-31 00:36:14 -0700 (Wed, 31 Mar 2010) New Revision: 14451 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14451 Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java Log: [HHQ-3853] [HHQ-3850] fixed scehduling issues Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2010-03-31 02:00:31 UTC (rev 14450) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2010-03-31 07:36:14 UTC (rev 14451) @@ -259,6 +259,8 @@ super.checkModifyPermission(subject.getId(), id); List dmList = createMeasurements(id, templates, intervals, props); + ZeventManager.getInstance().enqueueEventAfterCommit( + new AgentScheduleSyncZevent(Collections.singletonList(id))); return dmList; } @@ -1441,11 +1443,15 @@ } boolean isCreate = z instanceof ResourceCreatedZevent; - boolean isRefresh = - z instanceof ResourceRefreshZevent || z instanceof ResourceUpdatedZevent; + boolean isRefresh = z instanceof ResourceRefreshZevent; + boolean isUpdate = z instanceof ResourceUpdatedZevent; try { // Handle reschedules for when agents are updated. + if (isUpdate) { + if (debug) log.debug("Refreshing metric schedule for [" + id + "]"); + eids.add(id); + } if (isRefresh) { if (debug) log.debug("Refreshing metric schedule for [" + id + "]"); eids.add(id); @@ -1476,7 +1482,7 @@ } } catch (ConfigFetchException e) { - log.debug("Config not set for [" + id + "]", e); + log.warn("Config not set for [" + id + "] (this is usually ok): " + e); } catch(Exception e) { log.warn("Unable to enable default metrics for [" + id + "]", e); } |
From: <dcr...@hy...> - 2010-03-31 00:37:48
|
Author: dcrutchf Date: 2010-03-30 17:37:40 -0700 (Tue, 30 Mar 2010) New Revision: 14447 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14447 Modified: branches/HQ_4_0_3_1/web/common/Head.jsp branches/HQ_4_0_3_1/web/resource/common/monitor/visibility/DashCharts.jsp Log: Changed to use regular dojo.js Modified: branches/HQ_4_0_3_1/web/common/Head.jsp =================================================================== --- branches/HQ_4_0_3_1/web/common/Head.jsp 2010-03-31 00:33:04 UTC (rev 14446) +++ branches/HQ_4_0_3_1/web/common/Head.jsp 2010-03-31 00:37:40 UTC (rev 14447) @@ -47,7 +47,7 @@ <script type="text/javascript"> djConfig = { isDebug: false } </script> -<script type="text/javascript" src="<html:rewrite page='/js/dojo/0.4.4/dojo.js.uncompressed.js'/>"></script> +<script type="text/javascript" src="<html:rewrite page='/js/dojo/0.4.4/dojo.js'/>"></script> <script type="text/javascript"> djConfig.parseOnLoad = true; djConfig.baseUrl = '/js/dojo/1.1.2/dojo/'; @@ -57,7 +57,7 @@ ["dojox", "dojox11"] ]; </script> -<script src="<html:rewrite page='/js/dojo/1.1.2/dojo/dojo.js.uncompressed.js'/>" type="text/javascript"></script> +<script src="<html:rewrite page='/js/dojo/1.1.2/dojo/dojo.js'/>" type="text/javascript"></script> <script type="text/javascript"> var imagePath = "<html:rewrite page="/images/"/>"; dojo11.require('dojo.date'); Modified: branches/HQ_4_0_3_1/web/resource/common/monitor/visibility/DashCharts.jsp =================================================================== --- branches/HQ_4_0_3_1/web/resource/common/monitor/visibility/DashCharts.jsp 2010-03-31 00:33:04 UTC (rev 14446) +++ branches/HQ_4_0_3_1/web/resource/common/monitor/visibility/DashCharts.jsp 2010-03-31 00:37:40 UTC (rev 14447) @@ -49,7 +49,7 @@ <META Http-Equiv="Pragma" Content="no-cache"> <META Http-Equiv="Expires" Content="0"> -<script src="<html:rewrite page='/js/dojo/1.1.2/dojo/dojo.js.uncompressed.js'/>" type="text/javascript"></script> +<script src="<html:rewrite page='/js/dojo/1.1.2/dojo/dojo.js'/>" type="text/javascript"></script> <script src="<html:rewrite page="/js/functions.js"/>" type="text/javascript"></script> <script src="<html:rewrite page="/js/prototype.js"/>" type="text/javascript"></script> <script src="<html:rewrite page="/js/effects.js"/>" type="text/javascript"></script> |
From: <dcr...@hy...> - 2010-03-30 23:34:07
|
Author: dcrutchf Date: 2010-03-30 16:33:59 -0700 (Tue, 30 Mar 2010) New Revision: 14445 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14445 Modified: trunk/installer/data/db-upgrade.xml trunk/web/WEB-INF/classes/ApplicationResources.properties Log: [HQ-2079] - User with full server permission cannot delete server Added more upgrade logic to match the rules added to role permissions Modified: trunk/installer/data/db-upgrade.xml =================================================================== --- trunk/installer/data/db-upgrade.xml 2010-03-30 23:29:13 UTC (rev 14444) +++ trunk/installer/data/db-upgrade.xml 2010-03-30 23:33:59 UTC (rev 14445) @@ -10911,12 +10911,24 @@ <schemaSpec version="3.195"> <schema-directSQL> - <statement desc="Adding create group permission..."> - INSERT INTO EAM_OPERATION(ID,VERSION_COL,NAME,RESOURCE_TYPE_ID) VALUES (29,0,'createResourceGroup',3) - </statement> - <statement desc="Adding view escalation permission..."> - INSERT INTO EAM_OPERATION(ID,VERSION_COL,NAME,RESOURCE_TYPE_ID) VALUES (415,0,'viewEscalation',0) - </statement> + <statement desc="Removing manage application alert permission..."> + DELETE FROM EAM_ROLE_OPERATION_MAP WHERE OPERATION_ID=403 + </statement> + <statement desc="Removing control application permission..."> + DELETE FROM EAM_ROLE_OPERATION_MAP WHERE OPERATION_ID=328 + </statement> + <statement desc="Adding create group permission..."> + INSERT INTO EAM_OPERATION(ID,VERSION_COL,NAME,RESOURCE_TYPE_ID) + SELECT 29,0,'createResourceGroup',3 FROM EAM_OPERATION + WHERE ID=29 + HAVING COUNT(*) = 0 + </statement> + <statement desc="Adding view escalation permission..."> + INSERT INTO EAM_OPERATION(ID,VERSION_COL,NAME,RESOURCE_TYPE_ID) + SELECT 415,0,'viewEscalation',0 FROM EAM_OPERATION + WHERE ID=415 + HAVING COUNT(*) = 0 + </statement> <statement desc="Adding create group permission to any role that has delete group permission..."> INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) SELECT m.role_id, 29 FROM EAM_ROLE r @@ -10949,6 +10961,14 @@ AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm WHERE rm.role_id = r.id AND rm.operation_id = 28) = 0 </statement> + <statement desc="Adding alert group permission to any role that has create, update or delete group permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 404 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 29 or m.operation_id = 31 or m.operation_id = 24) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 404) = 0 + </statement> <statement desc="Adding create platform permission to any role that has delete platform permission..."> INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) SELECT m.role_id, 320 FROM EAM_ROLE r @@ -10981,6 +11001,22 @@ AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm WHERE rm.role_id = r.id AND rm.operation_id = 305) = 0 </statement> + <statement desc="Adding alert platform permission to any role that has create, update or delete platform permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 400 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 320 or m.operation_id = 302 or m.operation_id = 301) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 400) = 0 + </statement> + <statement desc="Adding control platform permission to any role that has create, update or delete platform permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 325 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 320 or m.operation_id = 302 or m.operation_id = 301) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 325) = 0 + </statement> <statement desc="Adding create server permission to any role that has delete server permission..."> INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) SELECT m.role_id, 303 FROM EAM_ROLE r @@ -11013,6 +11049,22 @@ AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm WHERE rm.role_id = r.id AND rm.operation_id = 311) = 0 </statement> + <statement desc="Adding alert server permission to any role that has create, update or delete server permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 401 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 308 or m.operation_id = 303 or m.operation_id = 307) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 401) = 0 + </statement> + <statement desc="Adding control server permission to any role that has create, update or delete server permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 326 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 308 or m.operation_id = 303 or m.operation_id = 307) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 326) = 0 + </statement> <statement desc="Adding create service permission to any role that has delete service permission..."> INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) SELECT m.role_id, 309 FROM EAM_ROLE r @@ -11045,6 +11097,22 @@ AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm WHERE rm.role_id = r.id AND rm.operation_id = 315) = 0 </statement> + <statement desc="Adding alert service permission to any role that has create, update or delete service permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 402 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 309 or m.operation_id = 314 or m.operation_id = 313) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 402) = 0 + </statement> + <statement desc="Adding control service permission to any role that has create, update or delete service permission..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 327 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (m.operation_id = 309 or m.operation_id = 314 or m.operation_id = 313) + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 327) = 0 + </statement> <statement desc="Adding create application permission to any role that has delete application permission..."> INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) SELECT m.role_id, 316 FROM EAM_ROLE r @@ -11173,8 +11241,232 @@ AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm WHERE rm.role_id = r.id AND rm.operation_id = 415) = 0 </statement> - </schema-directSQL> - </schemaSpec> + <statement desc="Adding create server permission, if platform permissions have create or delete (i.e. full permission) and create server permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 303 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 320 or rm.operation_id = 302)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 303) = 0 + </statement> + <statement desc="Adding delete server permission, if platform permissions have create or delete (i.e. full permission) and delete server permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 308 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 320 or rm.operation_id = 302)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 308) = 0 + </statement> + <statement desc="Adding modify server permission, if platform permissions have create or delete (i.e. full permission) and modify server permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 307 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 320 or rm.operation_id = 302)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 307) = 0 + </statement> + <statement desc="Adding view server permission, if platform permissions have create or delete (i.e. full permission) and view server permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 311 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 320 or rm.operation_id = 302)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 311) = 0 + </statement> + <statement desc="Adding view server permission, if platform permissions have create or delete (i.e. full permission) and manage alert server permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 401 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 320 or rm.operation_id = 302)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 401) = 0 + </statement> + <statement desc="Adding view server permission, if platform permissions have create or delete (i.e. full permission) and control server permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 326 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 320 or rm.operation_id = 302)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 326) = 0 + </statement> + <statement desc="Adding create service permission, if server permissions have create or delete (i.e. full permission) and create service permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 309 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 303 or rm.operation_id = 308)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 309) = 0 + </statement> + <statement desc="Adding delete service permission, if server permissions have create or delete (i.e. full permission) and delete service permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 314 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 303 or rm.operation_id = 308)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 314) = 0 + </statement> + <statement desc="Adding modify service permission, if server permissions have create or delete (i.e. full permission) and modify service permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 313 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 303 or rm.operation_id = 308)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 313) = 0 + </statement> + <statement desc="Adding view service permission, if server permissions have create or delete (i.e. full permission) and view service permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 315 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 303 or rm.operation_id = 308)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 315) = 0 + </statement> + <statement desc="Adding view service permission, if server permissions have create or delete (i.e. full permission) and manage alerts service permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 402 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 303 or rm.operation_id = 308)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 402) = 0 + </statement> + <statement desc="Adding view service permission, if server permissions have create or delete (i.e. full permission) and control service permission does not exist..."> + INSERT INTO EAM_ROLE_OPERATION_MAP(ROLE_ID, OPERATION_ID) + SELECT distinct m.role_id, 327 FROM EAM_ROLE r + INNER JOIN EAM_ROLE_OPERATION_MAP m on r.id = m.role_id + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND (rm.operation_id = 303 or rm.operation_id = 308)) = 2 and + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = r.id AND rm.operation_id = 327) = 0 + </statement> + </schema-directSQL> + <groovy> + <![CDATA[ + println("Removing alert and control mappings where the group, platform, server and service doesnt have any permissions") + def stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 320 or rm.operation_id = 302 or rm.operation_id = 301 or rm.operation_id = 305)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 400 or rm.operation_id = 325)) > 0""" + def sql = [] + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 400 or operation_id = 325)" + } ) + stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 308 or rm.operation_id = 303 or rm.operation_id = 307 or rm.operation_id = 311)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 401 or rm.operation_id = 326)) > 0""" + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 401 or operation_id = 326)" + } ) + stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 309 or rm.operation_id = 314 or rm.operation_id = 313 or rm.operation_id = 315)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 402 or rm.operation_id = 327)) > 0""" + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 402 or operation_id = 327)" + } ) + stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (m.operation_id = 29 or m.operation_id = 31 or m.operation_id = 24 or rm.operation_id = 28)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND rm.operation_id = 404) > 0""" + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and operation_id = 404" + } ) + try { + stmt = CONN.createStatement() + for (s in sql) { + println(s) + stmt.execute(s) + } + } finally { + stmt.close() + } + ]]> + </groovy> + <groovy> + <![CDATA[ + println("Searching for mappings where the child has full permissions, but the parent has none. If found, we correct it by removing full permissions from child") + def stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 320 or rm.operation_id = 302 or rm.operation_id = 305 or rm.operation_id = 301)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 303 or rm.operation_id = 308)) > 0""" + def sql = [] + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 303 or operation_id = 308)" + } ) + stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 303 or rm.operation_id = 308 or rm.operation_id = 307 or rm.operation_id = 311)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 309 or rm.operation_id = 314)) > 0""" + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 309 or operation_id = 314)" + } ) + stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (((SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 6 or rm.operation_id = 7 or rm.operation_id = 8 or rm.operation_id = 10)) = 0 AND + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 12 or rm.operation_id = 30)) > 0) OR + ((SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 24 or rm.operation_id = 28 or rm.operation_id = 29 or rm.operation_id = 31)) = 0 AND + (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 12 or rm.operation_id = 30)) > 0))""" + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 12 or operation_id = 30)" + } ) + stmt = """SELECT distinct role_id FROM EAM_ROLE_OPERATION_MAP m + WHERE (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 11 or rm.operation_id = 12 or rm.operation_id = 16 or rm.operation_id = 30)) = 0 + AND (SELECT count(*) FROM EAM_ROLE_OPERATION_MAP rm + WHERE rm.role_id = m.role_id + AND (rm.operation_id = 7 or rm.operation_id = 10)) > 0""" + SQL.eachRow(stmt, { + sql << "DELETE FROM EAM_ROLE_OPERATION_MAP WHERE role_id = ${it.role_id} and (operation_id = 7 or operation_id = 10)" + } ) + try { + stmt = CONN.createStatement() + for (s in sql) { + println(s) + stmt.execute(s) + } + } finally { + stmt.close() + } + ]]> + </groovy> + </schemaSpec> </dbupgrade> </target> </project> Modified: trunk/web/WEB-INF/classes/ApplicationResources.properties =================================================================== --- trunk/web/WEB-INF/classes/ApplicationResources.properties 2010-03-30 23:29:13 UTC (rev 14444) +++ trunk/web/WEB-INF/classes/ApplicationResources.properties 2010-03-30 23:33:59 UTC (rev 14445) @@ -329,7 +329,8 @@ admin.role.perms.ResourceTypeTH=Resource Type admin.role.perms.type.users=Users admin.role.perms.type.roles=Roles -admin.role.perms.type.groups=Groups +admin.role.perms.type.groups=Groups * +admin.role.perms.type.groups.note=* Regardless of permissions selected, all users have the ability to create groups in the system. admin.role.perms.type.platforms=Platforms admin.role.perms.type.servers=Servers admin.role.perms.type.services=Services |
From: <kp...@hy...> - 2010-03-30 23:29:22
|
Author: kparikh Date: 2010-03-30 16:29:13 -0700 (Tue, 30 Mar 2010) New Revision: 14444 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14444 Removed: branches/HQ_4_2_1/ Log: Removing 4.2.1 branch. |
From: <pn...@hy...> - 2010-03-30 22:46:19
|
Author: pnguyen Date: 2010-03-30 15:46:10 -0700 (Tue, 30 Mar 2010) New Revision: 14443 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14443 Modified: trunk/build.xml trunk/plugins/db2jdbc/etc/hq-plugin.xml Log: [HHQ-3636] Package the new DB2 JDBC plugin with the server and agent Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-03-30 20:20:15 UTC (rev 14442) +++ trunk/build.xml 2010-03-30 22:46:10 UTC (rev 14443) @@ -1078,6 +1078,8 @@ <fileset dir="${db2monitor.dir}" includes="lib/*"/> </hqplugin> + <hqplugin name="db2jdbc"/> + <hqplugin name="postgresql"/> <hqplugin name="mysql"/> Modified: trunk/plugins/db2jdbc/etc/hq-plugin.xml =================================================================== --- trunk/plugins/db2jdbc/etc/hq-plugin.xml 2010-03-30 20:20:15 UTC (rev 14442) +++ trunk/plugins/db2jdbc/etc/hq-plugin.xml 2010-03-30 22:46:10 UTC (rev 14443) @@ -6,7 +6,7 @@ normal use of the program, and does *not* fall under the heading of "derived work". - Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + Copyright (C) [2004-2010], Hyperic, Inc. This file is part of HQ. HQ is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ USA. --> -<plugin name="db2-jdbc" > +<plugin name="db2jdbc" > <property name="template-config" value="database=%db2.jdbc.database%,jdbcUser=%db2.jdbc.user%,jdbcPassword=%db2.jdbc.password%,jdbcUrl=jdbc:db2://%db2.jdbc.hostname%:%db2.jdbc.port%/%db2.jdbc.database%"/> |
From: <no...@gi...> - 2010-03-30 21:59:56
|
Branch: refs/heads/master Home: http://github.com/hyperic/hq-dynomite Commit: eb682ed10fd34e2cfa9aa8f2527735316ce38c93 http://github.com/hyperic/hq-dynomite/commit/eb682ed10fd34e2cfa9aa8f2527735316ce38c93 Author: Doug MacEachern <do...@hy...> Date: 2010-03-30 (Tue, 30 Mar 2010) Changed paths: M README.markdown Log Message: ----------- Cliff put the nail in the coffin |
From: <no...@gi...> - 2010-03-30 20:27:53
|
Branch: refs/heads/master Home: http://github.com/hyperic/hqapi Commit: 764af6af95acfbf883c524e0d1d8c23ec2b95162 http://github.com/hyperic/hqapi/commit/764af6af95acfbf883c524e0d1d8c23ec2b95162 Author: pnguyen <pnguyen@192.168.1.145> Date: 2010-03-30 (Tue, 30 Mar 2010) Changed paths: M ChangeLog M hqu/hqapi1/app/GroupController.groovy M src/org/hyperic/hq/hqapi1/GroupApi.java M src/org/hyperic/hq/hqapi1/test/GroupGet_test.java Log Message: ----------- [HQ-1309] Updated GroupApi to list groups by role. Functionality added primarily to do integration testing for HQ-1309. No corresponding CLI command was added. |
From: <pn...@hy...> - 2010-03-30 20:20:24
|
Author: pnguyen Date: 2010-03-30 13:20:15 -0700 (Tue, 30 Mar 2010) New Revision: 14442 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14442 Modified: trunk/src/org/hyperic/hq/authz/server/session/RoleManagerEJBImpl.java trunk/src/org/hyperic/hq/hqu/rendit/metaclass/RoleCategory.groovy Log: [HQ-1309] Get groups by role. Added primarily for HQApi integration testing. Modified: trunk/src/org/hyperic/hq/authz/server/session/RoleManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/authz/server/session/RoleManagerEJBImpl.java 2010-03-30 18:45:27 UTC (rev 14441) +++ trunk/src/org/hyperic/hq/authz/server/session/RoleManagerEJBImpl.java 2010-03-30 20:20:15 UTC (rev 14442) @@ -6,7 +6,7 @@ * normal use of the program, and does *not* fall under the heading of * "derived work". * - * Copyright (C) [2004-2008], Hyperic, Inc. + * Copyright (C) [2004-2010], Hyperic, Inc. * This file is part of HQ. * * HQ is free software; you can redistribute it and/or modify @@ -1090,6 +1090,25 @@ } /** + * Get the resource groups applicable to a given role. + * + * @ejb:interface-method + */ + public Collection getResourceGroupsByRole(AuthzSubject subject, + Role role) + throws PermissionException, FinderException { + + ResourceGroupDAO dao = getResourceGroupDAO(); + + Collection groups = + dao.findByRoleIdAndSystem_orderName(role.getId(), false, true); + + // now get viewable group pks + return filterViewableGroups(subject, groups); + + } + + /** * Get the resource groups applicable to a given role * @ejb:interface-method */ Modified: trunk/src/org/hyperic/hq/hqu/rendit/metaclass/RoleCategory.groovy =================================================================== --- trunk/src/org/hyperic/hq/hqu/rendit/metaclass/RoleCategory.groovy 2010-03-30 18:45:27 UTC (rev 14441) +++ trunk/src/org/hyperic/hq/hqu/rendit/metaclass/RoleCategory.groovy 2010-03-30 20:20:15 UTC (rev 14442) @@ -52,4 +52,11 @@ static void remove(Role role, AuthzSubject user) { roleMan.removeRole(user, role.id) } + + /** + * Get the Resource Groups for a Role + */ + static Collection getGroups(Role role, AuthzSubject user) { + roleMan.getResourceGroupsByRole(user, role) + } } |
From: Doug M. <do...@hy...> - 2010-03-30 20:10:15
|
Hi, Great to hear you're creating a Debian package for SIGAR. We're actually in the process of changing the SIGAR license from GPLv2 to Apache2. Might be better if you can wait a week or two for that change to happen, just let me know. Either way, I can get you the info for the package. -Doug |
From: <rm...@hy...> - 2010-03-30 18:45:34
|
Author: rmorgan Date: 2010-03-30 11:45:27 -0700 (Tue, 30 Mar 2010) New Revision: 14441 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14441 Modified: trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java Log: [HHQ-3843] Must call FileWatcherThread.doStart() to ensure the fiile watcher is running absent of any log/config track plugins. Modified: trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java 2010-03-30 07:52:51 UTC (rev 14440) +++ trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java 2010-03-30 18:45:27 UTC (rev 14441) @@ -1148,6 +1148,7 @@ } }; watcherThread.add(loggingWatcher); + watcherThread.doStart(); listenIp = cfg.getListenIp(); try { |
From: <jko...@hy...> - 2010-03-30 17:06:03
|
Author: jkonicki Date: 2010-03-29 15:14:56 -0700 (Mon, 29 Mar 2010) New Revision: 14437 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14437 Modified: trunk/src/org/hyperic/hq/product/ant/PluginJar.java Log: HHQ-3842 Added detailed info about the jar file to hqplugin target. So it will add the detailed manifest to each hq plugin jar. Modified: trunk/src/org/hyperic/hq/product/ant/PluginJar.java =================================================================== --- trunk/src/org/hyperic/hq/product/ant/PluginJar.java 2010-03-29 21:29:47 UTC (rev 14436) +++ trunk/src/org/hyperic/hq/product/ant/PluginJar.java 2010-03-29 22:14:56 UTC (rev 14437) @@ -28,19 +28,20 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Date; -import org.hyperic.hq.product.ProductPluginManager; -import org.hyperic.hq.product.pluginxml.PluginData; -import org.hyperic.hq.product.pluginxml.PluginParser; -import org.hyperic.util.StringUtil; - import org.apache.tools.ant.BuildException; - import org.apache.tools.ant.taskdefs.Jar; import org.apache.tools.ant.taskdefs.Manifest; import org.apache.tools.ant.taskdefs.ManifestException; import org.apache.tools.ant.taskdefs.Manifest.Attribute; import org.apache.tools.ant.types.FileSet; +import org.hyperic.hq.product.ProductPluginManager; +import org.hyperic.hq.product.pluginxml.PluginData; +import org.hyperic.hq.product.pluginxml.PluginParser; +import org.hyperic.util.StringUtil; public class PluginJar extends Jar { @@ -179,21 +180,7 @@ classes.setIncludes(classesMatch + "/**/*.class"); addFileset(classes); - String mainClass = getMainClass(); - if (mainClass != null) { - if (mainClass.indexOf(".") == -1) { - mainClass = packageName + "." + mainClass; - } - Manifest manifest = new Manifest(); - try { - addConfiguredManifest(manifest); - Attribute attr = - new Attribute("Main-Class", mainClass); - manifest.addConfiguredAttribute(attr); - } catch (ManifestException e) { - throw new BuildException(e.getMessage(), e); - } - } + createManifest(packageName); super.execute(); @@ -214,4 +201,47 @@ validatePluginXML(pdk, plugin); } } + + private void createManifest(String packageName) { + Manifest manifest = new Manifest(); + try { + addConfiguredManifest(manifest); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Build-Owner", getProperty("user.name", + "Unknown"))); + String hostName = "Unknown"; + try { + hostName = InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + //ignore + } + manifest.getMainSection().addConfiguredAttribute(new Attribute("Build-Host", hostName)); + + if (getProperty("release.comment", null) != null) { + manifest.getMainSection() + .addConfiguredAttribute(new Attribute("Build-Type", getProperty("release.comment", "Unknown"))); + } + manifest.getMainSection().addConfiguredAttribute(new Attribute("Build-Date", new Date().toString())); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Specification-Title", "HQU Plugin")); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Specification-Vendor", "VMware Inc.")); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Specification-Version", + getProperty("version", "Unknown") + "-" + + getProperty("build", "Unknown"))); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Implementation-Title", getName())); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Implementation-Version", + getProperty("version", "Unknown") + "-" + + getProperty("build", "Unknown"))); + manifest.getMainSection().addConfiguredAttribute(new Attribute("Implementation-Vendor", "VMware Inc.")); + + String mainClass = getMainClass(); + if (mainClass != null) { + if (mainClass.indexOf(".") == -1) { + mainClass = packageName + "." + mainClass; + } + Attribute mainClassAttr = new Attribute("Main-Class", mainClass); + manifest.addConfiguredAttribute(mainClassAttr); + } + } catch (ManifestException e) { + throw new BuildException(e.getMessage(), e); + } + } } |
From: <bo...@hy...> - 2010-03-30 07:53:01
|
Author: bob Date: 2010-03-30 00:52:51 -0700 (Tue, 30 Mar 2010) New Revision: 14440 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14440 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1393 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-03-30 00:08:48 UTC (rev 14439) +++ trunk/etc/version.properties 2010-03-30 07:52:51 UTC (rev 14440) @@ -1,3 +1,3 @@ -#Mon Mar 29 00:18:38 PDT 2010 +#Tue Mar 30 00:18:08 PDT 2010 version=4.3.0 -build=1392 +build=1393 |
From: Mirko P. <m.p...@gm...> - 2010-03-30 00:32:19
|
Hi, do you want to create a package of the Agent, Server or of SIGAR ? Cheers, Mirko |
From: <pn...@hy...> - 2010-03-30 00:08:57
|
Author: pnguyen Date: 2010-03-29 17:08:48 -0700 (Mon, 29 Mar 2010) New Revision: 14439 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14439 Modified: trunk/plugins/netdevice/src/org/hyperic/hq/plugin/netdevice/SNMPTrapReceiver.java Log: [HHQ-3761] Debug the PDU type Modified: trunk/plugins/netdevice/src/org/hyperic/hq/plugin/netdevice/SNMPTrapReceiver.java =================================================================== --- trunk/plugins/netdevice/src/org/hyperic/hq/plugin/netdevice/SNMPTrapReceiver.java 2010-03-29 23:19:35 UTC (rev 14438) +++ trunk/plugins/netdevice/src/org/hyperic/hq/plugin/netdevice/SNMPTrapReceiver.java 2010-03-30 00:08:48 UTC (rev 14439) @@ -273,9 +273,10 @@ if (log.isDebugEnabled()) { log.debug("plugin=" + plugin.getName() + + ", trapsReceived=" + getTrapsReceived() + + ", pduType=" + event.getPDU().getType() + ", address=" + address + ", community=" + community - + ", trapsReceived=" + getTrapsReceived() + ", msg=" + msg); } |
From: <rm...@hy...> - 2010-03-29 23:19:44
|
Author: rmorgan Date: 2010-03-29 16:19:35 -0700 (Mon, 29 Mar 2010) New Revision: 14438 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14438 Modified: trunk/src/org/hyperic/hq/agent/AgentConfig.java trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java Log: [HHQ-3843] Allow agent logging to be configured without a restart. Modified: trunk/src/org/hyperic/hq/agent/AgentConfig.java =================================================================== --- trunk/src/org/hyperic/hq/agent/AgentConfig.java 2010-03-29 22:14:56 UTC (rev 14437) +++ trunk/src/org/hyperic/hq/agent/AgentConfig.java 2010-03-29 23:19:35 UTC (rev 14438) @@ -30,6 +30,8 @@ import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; import org.hyperic.hq.product.ClientPluginDeployer; @@ -238,51 +240,70 @@ } } - public static AgentConfig newInstance(String propsFile) - throws IOException, AgentConfigException - { - // verify that the agent bundle home has been properly defined - // before populating the default properties - checkAgentBundleHome(); - - Properties useProps = new Properties(); - File file = new File(propsFile); - useProps.putAll(AgentConfig.getDefaultProperties()); + /** + * Return an ordered list of property files used to configure the agent. Only + * the default agent.properties is required, all other files will not be added + * if they do not exist. + * + * @param propsFile The default agent.properties + * @return The ordered list of Files to read for agent.properties. + */ + public static File[] getPropertyFiles(String propsFile) { - if (!loadProps(useProps, file)) { - throw new AgentConfigException("Failed to load: " + propsFile); + List files = new ArrayList(); + + files.add(new File(propsFile)); // Default agent.properties + + File bundleFile = new File(BUNDLE_PROPFILE); + if (bundleFile.exists()) { + files.add(bundleFile); // Bundle agent.properties } - // load bundle-level agent properties - file = new File(BUNDLE_PROPFILE); - // do nothing if file does not exist - loadProps(useProps, file); - final String home = System.getProperty("user.home"); - String[] userFiles = { - //XXX Backwards compat, remove for 3.1 or 4.0? - home + File.separator + ".cam" + File.separator + DEFAULT_AGENT_PROPFILE_NAME, - //User overrides - home + File.separator + ".hq" + File.separator + DEFAULT_AGENT_PROPFILE_NAME, - //XXX considering yet another for windows where only cygwin can 'mkdir .hq'? - //"../" + File.separator + "hq-" + DEFAULT_PROPFILE, - //Check if the deployer has generated setup properties - "deployer.properties" - }; + File homeAgentProperties = new File(home + File.separator + ".hq" + File.separator + DEFAULT_AGENT_PROPFILE_NAME); + if (homeAgentProperties.exists()) { + files.add(homeAgentProperties); // ~/.hq/agent.properties + } - for (int i=0; i<userFiles.length; i++) { - file = new File(userFiles[i]); - if (loadProps(useProps, file)) { - //XXX logging not configured yet - //System.out.println("Loaded properties from: " + file); + File deployerProps = new File("deployer.properties"); + if (deployerProps.exists()) { + files.add(deployerProps); + } + + return (File[])files.toArray(new File[files.size()]); + } + + /** + * Return a Properties object that is the merged result all possible locations + * for agent.properties. + * + * @param propsFile The default agent.properties. + * @return The merge Properties object. + * @see org.hyperic.hq.agent.AgentConfig#getPropertyFiles(String) + */ + public static Properties getProperties(String propsFile) throws AgentConfigException { + Properties useProps = new Properties(); + useProps.putAll(AgentConfig.getDefaultProperties()); + + File[] propFiles = getPropertyFiles(propsFile); + for (int i=0; i<propFiles.length; i++) { + if (!loadProps(useProps, propFiles[i])) { + throw new AgentConfigException("Failed to load: " + propFiles[i]); } } - + PropertyUtil.expandVariables(useProps); + return useProps; + } + + public static AgentConfig newInstance(String propsFile) + throws IOException, AgentConfigException + { + // verify that the agent bundle home has been properly defined + // before populating the default properties + checkAgentBundleHome(); - // More backwards compatibility. Strip all net.covalent prefixes - // from the agent properties. - PropertyUtil.stripKeys(useProps, "net.covalent."); + Properties useProps = getProperties(propsFile); return AgentConfig.newInstance(useProps); } Modified: trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java 2010-03-29 22:14:56 UTC (rev 14437) +++ trunk/src/org/hyperic/hq/bizapp/agent/client/AgentClient.java 2010-03-29 23:19:35 UTC (rev 14438) @@ -61,6 +61,9 @@ import org.hyperic.hq.bizapp.client.RegisterAgentResult; import org.hyperic.hq.bizapp.client.StaticProviderFetcher; import org.hyperic.hq.common.shared.ProductProperties; +import org.hyperic.sigar.FileInfo; +import org.hyperic.sigar.FileWatcher; +import org.hyperic.sigar.FileWatcherThread; import org.hyperic.sigar.Sigar; import org.hyperic.sigar.SigarException; import org.hyperic.util.StringUtil; @@ -1095,8 +1098,8 @@ private static AgentClient initializeAgent(boolean generateToken){ SecureAgentConnection conn; AgentConfig cfg; - String connIp, listenIp, authToken, propFile; - propFile = + String connIp, listenIp, authToken; + final String propFile = System.getProperty(AgentConfig.PROP_PROPFILE, AgentConfig.DEFAULT_PROPFILE); @@ -1120,7 +1123,32 @@ return null; } PropertyConfigurator.configure(bootProps); - + + FileWatcherThread watcherThread = FileWatcherThread.getInstance(); + FileWatcher loggingWatcher = new FileWatcher(new Sigar()) { + { + File[] files = AgentConfig.getPropertyFiles(propFile); + for (int i = 0; i < files.length; i++) { + try { + add(files[i]); + } catch (SigarException e) { + SYSTEM_ERR.println("Error adding watcher for " + files[i]); + } + } + setInterval(60000); + } + public void onChange(FileInfo fileInfo) { + try { + SYSTEM_OUT.println("Change detected in " + fileInfo.getName() + ", reloading logging configuration"); + PropertyConfigurator.configure(AgentConfig.getProperties(propFile)); + } catch (AgentConfigException e) { + SYSTEM_ERR.println("Error reloading logging configuration: " + e.getMessage()); + e.printStackTrace(SYSTEM_ERR); + } + } + }; + watcherThread.add(loggingWatcher); + listenIp = cfg.getListenIp(); try { if(listenIp.equals(AgentConfig.IP_GLOBAL)){ |
From: <pn...@hy...> - 2010-03-29 21:29:55
|
Author: pnguyen Date: 2010-03-29 14:29:47 -0700 (Mon, 29 Mar 2010) New Revision: 14436 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14436 Modified: trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java Log: [HHQ-3803] Init total to 0, not 1. Modified: trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java =================================================================== --- trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java 2010-03-29 21:22:09 UTC (rev 14435) +++ trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java 2010-03-29 21:29:47 UTC (rev 14436) @@ -178,9 +178,9 @@ return null; } - double high = Double.MIN_VALUE, - low = Double.MAX_VALUE, - total = 1; + double high = Double.MIN_VALUE; + double low = Double.MAX_VALUE; + double total = 0; Double lastVal = null; int count = 0; long last = Long.MIN_VALUE; @@ -193,8 +193,6 @@ final int currentCount = mv.getCount(); final long currentTimestamp = mv.getTimestamp(); - if (debug) log.debug("Low: " + currentLowValue + ", High: " + currentHighValue + ", Value: " + currentValue + ", Count: " + currentCount + ", Timestamp: " + currentTimestamp); - if (!Double.isNaN(currentLowValue) && !Double.isInfinite(currentLowValue)) { low = Math.min(mv.getLowValue(), low); } @@ -212,6 +210,20 @@ if (!Double.isNaN(currentValue) && !Double.isInfinite(currentValue)) { total += currentValue * currentCount; } + + if (debug) { + log.debug("Measurement=" + template.getName() + + ", Current {Low=" + currentLowValue + + ", High=" + currentHighValue + + ", Value=" + currentValue + + ", Count=" + currentCount + + ", Timestamp=" + currentTimestamp + + "}, Summary {Low=" + low + + ", High=" + high + + ", Total=" + total + + ", Count=" + count + + "}"); + } } // This should only happen if every value in the array is NaN/Infinity... @@ -253,6 +265,17 @@ data[MeasurementConstants.IND_LAST_TIME] = lastVal; } + if (debug) { + log.debug("Measurement=" + template.getName() + + ", Last {Value=" + lastVal + + "}, Summary {Avg=" + avg + + ", Low=" + low + + ", High=" + high + + ", Total=" + total + + ", Count=" + count + + "}"); + } + return data; } |