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
|
Author: scottmf Date: 2009-12-11 10:25:38 -0800 (Fri, 11 Dec 2009) New Revision: 14074 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14074 Added: trunk/unittest/patchfiles/dbunit-2.2/src/java/org/dbunit/dataset/datatype/ trunk/unittest/patchfiles/dbunit-2.2/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java Modified: trunk/thirdparty/lib/dbunit-2.2.jar Log: adding another patch to dbunit. avoids datatype issues while retrieving column metadata Modified: trunk/thirdparty/lib/dbunit-2.2.jar =================================================================== (Binary files differ) Added: trunk/unittest/patchfiles/dbunit-2.2/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java =================================================================== --- trunk/unittest/patchfiles/dbunit-2.2/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java (rev 0) +++ trunk/unittest/patchfiles/dbunit-2.2/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java 2009-12-11 18:25:38 UTC (rev 14074) @@ -0,0 +1,22 @@ +Index: src/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java +=================================================================== +--- src/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java (revision 546) ++++ src/src/java/org/dbunit/dataset/datatype/DefaultDataTypeFactory.java (working copy) +@@ -46,12 +46,15 @@ + { + return DataType.BLOB; + } +- + // CLOB +- if ("CLOB".equals(sqlTypeName)) ++ else if ("CLOB".equals(sqlTypeName)) + { + return DataType.CLOB; + } ++ else ++ { ++ dataType = DataType.forSqlTypeName(sqlTypeName); ++ } + } + return dataType; + } |
From: <bo...@hy...> - 2009-12-11 08:52:27
|
Author: bob Date: 2009-12-11 00:52:12 -0800 (Fri, 11 Dec 2009) New Revision: 14072 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14072 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1285 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-11 00:14:46 UTC (rev 14071) +++ trunk/etc/version.properties 2009-12-11 08:52:12 UTC (rev 14072) @@ -1,3 +1,3 @@ -#Thu Dec 10 10:16:33 PST 2009 +#Fri Dec 11 00:14:56 PST 2009 version=4.3.0 -build=1284 +build=1285 |
From: <pn...@hy...> - 2009-12-11 00:46:13
|
Author: pnguyen Date: 2009-12-10 16:14:46 -0800 (Thu, 10 Dec 2009) New Revision: 14071 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14071 Modified: trunk/src/org/hyperic/hq/events/server/session/AlertDAO.java trunk/src/org/hyperic/hq/events/server/session/AlertManagerEJBImpl.java Log: [HQ-1799] Get all last unfixed alerts in 1 query, instead of per resource (X queries) Modified: trunk/src/org/hyperic/hq/events/server/session/AlertDAO.java =================================================================== --- trunk/src/org/hyperic/hq/events/server/session/AlertDAO.java 2009-12-10 22:31:46 UTC (rev 14070) +++ trunk/src/org/hyperic/hq/events/server/session/AlertDAO.java 2009-12-11 00:14:46 UTC (rev 14071) @@ -254,6 +254,35 @@ return null; } } + + /** + * Return all last unfixed alerts + * + * @return + */ + public Map findAllLastUnfixed() { + String hql = + new StringBuilder() + .append("select a ") + .append("from Alert a ") + .append("join a.alertDefinition ad ") + .append("where ad.deleted = false ") + .append("and a.fixed = false ") + .append("order by a.ctime ") + .toString(); + + List alerts = createQuery(hql).list(); + + Map lastAlerts = new HashMap(alerts.size()); + for (Iterator it=alerts.iterator(); it.hasNext(); ) { + Alert a = (Alert) it.next(); + // since it is ordered by ctime in ascending order, the + // last alert will eventually be put into the map + lastAlerts.put(a.getAlertDefinition().getId(), a); + } + + return lastAlerts; + } /** * Return all last fixed alerts for the given resource Modified: trunk/src/org/hyperic/hq/events/server/session/AlertManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/events/server/session/AlertManagerEJBImpl.java 2009-12-10 22:31:46 UTC (rev 14070) +++ trunk/src/org/hyperic/hq/events/server/session/AlertManagerEJBImpl.java 2009-12-11 00:14:46 UTC (rev 14071) @@ -247,6 +247,29 @@ } /** + * Find all last unfixed alerts + * + * @ejb:interface-method + */ + public Map findAllLastUnfixed() { + StopWatch watch = new StopWatch(); + Map unfixedAlerts = null; + try { + unfixedAlerts = + getAlertDAO().findAllLastUnfixed(); + } catch (Exception e) { + unfixedAlerts = Collections.EMPTY_MAP; + _log.error("Error finding all last unfixed alerts", e); + } finally { + if (_log.isDebugEnabled()) { + _log.debug("findAllLastUnfixed: " + watch); + } + } + + return unfixedAlerts; + } + + /** * Find the last alerts for the given resource * * @ejb:interface-method |
From: <dcr...@hy...> - 2009-12-10 22:31:59
|
Author: dcrutchf Date: 2009-12-10 14:31:46 -0800 (Thu, 10 Dec 2009) New Revision: 14070 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14070 Modified: branches/HQ_4_0_3_1/web/WEB-INF/classes/ApplicationResources.properties Log: Fix for reopened issue Modified: branches/HQ_4_0_3_1/web/WEB-INF/classes/ApplicationResources.properties =================================================================== --- branches/HQ_4_0_3_1/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:21:05 UTC (rev 14069) +++ branches/HQ_4_0_3_1/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:31:46 UTC (rev 14070) @@ -354,6 +354,7 @@ admin.role.users.AssignedUsersTab=Assigned Users # admin.role.add.users=Edit {0}: Assign Users to Role +admin.role.add.groups=Edit {0}: Assign Groups to Role admin.role.groups.GroupsTab=Groups admin.role.groups.AssignToRoleTab=Assign To Role admin.role.groups.NewResourceGroupButton=New Group... |
From: <dcr...@hy...> - 2009-12-10 22:21:19
|
Author: dcrutchf Date: 2009-12-10 14:21:05 -0800 (Thu, 10 Dec 2009) New Revision: 14069 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14069 Modified: branches/HQ_4_1_2_1/web/WEB-INF/classes/ApplicationResources.properties Log: Fix for reopened issue Modified: branches/HQ_4_1_2_1/web/WEB-INF/classes/ApplicationResources.properties =================================================================== --- branches/HQ_4_1_2_1/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:11:12 UTC (rev 14068) +++ branches/HQ_4_1_2_1/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:21:05 UTC (rev 14069) @@ -354,6 +354,7 @@ admin.role.users.AssignedUsersTab=Assigned Users # admin.role.add.users=Edit {0}: Assign Users to Role +admin.role.add.groups=Edit {0}: Assign Groups to Role admin.role.groups.GroupsTab=Groups admin.role.groups.AssignToRoleTab=Assign To Role admin.role.groups.NewResourceGroupButton=New Group... |
From: <dcr...@hy...> - 2009-12-10 22:11:25
|
Author: dcrutchf Date: 2009-12-10 14:11:12 -0800 (Thu, 10 Dec 2009) New Revision: 14068 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14068 Modified: branches/HQ_4_1_4_1/web/WEB-INF/classes/ApplicationResources.properties Log: Fix for reopened issue Modified: branches/HQ_4_1_4_1/web/WEB-INF/classes/ApplicationResources.properties =================================================================== --- branches/HQ_4_1_4_1/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:08:34 UTC (rev 14067) +++ branches/HQ_4_1_4_1/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:11:12 UTC (rev 14068) @@ -354,6 +354,7 @@ admin.role.users.AssignedUsersTab=Assigned Users # admin.role.add.users=Edit {0}: Assign Users to Role +admin.role.add.groups=Edit {0}: Assign Groups to Role admin.role.groups.GroupsTab=Groups admin.role.groups.AssignToRoleTab=Assign To Role admin.role.groups.NewResourceGroupButton=New Group... |
From: <bo...@hy...> - 2009-12-10 22:08:47
|
Author: bob Date: 2009-12-10 14:08:34 -0800 (Thu, 10 Dec 2009) New Revision: 14067 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14067 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: update version to 4.2.0.3 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-10 22:02:36 UTC (rev 14066) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-10 22:08:34 UTC (rev 14067) @@ -1,3 +1,3 @@ #Mon Dec 07 16:34:36 PST 2009 -version=4.2.0.2 +version=4.2.0.3 build=1269 |
From: <dcr...@hy...> - 2009-12-10 22:02:50
|
Author: dcrutchf Date: 2009-12-10 14:02:36 -0800 (Thu, 10 Dec 2009) New Revision: 14066 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14066 Modified: branches/HQ_4_2_0_PATCH/web/WEB-INF/classes/ApplicationResources.properties Log: Fix for reopened issue Modified: branches/HQ_4_2_0_PATCH/web/WEB-INF/classes/ApplicationResources.properties =================================================================== --- branches/HQ_4_2_0_PATCH/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 20:32:01 UTC (rev 14065) +++ branches/HQ_4_2_0_PATCH/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 22:02:36 UTC (rev 14066) @@ -365,6 +365,7 @@ admin.role.users.AssignedUsersTab=Assigned Users # admin.role.add.users=Edit {0}: Assign Users to Role +admin.role.add.groups=Edit {0}: Assign Groups to Role admin.role.groups.GroupsTab=Groups admin.role.groups.AssignToRoleTab=Assign To Role admin.role.groups.NewResourceGroupButton=New Group... |
From: <dcr...@hy...> - 2009-12-10 20:32:16
|
Author: dcrutchf Date: 2009-12-10 12:32:01 -0800 (Thu, 10 Dec 2009) New Revision: 14065 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14065 Modified: trunk/web/WEB-INF/classes/ApplicationResources.properties Log: Fixed reopened bug Modified: trunk/web/WEB-INF/classes/ApplicationResources.properties =================================================================== --- trunk/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 19:01:22 UTC (rev 14064) +++ trunk/web/WEB-INF/classes/ApplicationResources.properties 2009-12-10 20:32:01 UTC (rev 14065) @@ -365,6 +365,7 @@ admin.role.users.AssignedUsersTab=Assigned Users # admin.role.add.users=Edit {0}: Assign Users to Role +admin.role.add.groups=Edit {0}: Assign Groups to Role admin.role.groups.GroupsTab=Groups admin.role.groups.AssignToRoleTab=Assign To Role admin.role.groups.NewResourceGroupButton=New Group... |
From: <bo...@hy...> - 2009-12-10 18:59:46
|
Author: bob Date: 2009-12-10 10:59:26 -0800 (Thu, 10 Dec 2009) New Revision: 14063 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14063 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1284 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-10 18:00:47 UTC (rev 14062) +++ trunk/etc/version.properties 2009-12-10 18:59:26 UTC (rev 14063) @@ -1,3 +1,3 @@ -#Wed Dec 09 00:16:52 PST 2009 +#Thu Dec 10 10:16:33 PST 2009 version=4.3.0 -build=1283 +build=1284 |
From: <dcr...@hy...> - 2009-12-10 18:01:01
|
Author: dcrutchf Date: 2009-12-10 10:00:47 -0800 (Thu, 10 Dec 2009) New Revision: 14062 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14062 Modified: trunk/web/resource/common/monitor/visibility/ParticipatingResourcesSMMR.jsp Log: Missed a jsp in my last check in Modified: trunk/web/resource/common/monitor/visibility/ParticipatingResourcesSMMR.jsp =================================================================== --- trunk/web/resource/common/monitor/visibility/ParticipatingResourcesSMMR.jsp 2009-12-10 17:47:10 UTC (rev 14061) +++ trunk/web/resource/common/monitor/visibility/ParticipatingResourcesSMMR.jsp 2009-12-10 18:00:47 UTC (rev 14062) @@ -1,8 +1,9 @@ -<%@ taglib uri="struts-html-el" prefix="html" %> -<%@ taglib uri="struts-tiles" prefix="tiles" %> -<%@ taglib uri="jstl-fmt" prefix="fmt" %> -<%@ taglib uri="jstl-c" prefix="c" %> -<%@ taglib uri="hq" prefix="hq" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> +<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/tld/hq.tld" prefix="hq" %> + <%-- NOTE: This copyright does *not* cover user programs that use HQ program services by normal system calls through the application |
From: <kp...@hy...> - 2009-12-10 17:47:20
|
Author: kparikh Date: 2009-12-10 09:47:10 -0800 (Thu, 10 Dec 2009) New Revision: 14061 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14061 Added: tags/HQ_4_2_0_PATCH2/ Log: Tag for 4.2.0.2 patch Copied: tags/HQ_4_2_0_PATCH2 (from rev 14058, branches/HQ_4_2_0_PATCH) |
From: <bo...@hy...> - 2009-12-09 08:58:30
|
Author: bob Date: 2009-12-09 00:58:17 -0800 (Wed, 09 Dec 2009) New Revision: 14059 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14059 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1283 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-08 23:47:21 UTC (rev 14058) +++ trunk/etc/version.properties 2009-12-09 08:58:17 UTC (rev 14059) @@ -1,3 +1,3 @@ -#Tue Dec 08 00:16:46 PST 2009 +#Wed Dec 09 00:16:52 PST 2009 version=4.3.0 -build=1282 +build=1283 |
From: <sc...@hy...> - 2009-12-08 23:47:32
|
Author: scottmf Date: 2009-12-08 15:47:21 -0800 (Tue, 08 Dec 2009) New Revision: 14058 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14058 Modified: branches/HQ_4_2_0_PATCH/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java Log: updated easymock to make sure that it uses the correct api from dataManager Modified: branches/HQ_4_2_0_PATCH/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java =================================================================== --- branches/HQ_4_2_0_PATCH/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java 2009-12-08 23:44:42 UTC (rev 14057) +++ branches/HQ_4_2_0_PATCH/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java 2009-12-08 23:47:21 UTC (rev 14058) @@ -82,7 +82,7 @@ private static final Integer MEASUREMENT_ID = Integer.valueOf(45); - private List measurements = new ArrayList(); + private Measurement measurement = new Measurement(); private MeasurementManagerLocalHome measurementManagerLocalHome = new MockMeasurementManagerLocalHome(); @@ -110,7 +110,6 @@ this.alertConditionEvaluator = EasyMock.createMock(AlertConditionEvaluator.class); this.measurementManagerLocal = EasyMock.createMock(MeasurementManagerLocal.class); this.dataManagerLocal = EasyMock.createMock(DataManagerLocal.class); - measurements.add(new Measurement()); // set the initial context factory MockContextFactory.setAsInitial(); // now register this EJB in the JNDI @@ -146,8 +145,7 @@ */ public void testInitializeNoLastValue() throws EncodingException, InvalidTriggerDataException { EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(new HashMap()); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(null); replay(); initTrigger(); verify(); @@ -189,10 +187,7 @@ MeasurementEvent event = new MeasurementEvent(3, metricValue); EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); - initialValues.put(MEASUREMENT_ID, new MetricValue(2)); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(new MetricValue(2)); replay(); initTrigger(); try { @@ -212,10 +207,7 @@ */ public void testProcessEventWrongType() throws EncodingException, InvalidTriggerDataException { EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); - initialValues.put(MEASUREMENT_ID, new MetricValue(2)); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(new MetricValue(2)); replay(); initTrigger(); try { @@ -237,11 +229,8 @@ { // initial measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(2d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); @@ -278,11 +267,8 @@ public void testProcessValueChanged() throws EventTypeException, EncodingException, InvalidTriggerDataException { // initial measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(2d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); @@ -322,11 +308,8 @@ { // initial value - measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(2d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // event occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); @@ -353,11 +336,8 @@ public void testProcessValueSame() throws EventTypeException, EncodingException, InvalidTriggerDataException { // initial measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(10d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); |
From: <sc...@hy...> - 2009-12-08 23:44:58
|
Author: scottmf Date: 2009-12-08 15:44:42 -0800 (Tue, 08 Dec 2009) New Revision: 14057 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14057 Modified: trunk/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java Log: updated easymock to make sure that it uses the correct api from dataManager Modified: trunk/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java =================================================================== --- trunk/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java 2009-12-08 23:21:04 UTC (rev 14056) +++ trunk/unittest/src/org/hyperic/hq/bizapp/server/trigger/conditional/ValueChangeTriggerTest.java 2009-12-08 23:44:42 UTC (rev 14057) @@ -82,7 +82,7 @@ private static final Integer MEASUREMENT_ID = Integer.valueOf(45); - private List measurements = new ArrayList(); + private Measurement measurement = new Measurement(); private MeasurementManagerLocalHome measurementManagerLocalHome = new MockMeasurementManagerLocalHome(); @@ -110,7 +110,6 @@ this.alertConditionEvaluator = EasyMock.createMock(AlertConditionEvaluator.class); this.measurementManagerLocal = EasyMock.createMock(MeasurementManagerLocal.class); this.dataManagerLocal = EasyMock.createMock(DataManagerLocal.class); - measurements.add(new Measurement()); // set the initial context factory MockContextFactory.setAsInitial(); // now register this EJB in the JNDI @@ -146,8 +145,7 @@ */ public void testInitializeNoLastValue() throws EncodingException, InvalidTriggerDataException { EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(new HashMap()); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(null); replay(); initTrigger(); verify(); @@ -189,10 +187,7 @@ MeasurementEvent event = new MeasurementEvent(3, metricValue); EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); - initialValues.put(MEASUREMENT_ID, new MetricValue(2)); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(new MetricValue(2)); replay(); initTrigger(); try { @@ -212,10 +207,7 @@ */ public void testProcessEventWrongType() throws EncodingException, InvalidTriggerDataException { EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); - initialValues.put(MEASUREMENT_ID, new MetricValue(2)); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(new MetricValue(2)); replay(); initTrigger(); try { @@ -237,11 +229,8 @@ { // initial measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(2d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); @@ -278,11 +267,8 @@ public void testProcessValueChanged() throws EventTypeException, EncodingException, InvalidTriggerDataException { // initial measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(2d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); @@ -322,11 +308,8 @@ { // initial value - measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(2d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // event occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); @@ -353,11 +336,8 @@ public void testProcessValueSame() throws EventTypeException, EncodingException, InvalidTriggerDataException { // initial measurement read 10 minutes ago EasyMock.expect(measurementManagerLocal.getMeasurement(MEASUREMENT_ID)).andReturn(new Measurement()); - Map initialValues = new HashMap(); MetricValue initialValue = new MetricValue(10d, System.currentTimeMillis() - (10 * 60 * 1000l)); - initialValues.put(MEASUREMENT_ID, initialValue); - EasyMock.expect(dataManagerLocal.getLastDataPoints(measurements, MeasurementConstants.TIMERANGE_UNLIMITED)) - .andReturn(initialValues); + EasyMock.expect(dataManagerLocal.getLastHistoricalData(measurement)).andReturn(initialValue); // occurred 5 minutes ago MetricValue metricValue = new MetricValue(10d, System.currentTimeMillis() - (5 * 60 * 1000l)); |
From: <pn...@hy...> - 2009-12-08 23:21:19
|
Author: pnguyen Date: 2009-12-08 15:21:04 -0800 (Tue, 08 Dec 2009) New Revision: 14056 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14056 Added: trunk/src/org/hyperic/hq/appdef/server/session/AsyncDeleteAgentCache.java Modified: trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java Log: [HHQ-3584, HHQ-3585] Disable the measurements for the "root" resource (the resource that was selected by the user); Temporarily cache the "lost" agent information so that this information can be used during the asynchronous delete process to unschedule metrics. These changes may be refactored later in HHQ-3598. Added: trunk/src/org/hyperic/hq/appdef/server/session/AsyncDeleteAgentCache.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/AsyncDeleteAgentCache.java (rev 0) +++ trunk/src/org/hyperic/hq/appdef/server/session/AsyncDeleteAgentCache.java 2009-12-08 23:21:04 UTC (rev 14056) @@ -0,0 +1,92 @@ +/* + * 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-2009], 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.appdef.server.session; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.hyperic.hq.appdef.shared.AppdefEntityID; + +/** + * This class is used during the aynchronous delete process + * to unschedule metrics. It is an in-memory map of resources + * and its agent because that info no longer exists in the DB. + */ +public class AsyncDeleteAgentCache { + private Log log = LogFactory.getLog(AsyncDeleteAgentCache.class); + + private final Map _cache; + + private static final AsyncDeleteAgentCache singleton = + new AsyncDeleteAgentCache(); + + private AsyncDeleteAgentCache() { + _cache = Collections.synchronizedMap(new HashMap()); + } + + /** + * + * @param key The AppdefEntityID of the async deleted resource + * @return Integer The agentId of the async deleted resource + */ + public Integer get(AppdefEntityID key) { + return (Integer) _cache.get(key); + } + + /** + * + * @param key The AppdefEntityID of the async deleted resource + * @param Integer The agentId of the async deleted resource + */ + public void put(AppdefEntityID key, Integer value) { + _cache.put(key, value); + } + + public void remove(AppdefEntityID key) { + _cache.remove(key); + } + + public void clear() { + _cache.clear(); + } + + public int getSize() { + return _cache.size(); + } + + public String toString() { + return _cache.toString(); + } + + public static AsyncDeleteAgentCache getInstance() { + return singleton; + } + +} Modified: trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java 2009-12-08 23:08:55 UTC (rev 14055) +++ trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java 2009-12-08 23:21:04 UTC (rev 14056) @@ -58,6 +58,7 @@ import org.hyperic.hq.appdef.server.session.AppdefResourceType; import org.hyperic.hq.appdef.server.session.Application; import org.hyperic.hq.appdef.server.session.ApplicationType; +import org.hyperic.hq.appdef.server.session.AsyncDeleteAgentCache; import org.hyperic.hq.appdef.server.session.CPropResource; import org.hyperic.hq.appdef.server.session.CPropResourceSortField; import org.hyperic.hq.appdef.server.session.Cprop; @@ -1345,7 +1346,7 @@ switch (aeid.getType()) { case AppdefEntityConstants.APPDEF_TYPE_SERVER : final ServerManagerLocal sMan = getServerManager(); - sMan.removeServer(subject, sMan.findServerById(id)); + removeServer(subject, sMan.findServerById(id)); break; case AppdefEntityConstants.APPDEF_TYPE_PLATFORM: final PlatformManagerLocal pMan = getPlatformManager(); @@ -1353,7 +1354,7 @@ break; case AppdefEntityConstants.APPDEF_TYPE_SERVICE : final ServiceManagerLocal svcMan = getServiceManager(); - svcMan.removeService(subject, svcMan.findServiceById(id)); + removeService(subject, svcMan.findServiceById(id)); break; case AppdefEntityConstants.APPDEF_TYPE_GROUP: final ResourceGroupManagerLocal rgMan = @@ -1392,9 +1393,15 @@ */ public void removeDeletedResources() throws ApplicationException, VetoException, RemoveException { + final boolean debug = log.isDebugEnabled(); final StopWatch watch = new StopWatch(); final AuthzSubject subject = getAuthzSubjectManager().findSubjectById(AuthzConstants.overlordId); + + AsyncDeleteAgentCache cache = AsyncDeleteAgentCache.getInstance(); + if (debug) { + log.debug("AsyncDeleteAgentCache start size=" + cache.getSize()); + } watch.markTimeBegin("removeApplications"); Collection applications = @@ -1408,7 +1415,7 @@ } } watch.markTimeEnd("removeApplications"); - if (log.isDebugEnabled()) { + if (debug) { log.debug("Removed " + applications.size() + " applications"); } @@ -1422,19 +1429,36 @@ } } watch.markTimeEnd("removeResourceGroups"); - if (log.isDebugEnabled()) { + if (debug) { log.debug("Removed " + groups.size() + " resource groups"); } // Look through services, servers, platforms, applications, and groups + watch.markTimeBegin("removeServices"); Collection services = getServiceManager().findDeletedServices(); removeServices(subject, services); + watch.markTimeEnd("removeServices"); + watch.markTimeBegin("removeServers"); Collection servers = getServerManager().findDeletedServers(); removeServers(subject, servers); + watch.markTimeEnd("removeServers"); watch.markTimeBegin("removePlatforms"); Collection platforms = getPlatformManager().findDeletedPlatforms(); + removePlatforms(subject, platforms); + watch.markTimeEnd("removePlatforms"); + + if (debug) { + log.debug("removeDeletedResources: " + watch); + log.debug("AsyncDeleteAgentCache end size=" + cache.getSize()); + if (cache.getSize() > 0) { + log.debug("AsyncDeleteAgentCache " + cache); + } + } + } + + private final void removePlatforms(AuthzSubject subject, Collection platforms) { for (final Iterator it = platforms.iterator(); it.hasNext(); ) { final Platform platform = (Platform)it.next(); try { @@ -1444,11 +1468,9 @@ log.error("Unable to remove platform: " + e, e); } } - watch.markTimeEnd("removePlatforms"); if (log.isDebugEnabled()) { log.debug("Removed " + platforms.size() + " platforms"); - log.debug("removeDeletedResources() timing: " + watch); - } + } } private final void removeServers(AuthzSubject subject, Collection servers) { @@ -1471,7 +1493,7 @@ } watch.markTimeEnd("removeServers"); if (log.isDebugEnabled()) { - log.debug("Removed " + servers.size() + " services"); + log.debug("Removed " + servers.size() + " servers: " + watch); } } @@ -1494,21 +1516,11 @@ } watch.markTimeEnd("removeServices"); if (log.isDebugEnabled()) { - log.debug("Removed " + services.size() + " services"); + log.debug("Removed " + services.size() + " services: " + watch); } } /** - * Disable all measurements for a resource - * @param id the resource's ID - */ - private void disableMeasurements(AuthzSubject subject, Resource res) - throws PermissionException - { - getMetricManager().disableMeasurements(subject, res); - } - - /** * Remove config and track plugins for a given resource */ private void removeTrackers(AuthzSubject subject, AppdefEntityID id) @@ -1553,14 +1565,27 @@ public void removePlatform(AuthzSubject subject, Platform platform) throws ApplicationException, VetoException { + boolean debug = log.isDebugEnabled(); + StopWatch watch = new StopWatch(); + try { + // Update cache for asynchronous delete process + if (debug) watch.markTimeBegin("buildAsyncDeleteAgentCache"); + buildAsyncDeleteAgentCache(platform); + if (debug) watch.markTimeEnd("buildAsyncDeleteAgentCache"); + // Disable all measurements for this platform. We don't actually // remove the measurements here to avoid delays in deleting // resources. - disableMeasurements(subject, platform.getResource()); - + if (debug) watch.markTimeBegin("disableMeasurements"); + getMetricManager().disableMeasurements( + subject, platform.getResource(), true); + if (debug) watch.markTimeEnd("disableMeasurements"); + // Remove from AI queue try { + if (debug) watch.markTimeBegin("removeFromAIQ"); + List aiplatformList = new ArrayList(); Integer platformID = platform.getId(); final AIQueueManagerLocal aiMan = getAIManager(); @@ -1573,6 +1598,7 @@ aiMan.processQueue(subject, aiplatformList, null, null, AIQueueConstants.Q_DECISION_PURGE); } + if (debug) watch.markTimeEnd("removeFromAIQ"); } catch (AIQApprovalException e) { log.error("Error removing from AI queue", e); } catch (FinderException e) { @@ -1580,7 +1606,9 @@ } // now, remove the platform. + if (debug) watch.markTimeBegin("removePlatform"); getPlatformManager().removePlatform(subject, platform); + if (debug) watch.markTimeEnd("removePlatform"); } catch (RemoveException e) { log.error("Caught EJB RemoveException",e); throw new SystemException(e); @@ -1588,18 +1616,36 @@ log.error("Caught PermissionException while removing platform: " + platform.getId(),e); throw e; + } finally { + if (debug) { + log.debug("removePlatform[id=" + platform.getId() + "]: " + watch); + } } } private void removeServer(AuthzSubject subject, Server server) - throws PermissionException, - VetoException { + throws PermissionException, VetoException + { + boolean debug = log.isDebugEnabled(); + StopWatch watch = new StopWatch(); + try { + // Update cache for asynchronous delete process + if (debug) watch.markTimeBegin("buildAsyncDeleteAgentCache"); + buildAsyncDeleteAgentCache(server); + if (debug) watch.markTimeEnd("buildAsyncDeleteAgentCache"); + // now remove the measurements - disableMeasurements(subject, server.getResource()); + if (debug) watch.markTimeBegin("disableMeasurements"); + getMetricManager().disableMeasurements( + subject, server.getResource(), true); + if (debug) watch.markTimeEnd("disableMeasurements"); + try { + if (debug) watch.markTimeBegin("toggleRuntimeScan"); getAutoInventoryManager().toggleRuntimeScan( getOverlord(), server.getEntityId(), false); + if (debug) watch.markTimeEnd("toggleRuntimeScan"); } catch (ResourceDeletedException e) { log.debug(e); } catch (AutoinventoryException e) { @@ -1609,8 +1655,11 @@ log.error("Unexpected error turning off RuntimeScan for: " + server + " (handled gracefully).", e); } + // finally, remove the server + if (debug) watch.markTimeBegin("removeServer"); getServerManager().removeServer(subject, server); + if (debug) watch.markTimeEnd("removeServer"); } catch (RemoveException e) { rollback(); throw new SystemException(e); @@ -1619,10 +1668,68 @@ log.error("Caught permission exception: [server:" + server.getId() + "]"); throw (PermissionException) e; + } finally { + if (debug) { + log.debug("removeServer[id=" + server.getId() + "]: " + watch); + } } } + + private void buildAsyncDeleteAgentCache(Server server) { + AsyncDeleteAgentCache cache = AsyncDeleteAgentCache.getInstance(); + + try { + Agent agent = findResourceAgent(server.getEntityId()); + + for (Iterator i=server.getServices().iterator(); i.hasNext(); ) { + Service s = (Service)i.next(); + AppdefEntityID eid = s.getEntityId(); + cache.put(eid, agent.getId()); + } + } catch (AgentNotFoundException anfe) { + if (cache.get(server.getEntityId()) == null) { + if (!server.getServerType().isVirtual()) { + log.warn("Unable to build AsyncDeleteAgentCache for server[id=" + + server.getId() + + ", name=" + server.getName() + "]: " + + anfe.getMessage()); + } + } else { + log.debug("Platform has been asynchronously deleted: " + + anfe.getMessage()); + } + } catch (Exception e) { + log.warn("Unable to build AsyncDeleteAgentCache for server[id=" + + server.getId() + + ", name=" + server.getName() + "]: " + + e.getMessage()); + } + } + private void buildAsyncDeleteAgentCache(Platform platform) { + AsyncDeleteAgentCache cache = AsyncDeleteAgentCache.getInstance(); + + try { + Agent agent = platform.getAgent(); + + for (Iterator i=platform.getServers().iterator(); i.hasNext(); ) { + Server s = (Server)i.next(); + if (!s.getServerType().isVirtual()) { + AppdefEntityID eid = s.getEntityId(); + cache.put(eid, agent.getId()); + } + buildAsyncDeleteAgentCache(s); + } + } catch (Exception e) { + log.warn("Unable to build AsyncDeleteAgentCache for platform[id=" + + platform.getId() + + ", name=" + platform.getName() + "]: " + + e.getMessage()); } + } + /** + * Used only during the asynchronous delete process. + * * @ejb:transaction type="RequiresNew" * @ejb:interface-method */ @@ -1632,16 +1739,13 @@ removeServer(subject, server); } - /** - * @ejb:transaction type="RequiresNew" - * @ejb:interface-method - */ - public void _removeServiceInNewTran(AuthzSubject subject, Service service) + private void removeService(AuthzSubject subject, Service service) throws VetoException, PermissionException, RemoveException { try { // now remove any measurements associated with the service - disableMeasurements(subject, service.getResource()); + getMetricManager().disableMeasurements( + subject, service.getResource(), true); removeTrackers(subject, service.getEntityId()); getServiceManager().removeService(subject, service); } catch (PermissionException e) { @@ -1652,6 +1756,18 @@ throw (RemoveException) e; } } + + /** + * Used only during the asynchronous delete process. + * + * @ejb:transaction type="RequiresNew" + * @ejb:interface-method + */ + public void _removeServiceInNewTran(AuthzSubject subject, Service service) + throws VetoException, PermissionException, RemoveException + { + removeService(subject, service); + } /** * @ejb:transaction type="RequiresNew" @@ -3999,7 +4115,11 @@ } /** @ejb:create-method */ - public void ejbCreate() throws CreateException {} + public void ejbCreate() throws CreateException { + if (log.isDebugEnabled()) { + log.debug("ejbCreate called on " + this); + } + } public void ejbRemove() {} public void ejbActivate() {} Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2009-12-08 23:08:55 UTC (rev 14055) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementManagerEJBImpl.java 2009-12-08 23:21:04 UTC (rev 14056) @@ -1183,12 +1183,42 @@ * * @ejb:interface-method */ - public void disableMeasurements(AuthzSubject subject, Resource res) - throws PermissionException { - List mcol = getMeasurementDAO().findEnabledByResource(res); + public void disableMeasurements(AuthzSubject subject, Resource res) + throws PermissionException + { + disableMeasurements(subject, res, false); + } + + /** + * Disable all Measurements for a resource + * + * @ejb:interface-method + */ + public void disableMeasurements(AuthzSubject subject, + Resource res, + boolean isAsyncDelete) + throws PermissionException + { + List mcol = null; - if (mcol.size() == 0) + if (isAsyncDelete) { + // For asynchronous deletes, we need to get all measurements + // because some disabled measurements are not unscheduled + // from the agent (like during the maintenance window) and + // we need to unschedule these measurements + mcol = findMeasurements(subject, res); + } else { + mcol = getMeasurementDAO().findEnabledByResource(res); + } + + if (mcol.size() == 0) { + if (log.isDebugEnabled()) { + log.debug("No measurements to disable for resourceId=" + + res.getId() + + ", isAsyncDelete=" + isAsyncDelete); + } return; + } Integer[] mids = new Integer[mcol.size()]; Iterator it = mcol.iterator(); Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java 2009-12-08 23:08:55 UTC (rev 14055) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java 2009-12-08 23:21:04 UTC (rev 14056) @@ -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-2009], Hyperic, Inc. * This file is part of HQ. * * HQ is free software; you can redistribute it and/or modify @@ -41,6 +41,7 @@ import org.hyperic.hq.agent.AgentRemoteException; import org.hyperic.hq.appdef.Agent; import org.hyperic.hq.appdef.server.session.AgentManagerEJBImpl; +import org.hyperic.hq.appdef.server.session.AsyncDeleteAgentCache; import org.hyperic.hq.appdef.shared.AgentManagerLocal; import org.hyperic.hq.appdef.shared.AgentNotFoundException; import org.hyperic.hq.appdef.shared.AppdefEntityID; @@ -118,20 +119,33 @@ */ private Map getAgentMap(List aeids) { AgentManagerLocal aMan = AgentManagerEJBImpl.getOne(); + AsyncDeleteAgentCache cache = AsyncDeleteAgentCache.getInstance(); Map rtn = new HashMap(aeids.size()); List tmp; for (Iterator it=aeids.iterator(); it.hasNext(); ) { AppdefEntityID eid = (AppdefEntityID)it.next(); - Integer agentId; + Integer agentId = null; try { agentId = aMan.getAgent(eid).getId(); + } catch (AgentNotFoundException e) { + // HHQ-3585: It may be in an asynchronous + // delete state, so check the cache + agentId = cache.get(eid); + + if (agentId == null) { + log.warn(e.getMessage()); + } else { + // No longer needed, remove from cache + cache.remove(eid); + } + } + + if (agentId != null) { if (null == (tmp = (List)rtn.get(agentId))) { tmp = new ArrayList(); rtn.put(agentId, tmp); } tmp.add(eid); - } catch (AgentNotFoundException e) { - log.warn(e.getMessage()); } } return rtn; |
From: <pn...@hy...> - 2009-12-08 23:09:11
|
Author: pnguyen Date: 2009-12-08 15:08:55 -0800 (Tue, 08 Dec 2009) New Revision: 14055 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14055 Modified: trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementSchedule.java Log: [HHQ-3585] Add debug logging when removing a scheduled measurement Modified: trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementSchedule.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementSchedule.java 2009-12-08 22:55:48 UTC (rev 14054) +++ trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementSchedule.java 2009-12-08 23:08:55 UTC (rev 14055) @@ -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-2009], Hyperic, Inc. * This file is part of HQ. * * HQ is free software; you can redistribute it and/or modify @@ -219,6 +219,7 @@ } void removeSRN(AppdefEntityID ent) throws AgentStorageException { + boolean debug = this.log.isDebugEnabled(); boolean toWrite = false, found = false; synchronized (this.srnList) { @@ -233,8 +234,14 @@ } } - if (!found && this.log.isDebugEnabled()) { - this.log.debug("SRN for entity " + ent + " not found"); + if (found) { + if (debug) { + this.log.debug("SRN for entity " + ent + " removed"); + } + } else { + if (debug) { + this.log.debug("SRN for entity " + ent + " not found"); + } } if (toWrite) { @@ -256,6 +263,7 @@ void deleteMeasurements(AppdefEntityID ent) throws AgentStorageException { + boolean debug = this.log.isDebugEnabled(); Iterator i; i = this.store.getListIterator(MeasurementSchedule.PROP_MSCHED); @@ -264,12 +272,14 @@ ScheduledMeasurement meas; if((meas = ScheduledMeasurement.decode(value)) == null){ - this.log.error("Unable to decode metric from storage, nuking"); + this.log.error("Unable to decode metric from storage, " + + "removing metric for entity " + ent); i.remove(); continue; } if(meas.getEntity().equals(ent)){ + this.log.debug("Removing scheduled measurement " + meas); i.remove(); } } |
From: <pn...@hy...> - 2009-12-08 22:56:02
|
Author: pnguyen Date: 2009-12-08 14:55:48 -0800 (Tue, 08 Dec 2009) New Revision: 14054 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14054 Modified: trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementCommandsServer.java Log: [HHQ-2741] Output the agent schedule to the agent.log during agent startup and agent shutdown Modified: trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementCommandsServer.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementCommandsServer.java 2009-12-08 20:09:01 UTC (rev 14053) +++ trunk/src/org/hyperic/hq/measurement/agent/server/MeasurementCommandsServer.java 2009-12-08 22:55:48 UTC (rev 14054) @@ -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-2009], Hyperic, Inc. * This file is part of HQ. * * HQ is free software; you can redistribute it and/or modify @@ -206,8 +206,9 @@ this.storage = agent.getStorageProvider(); this.bootConfig = agent.getBootConfig(); this.schedStorage = new MeasurementSchedule(this.storage, bootConfig.getBootProperties()); + logMeasurementSchedule(this.schedStorage); } catch(AgentRunningException exc){ - throw new AgentAssertionException("Agent should be running here"); + throw new AgentAssertionException("Agent should be running here", exc); } try { @@ -319,9 +320,40 @@ } } } + + private void logMeasurementSchedule(MeasurementSchedule sched) { + if (this.log.isDebugEnabled()) { + try { + Iterator scheduleIter = sched.getMeasurementList(); + int scheduleSize = 0; + + while (scheduleIter.hasNext()) { + ScheduledMeasurement metric = (ScheduledMeasurement) scheduleIter.next(); + if (metric != null) { + scheduleSize++; + StringBuffer s = new StringBuffer("Measurement Schedule[") + .append(scheduleSize) + .append("]: entityId=").append(metric.getEntity()) + .append(", category=").append(metric.getCategory()) + .append(", interval=").append(metric.getInterval()) + .append(", derivedId=").append(metric.getDerivedID()) + .append(", dsnId=").append(metric.getDsnID()) + .append(", dsn=").append(metric.getDSN()); + + this.log.debug(s.toString()); + } + } + this.log.debug("Measurement schedule list size=" + scheduleSize); + } catch (Exception e) { + this.log.error("Error displaying measurement schedule: " + e.getMessage(), e); + } + } + } public void shutdown(){ this.log.info("Measurement Commands Server shutting down"); + logMeasurementSchedule(this.schedStorage); + this.scheduleObject.die(); this.senderObject.die(); |
Author: dcrutchf Date: 2009-12-08 12:09:01 -0800 (Tue, 08 Dec 2009) New Revision: 14053 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14053 Added: trunk/thirdparty/lib/snmp4j-1.10.2.jar Removed: trunk/thirdparty/lib/snmp4j.jar Modified: trunk/.classpath trunk/build.xml trunk/plugins/netservices/etc/hq-plugin.xml trunk/src/org/hyperic/hq/bizapp/server/session/EventLogBossEJBImpl.java trunk/src/org/hyperic/hq/bizapp/shared/action/SnmpActionConfig.java trunk/src/org/hyperic/hq/ui/RenditFilter.java trunk/src/org/hyperic/hq/ui/json/action/escalation/crud/SaveAction.java trunk/src/org/hyperic/hq/ui/pages/SignIn.java trunk/src/org/hyperic/hq/ui/servlet/RenditServlet.java trunk/src/org/hyperic/hq/ui/taglib/display/ConditionalLinkDecorator.java trunk/src/org/hyperic/hq/ui/util/BizappUtils.java trunk/web/admin/config/ViewEscalation.jsp trunk/web/resource/common/monitor/alerts/config/ViewEscalation.jsp Log: SNMPv3 Changes - functionally incomplete but checked in needed for integration purposes Be sure to update hq/hq-ee dependencies to use update snmp4j library Modified: trunk/.classpath =================================================================== --- trunk/.classpath 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/.classpath 2009-12-08 20:09:01 UTC (rev 14053) @@ -39,6 +39,7 @@ <classpathentry kind="src" path="plugins/tomcat/src"/> <classpathentry kind="src" path="plugins/vim/src"/> <classpathentry kind="lib" path="plugins/vim/lib/mo.jar"/> + <classpathentry kind="lib" path="thirdparty/lib/tomcat-jk.jar"/> <classpathentry kind="src" path="plugins/vmware/src"/> <classpathentry kind="src" path="plugins/weblogic/doc"/> <classpathentry kind="src" path="plugins/weblogic/src"/> @@ -135,7 +136,6 @@ <classpathentry kind="lib" path="thirdparty/lib/quartz-1.6.5.jar"/> <classpathentry kind="lib" path="thirdparty/lib/quartz-jboss-1.6.5.jar"/> <classpathentry kind="lib" path="thirdparty/lib/quartz-oracle-1.6.5.jar"/> - <classpathentry kind="lib" path="thirdparty/lib/snmp4j.jar"/> <classpathentry kind="lib" path="thirdparty/lib/standard.jar"/> <classpathentry kind="lib" path="thirdparty/lib/struts-el.jar"/> <classpathentry kind="lib" path="thirdparty/lib/struts.jar"/> @@ -160,11 +160,6 @@ <classpathentry kind="lib" path="thirdparty/lib/tapestry/tapestry-portlet-4.1.5.jar"/> <classpathentry kind="lib" path="thirdparty/lib/tapestry/tapestry-prop-1.0.0.jar"/> <classpathentry kind="lib" path="thirdparty/lib/tapestry/tapestry-test-4.1.4-JUnit.jar"/> - <classpathentry kind="lib" path="thirdparty/lib/tomcat-jk.jar"/> - <classpathentry kind="lib" path="thirdparty/lib/tomcat/tomcat-coyote.jar"/> - <classpathentry kind="lib" path="thirdparty/lib/tomcat/tomcat-http11.jar"/> - <classpathentry kind="lib" path="thirdparty/lib/tomcat/tomcat-jk2.jar"/> - <classpathentry kind="lib" path="thirdparty/lib/tomcat/tomcat-util.jar"/> <classpathentry kind="lib" path="thirdparty/lib/urlrewrite-3.1.0.jar"/> <classpathentry kind="lib" path="thirdparty/lib/velocity-1.3.1.jar"/> <classpathentry kind="lib" path="thirdparty/lib/ws-commons-util-1.0.2.jar"/> @@ -214,7 +209,7 @@ <classpathentry kind="var" path="JBOSS_HOME/server/default/lib/jboss-jsr77.jar"/> <classpathentry kind="var" path="JBOSS_HOME/lib/jboss-system.jar"/> <classpathentry kind="var" path="JBOSS_HOME/server/default/lib/jboss.jar"/> - <classpathentry kind="var" path="JBOSS_HOME/server/default/deploy/jboss-web.deployer/jbossweb.jar"/> + <classpathentry kind="var" path="JBOSS_HOME/server/default/deploy/jboss-web.deployer/jbossweb.jar" sourcepath="/DOWNLOADS/apache-tomcat-6.0.13-src/java"/> <classpathentry kind="lib" path="thirdparty/lib/tomcat/catalina.jar"/> <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> <classpathentry kind="var" path="JBOSS_HOME/server/default/lib/jboss-j2ee.jar"/> @@ -222,5 +217,6 @@ <classpathentry kind="lib" path="thirdparty/lib/com.springsource.com.sun.xml.bind-2.1.7.jar"/> <classpathentry kind="lib" path="thirdparty/lib/com.springsource.javax.xml.bind-2.1.7.jar"/> <classpathentry kind="lib" path="thirdparty/lib/com.springsource.javax.xml.stream-1.0.1.jar"/> + <classpathentry kind="lib" path="thirdparty/lib/snmp4j-1.10.2.jar"/> <classpathentry kind="output" path="build/classes"/> </classpath> Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/build.xml 2009-12-08 20:09:01 UTC (rev 14053) @@ -461,7 +461,7 @@ <include name="quartz-1.6.5.jar" /> <include name="quartz-oracle-1.6.5.jar" /> <include name="quartz-jboss-1.6.5.jar" /> - <include name="snmp4j.jar" /> + <include name="snmp4j-1.10.2.jar" /> <include name="dnsjava-2.0.3.jar" /> <include name="ehcache-1.5.0.jar" /> <include name="jsr107cache-1.0.jar" /> <!-- EHCache 1.5 dep --> @@ -973,7 +973,7 @@ <include name="commons-logging.jar" /> <include name="log4j-1.2.14.jar" /> <include name="jakarta-oro*.jar" /> <!-- RT --> - <include name="snmp4j.jar" /> <!-- All SNMP monitoring --> + <include name="snmp4j-1.10.2.jar" /> <!-- All SNMP monitoring --> <include name="ant.jar" /> <!-- AI scans + util.TokenReplacer --> <include name="junit-3.8.jar" /> <!-- test to help with support issues --> <include name="junit-4.4.jar" /> Modified: trunk/plugins/netservices/etc/hq-plugin.xml =================================================================== --- trunk/plugins/netservices/etc/hq-plugin.xml 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/plugins/netservices/etc/hq-plugin.xml 2009-12-08 20:09:01 UTC (rev 14053) @@ -250,7 +250,8 @@ <option name="snmpCommunity" description="SNMP Community" - default="public"/> + default="public" + optional="true"/> <option name="snmpUser" description="SNMP username (v3 only)" @@ -265,11 +266,32 @@ <option name="snmpAuthType" description="SNMP auth type (v3 only)" - optional="true" - type="enum"> - <include name="md5"/> - <include name="sha"/> + type="enum" + optional="true"> + <include name="none" /> + <include name="MD5"/> + <include name="SHA"/> </option> + <option name="snmpAuthPassPhrase" + description="SNMP auth passphrase (v3 only)" + optional="true"/> + <option name="snmpPrivacyType" + description="SNMP privacy type (v3 only)" + type="enum" + optional="true"> + <include name="none" /> + <include name="DES" /> + <include name="3DES" /> + <include name="AES-128" /> + <include name="AES-192" /> + <include name="AES-256" /> + </option> + <option name="snmpPrivacyPassPhrase" + description="SNMP privacy passphrase (v3 only)" + optional="true"/> + <option name="snmpSecurityContext" + description="SNMP security context (v3 only)" + optional="true"/> </config> <!-- disabled by default, change to true for testing --> Modified: trunk/src/org/hyperic/hq/bizapp/server/session/EventLogBossEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/server/session/EventLogBossEJBImpl.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/bizapp/server/session/EventLogBossEJBImpl.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -43,8 +43,6 @@ import org.hyperic.hq.application.HQApp; import org.hyperic.hq.common.VetoException; import org.hyperic.hq.common.SystemException; -import org.hyperic.hq.bizapp.shared.EventsBossLocal; -import org.hyperic.hq.bizapp.shared.EventsBossUtil; import org.hyperic.hq.bizapp.shared.EventLogBossLocal; import org.hyperic.hq.bizapp.shared.EventLogBossUtil; import org.apache.commons.logging.Log; Modified: trunk/src/org/hyperic/hq/bizapp/shared/action/SnmpActionConfig.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/shared/action/SnmpActionConfig.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/bizapp/shared/action/SnmpActionConfig.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -12,40 +12,45 @@ protected static final String CFG_OID = "oid"; protected static final String CFG_ADDRESS = "address"; - protected String _oid; - protected String _address; + protected static final String CFG_NOTIFICATION_MECHANISM = "snmpNotificationMechanism"; + + protected String oid; + protected String address; + protected String snmpNotificationMechanism; + private String implementor = "com.hyperic.hq.bizapp.server.action.alert.SnmpAction"; public SnmpActionConfig() { } - public SnmpActionConfig(String address, String oid) { - _address = address; - _oid = oid; + public SnmpActionConfig(String address, String oid, String snmpNotificationMechanism) { + this.address = address; + this.oid = oid; + this.snmpNotificationMechanism = snmpNotificationMechanism; } public void setOid(String oid) { - _oid = oid; + this.oid = oid; } public String getOid() { - return _oid; + return oid; } public void setAddress(String address) { - _address = address; + this.address = address; } public String getAddress() { - return _address; + return address; } /* (non-Javadoc) * @see org.hyperic.hq.events.ActionConfigInterface#getConfigSchema() */ public ConfigSchema getConfigSchema() { - StringConfigOption address, oid; + StringConfigOption address, oid, snmpNotificationMechanism; ConfigSchema res = new ConfigSchema(); address = new StringConfigOption(CFG_ADDRESS, @@ -57,14 +62,21 @@ oid.setMinLength(1); res.addOption(oid); + snmpNotificationMechanism = new StringConfigOption(CFG_NOTIFICATION_MECHANISM, "SNMP Notification Mechanism", "v1 Trap"); + snmpNotificationMechanism.setMinLength(1); + res.addOption(snmpNotificationMechanism); + return res; } public ConfigResponse getConfigResponse() - throws InvalidOptionException, InvalidOptionValueException { + throws InvalidOptionException, InvalidOptionValueException { ConfigResponse response = new ConfigResponse(); + response.setValue(CFG_ADDRESS, this.getAddress()); response.setValue(CFG_OID, this.getOid()); + response.setValue(CFG_NOTIFICATION_MECHANISM, this.getSnmpNotificationMechanism()); + return response; } @@ -72,6 +84,7 @@ try { setAddress(config.getValue(CFG_ADDRESS)); setOid(config.getValue(CFG_OID)); + setSnmpNotificationMechanism(config.getValue(CFG_NOTIFICATION_MECHANISM)); } catch (IllegalArgumentException ex) { throw new InvalidActionDataException(ex); } @@ -85,4 +98,11 @@ this.implementor = implementor; } + public String getSnmpNotificationMechanism() { + return snmpNotificationMechanism; + } + + public void setSnmpNotificationMechanism(String snmpNotificationMechanism) { + this.snmpNotificationMechanism = snmpNotificationMechanism; + } } Modified: trunk/src/org/hyperic/hq/ui/RenditFilter.java =================================================================== --- trunk/src/org/hyperic/hq/ui/RenditFilter.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/ui/RenditFilter.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -26,14 +26,11 @@ package org.hyperic.hq.ui; import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Date; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log; Modified: trunk/src/org/hyperic/hq/ui/json/action/escalation/crud/SaveAction.java =================================================================== --- trunk/src/org/hyperic/hq/ui/json/action/escalation/crud/SaveAction.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/ui/json/action/escalation/crud/SaveAction.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -106,8 +106,9 @@ { String address = ((String[])p.get("snmpIP"))[0]; String oid = ((String[])p.get("snmpOID"))[0]; + String snmpNotificationMechanism = ((String[])p.get("snmpNotificationMechanism"))[0]; - return new SnmpActionConfig(address, oid); + return new SnmpActionConfig(address, oid, snmpNotificationMechanism); } private ActionConfigInterface Modified: trunk/src/org/hyperic/hq/ui/pages/SignIn.java =================================================================== --- trunk/src/org/hyperic/hq/ui/pages/SignIn.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/ui/pages/SignIn.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -44,17 +44,13 @@ import org.apache.tapestry.RedirectException; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InitialValue; -import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.Meta; import org.apache.tapestry.annotations.Persist; -import org.apache.tapestry.callback.ICallback; -import org.apache.tapestry.engine.IEngineService; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.link.PageLink; import org.hyperic.hq.auth.shared.SessionNotFoundException; import org.hyperic.hq.auth.shared.SessionTimeoutException; import org.hyperic.hq.authz.server.session.AuthzSubject; -import org.hyperic.hq.authz.server.session.AuthzSubjectManagerEJBImpl; import org.hyperic.hq.authz.server.session.Operation; import org.hyperic.hq.authz.shared.AuthzSubjectValue; import org.hyperic.hq.authz.shared.PermissionException; @@ -65,7 +61,6 @@ import org.hyperic.hq.ui.WebUser; import org.hyperic.hq.ui.server.session.DashboardManagerEJBImpl; import org.hyperic.hq.ui.server.session.UserDashboardConfig; -import org.hyperic.hq.ui.service.SearchService; import org.hyperic.hq.ui.shared.DashboardManagerLocal; import org.hyperic.hq.ui.util.ContextUtils; import org.hyperic.image.widget.ResourceTree; Modified: trunk/src/org/hyperic/hq/ui/servlet/RenditServlet.java =================================================================== --- trunk/src/org/hyperic/hq/ui/servlet/RenditServlet.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/ui/servlet/RenditServlet.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -31,7 +31,6 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.ServletRequest; import org.apache.catalina.Globals; import org.apache.commons.logging.Log; Modified: trunk/src/org/hyperic/hq/ui/taglib/display/ConditionalLinkDecorator.java =================================================================== --- trunk/src/org/hyperic/hq/ui/taglib/display/ConditionalLinkDecorator.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/ui/taglib/display/ConditionalLinkDecorator.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -17,7 +17,7 @@ @Override public String decorate(Object columnValue) { // This is the actual text of the column taken from the column tag... - String alertDefinitionName = (String) columnValue; + String columnText = (String) columnValue; // ...now figure out if we have to render a link or not, if we can't // determine it, we just render the plain text as the default behavior... @@ -55,14 +55,14 @@ StringBuffer result = new StringBuffer(); result.append("<a href=\"").append(href).append("\">"); - result.append(alertDefinitionName); + result.append(columnText); result.append("</a>"); return result.toString(); } } - return alertDefinitionName; + return columnText; } public String getTest() { Modified: trunk/src/org/hyperic/hq/ui/util/BizappUtils.java =================================================================== --- trunk/src/org/hyperic/hq/ui/util/BizappUtils.java 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/src/org/hyperic/hq/ui/util/BizappUtils.java 2009-12-08 20:09:01 UTC (rev 14053) @@ -1148,6 +1148,21 @@ } + /* + Collections.sort(uiAgents, new Comparator() { + public int compare(Object o1, Object o2) { + AgentBean a1 = (AgentBean) o1; + AgentBean a2 = (AgentBean) o2; + + if (a1.getIp().equals(a2.getIp())) { + return a1.getPort().compareTo(a2.getPort()); + } + + return a1.getIp().compareToIgnoreCase(a2.getIp()); + } + }); + */ + form.setAgents(uiAgents); request.setAttribute(Constants.AGENTS_COUNT, new Integer(uiAgents.size())); Added: trunk/thirdparty/lib/snmp4j-1.10.2.jar =================================================================== (Binary files differ) Property changes on: trunk/thirdparty/lib/snmp4j-1.10.2.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/thirdparty/lib/snmp4j.jar =================================================================== (Binary files differ) Modified: trunk/web/admin/config/ViewEscalation.jsp =================================================================== --- trunk/web/admin/config/ViewEscalation.jsp 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/web/admin/config/ViewEscalation.jsp 2009-12-08 20:09:01 UTC (rev 14053) @@ -178,6 +178,7 @@ var configProduct = actionConfig.product; var configSnmpOID = actionConfig.oid; var configSnmpIP = actionConfig.address; + var configSnmpNotificationMechanism = actionConfig.snmpNotificationMechanism; var actionId = actions[i].action.id; var actionsClassName = actions[i].action.className; var actionsVersion = actions[i].action._version_; @@ -274,7 +275,7 @@ usersTextDiv.innerHTML = 'Suppress duplicate alerts for: ' + actionWaitTime; waitDiv.innerHTML = " "; } else if (actionClass[d] == "SnmpAction") { - usersTextDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0"><tr><td rowSpan="3" vAlign="top" style="padding-right:3px;">Snmp Trap:</td><td style="padding:0px 2px 2px 2px;"><fmt:message key="resource.autodiscovery.server.IPAddressTH"/>: ' + configSnmpIP + '</td></tr><tr><td style="padding:2px;"><fmt:message key="admin.settings.SNMPTrapOID"/> ' + configSnmpOID + '</td></tr></table>' + usersTextDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0"><tr><td rowSpan="3" vAlign="top" style="padding-right:3px;">Snmp Trap:</td><td style="padding:0px 2px 2px 2px;"><fmt:message key="resource.autodiscovery.server.IPAddressTH"/>: ' + configSnmpIP + '</td></tr><tr><td style="padding:2px;"><fmt:message key="admin.settings.SNMPTrapOID"/> ' + configSnmpOID + '</td></tr><tr><td style="padding:2px;"><fmt:message key="admin.settings.SNMPNotificationMechanism"/> ' + configSnmpNotificationMechanism + '</td></tr></table>' } } @@ -485,7 +486,7 @@ td5.setAttribute('width', '30%'); td5.setAttribute('rowSpan', '3'); td5.setAttribute('id', 'displaySelAction'); - td5.innerHTML = '<table cellpadding="2" cellspacing="0" border="0" width="100%"><tbody><tr><td class=BlockTitle colSpan=3>Action Details</td></tr><tr><td id="actionName" vAlign="top" width="50%">Action: Email</td></tr><tr><td id="userListDisplay" valign="top" style="display:none;"></td></tr><tr><td><table cellpadding="2" cellspacing="0" border="0"><tr><td id=metaText style="display:none"></td></tr><tr><td id=productText style="display:none"></td></tr><tr><td id=versionText style="display:none"></td></tr></table></td></tr><tr><td><table cellpadding="2" cellspacing="0" border="0"><tr><td id=IPText style="display:none"></td></tr><tr><td id=OIDText style="display:none"></td></tr></table></td></tr><tr><td id="time" colspan="3" valign="top" style="display:none;"></td></tr></tbody></table>'; + td5.innerHTML = '<table cellpadding="2" cellspacing="0" border="0" width="100%"><tbody><tr><td class=BlockTitle colSpan=3>Action Details</td></tr><tr><td id="actionName" vAlign="top" width="50%">Action: Email</td></tr><tr><td id="userListDisplay" valign="top" style="display:none;"></td></tr><tr><td><table cellpadding="2" cellspacing="0" border="0"><tr><td id=metaText style="display:none"></td></tr><tr><td id=productText style="display:none"></td></tr><tr><td id=versionText style="display:none"></td></tr></table></td></tr><tr><td><table cellpadding="2" cellspacing="0" border="0"><tr><td id=IPText style="display:none"></td></tr><tr><td id=OIDText style="display:none"></td></tr><tr><td id=NotificationMechanismText style="display:none"></td></tr></table></td></tr><tr><td id="time" colspan="3" valign="top" style="display:none;"></td></tr></tbody></table>'; escTr1.appendChild(td1); @@ -573,7 +574,7 @@ dojo11.byId('snmpinput').style.display = 'none'; dojo11.byId('snmpinput').style.textAlign = 'left'; //sysDiv.setAttribute('width', '40%'); - snmpDiv.innerHTML = '<fmt:message key="resource.autodiscovery.server.IPAddressTH"/>: <fmt:message key="inform.config.escalation.scheme.IPAddress"/><br> <input type=text name=snmpIP id=snmpIPinput' + " size=30 onMouseOut=copysnmpIP(this);checkIP(this);><br>" + '<fmt:message key="admin.settings.SNMPTrapOID"/> <fmt:message key="inform.config.escalation.scheme.OID"/><br> <input type=text name=snmpOID id=snmpOIDinput' + " size=30 onMouseOut=copysnmpOID(this);checkOID(this);><br>"; + snmpDiv.innerHTML = '<fmt:message key="resource.autodiscovery.server.IPAddressTH"/>: <fmt:message key="inform.config.escalation.scheme.IPAddress"/><br> <input type=text name=snmpIP id=snmpIPinput' + " size=30 onMouseOut=copysnmpIP(this);checkIP(this);><br>" + '<fmt:message key="admin.settings.SNMPTrapOID"/> <fmt:message key="inform.config.escalation.scheme.OID"/><br> <input type=text name=snmpOID id=snmpOIDinput' + " size=30 onMouseOut=copysnmpOID(this);checkOID(this);><br> <select name='snmpNotificationMechanism' id='snmpNotificationMechanismSelect' onchange='copySnmpNotificationMechanism(this);'><option>v1 Trap</option><option>v2c Trap</option><option>Inform</option></select>"; td4.appendChild(usersDiv); usersDiv.setAttribute('id', 'usersDiv' + liID); @@ -633,6 +634,12 @@ OIDDisplay.innerHTML = '<fmt:message key="admin.settings.SNMPTrapOID"/> ' + el.value; } +function copySnmpNotificationMechanism(el) { + var display = dojo11.byId('NotificationMechanismText'); + display.style.display = ""; + display.innerHTML = '<fmt:message key="admin.settings.SNMPNotificationMechanism"/> ' + el.value; +} + function copysnmpIP(el) { var IPDisplay = dojo11.byId('IPText'); IPDisplay.style.display = ""; @@ -647,6 +654,7 @@ dojo11.byId('time').innerHTML = ""; dojo11.byId('IPText').innerHTML = ""; dojo11.byId('OIDText').innerHTML = ""; + dojo11.byId('NotificationMechanismText').innerHTML = ""; } function clearOthers() { Modified: trunk/web/resource/common/monitor/alerts/config/ViewEscalation.jsp =================================================================== --- trunk/web/resource/common/monitor/alerts/config/ViewEscalation.jsp 2009-12-08 08:51:05 UTC (rev 14052) +++ trunk/web/resource/common/monitor/alerts/config/ViewEscalation.jsp 2009-12-08 20:09:01 UTC (rev 14053) @@ -79,6 +79,7 @@ var configProduct = actionConfig.product; var configSnmpOID = actionConfig.oid; var configSnmpIP = actionConfig.address; + var configSnmpNotificationMechanism = actionConfig.snmpNotificationMechanism; var actionId = actions[i].action.id; var actionsClassName = actions[i].action.className; var actionsVersion = actions[i].action._version_; @@ -162,7 +163,7 @@ usersTextDiv.innerHTML = 'Suppress duplicate alerts for: ' + actionWaitTime; waitDiv.innerHTML = " "; } else if (actionClass[d] == "SnmpAction") { - usersTextDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0"><tr><td rowSpan="3" vAlign="top" style="padding-right:3px;">Snmp Trap:</td><td style="padding:0px 2px 2px 2px;"><fmt:message key="resource.autodiscovery.server.IPAddressTH"/>: ' + configSnmpIP + '</td></tr><tr><td style="padding:2px;"><fmt:message key="admin.settings.SNMPTrapOID"/> ' + configSnmpOID + '</td></tr></table>' + usersTextDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0"><tr><td rowSpan="3" vAlign="top" style="padding-right:3px;">Snmp Trap:</td><td style="padding:0px 2px 2px 2px;"><fmt:message key="resource.autodiscovery.server.IPAddressTH"/>: ' + configSnmpIP + '</td></tr><tr><td style="padding:2px;"><fmt:message key="admin.settings.SNMPTrapOID"/> ' + configSnmpOID + '</td></tr><tr><td style="padding:2px;"><fmt:message key="admin.settings.SNMPNotificationMechanism"/> ' + configSnmpNotificationMechanism + '</td></tr></table>' } } |
From: SyRenity <sig...@hy...> - 2009-12-08 16:46:51
|
Hi. Any idea what I should do with Linux shared libraries, in order to resolve the "java.lang.UnsatisfiedLinkError" message? I tried placing them in system lib directory, but it didn't work out. Thanks in advance! |
From: <bo...@hy...> - 2009-12-08 08:51:20
|
Author: bob Date: 2009-12-08 00:51:05 -0800 (Tue, 08 Dec 2009) New Revision: 14052 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14052 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1282 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-08 01:04:11 UTC (rev 14051) +++ trunk/etc/version.properties 2009-12-08 08:51:05 UTC (rev 14052) @@ -1,3 +1,3 @@ -#Mon Dec 07 00:17:18 PST 2009 +#Tue Dec 08 00:16:46 PST 2009 version=4.3.0 -build=1281 +build=1282 |
From: <bo...@hy...> - 2009-12-08 01:04:22
|
Author: bob Date: 2009-12-07 17:04:11 -0800 (Mon, 07 Dec 2009) New Revision: 14051 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14051 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Release 4.2.0.2 build #1269 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-07 23:50:03 UTC (rev 14050) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-08 01:04:11 UTC (rev 14051) @@ -1,3 +1,3 @@ -#Mon Dec 07 14:45:20 PST 2009 +#Mon Dec 07 16:34:36 PST 2009 version=4.2.0.2 -build=1268 +build=1269 |
From: <sc...@hy...> - 2009-12-07 23:50:21
|
Author: scottmf Date: 2009-12-07 15:50:03 -0800 (Mon, 07 Dec 2009) New Revision: 14050 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14050 Modified: trunk/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java Log: [HHQ-3594] avoid NPE when updating an alert condition. Modified: trunk/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java 2009-12-07 23:49:40 UTC (rev 14049) +++ trunk/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java 2009-12-07 23:50:03 UTC (rev 14050) @@ -1228,6 +1228,10 @@ AlertDefinition childDef = null; for (Iterator it=def.getChildren().iterator(); it.hasNext(); ) { childDef = (AlertDefinition) it.next(); + Resource r = childDef.getResource(); + if (r == null || r.isInAsyncDeleteState()) { + continue; + } cache.remove(childDef.getAppdefEntityId()); } } |
From: <sc...@hy...> - 2009-12-07 23:49:54
|
Author: scottmf Date: 2009-12-07 15:49:40 -0800 (Mon, 07 Dec 2009) New Revision: 14049 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14049 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java Log: [HHQ-3594] avoid NPE when updating an alert condition. Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java 2009-12-07 23:29:00 UTC (rev 14048) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java 2009-12-07 23:49:40 UTC (rev 14049) @@ -1211,6 +1211,10 @@ AlertDefinition childDef = null; for (Iterator it=def.getChildren().iterator(); it.hasNext(); ) { childDef = (AlertDefinition) it.next(); + Resource r = childDef.getResource(); + if (r == null || r.isInAsyncDeleteState()) { + continue; + } cache.remove(childDef.getAppdefEntityId()); } } |
From: <bo...@hy...> - 2009-12-07 23:29:14
|
Author: bob Date: 2009-12-07 15:29:00 -0800 (Mon, 07 Dec 2009) New Revision: 14048 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14048 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Release 4.2.0.2 build #1268 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-07 22:52:17 UTC (rev 14047) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-07 23:29:00 UTC (rev 14048) @@ -1,3 +1,3 @@ -#Mon Dec 07 09:12:37 PST 2009 +#Mon Dec 07 14:45:20 PST 2009 version=4.2.0.2 -build=1267 +build=1268 |