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: Ryan M. <rm...@hy...> - 2007-03-21 15:44:59
|
You shouldn't be starting the built-in database in that way. The hq-server.sh startup script will set the appropriate library path and start the database automatically when the HQ server is started. If you want to start the database without bringing up HQ use the db-*.sh scripts. -Ryan |
|
From: Venkat K. <rea...@ya...> - 2007-03-21 15:33:14
|
Hello Could someone help me to get the list of API provided by Hyperic, Venkat |
|
From: deeboh <mic...@gm...> - 2007-03-21 15:33:11
|
After many troubles installing 3.0 on my mac i've found an interesting error in starting the embedded PG DB.... from hq-server.sh start I get an error that the built in DB can't start. after digging through logs and shell scripts I tried to start postgres manually and there seems to be a hardcoded path to a lib file that is required but obvisouly won't be in my path. TeamSOAMac:~/hyperic/server-3.0.2/hqdb/bin daddyD$ ./pg_ctl start dyld: ./pg_ctl can't open library: /Users/rmorgan/hyperic/pgsql-bin/pgsql/lib/libpq.4.dylib (No such file or directory, errno = 2) Trace/BPT trap TeamSOAMac:~/hyperic/server-3.0.2/hqdb/bin daddyD$ cd ../.. TeamSOAMac:~/hyperic/server-3.0.2 daddyD$ cd .. TeamSOAMac:~/hyperic daddyD$ cd server-3.0.2/ TeamSOAMac:~/hyperic/server-3.0.2 daddyD$ find . -name libpq.4.dylib ./hqdb/lib/libpq.4.dylib II found references to rmorgan in these two files... abs_top_srcdir = /Users/rmorgan/hyperic/pgsql-bin/postgresql-8.1.2/src/.. configure_args = '--prefix=/Users/rmorgan/hyperic/pgsql-bin/pgsql' '--without-zlib' '--without-readline' I'm assuming this is why the built in postgres won't start, but i'm too tired to dig any further and my laptop battery is at 3min to detenation. thanks for your help in advance, Deeboh |
|
From: Venkat K. <rea...@ya...> - 2007-03-21 15:31:37
|
Hello Could some one give me the list of API provided by Hyperic - in order to write Plugins Regards Venkat |
|
From: pvente <hq-...@hy...> - 2007-03-21 14:51:24
|
My dashboard is not refreshing automatically, although all the metrics collections are firing off on time. Excuse my ignorance, but is there some dashboard setting to force a refresh at user-defined intervals ? |
|
From: Charles L. (JIRA) <ji...@hy...> - 2007-03-21 10:21:36
|
[ http://jira.hyperic.com/browse/HHQ-754?page=all ] Charles Lee reassigned HHQ-754: ------------------------------- Assign To: Heather Tumey (was: Charles Lee) > Swap the text formatting for the descriptions of plugin configuration fields > ---------------------------------------------------------------------------- > > Key: HHQ-754 > URL: http://jira.hyperic.com/browse/HHQ-754 > Project: Hyperic HQ > Type: Improvement > Components: UI > Versions: 3.0.2 > Reporter: Noah Salzman > Assignee: Heather Tumey > Priority: Minor > Fix For: 3.1.0 > > > When setting up a plugin (or configuring platform properties) it would be easier to read through the options if the text formatting was swapped. For instance, "platform.log_track.enable" is bold and large whereas "Enable Log Tracking" is plain and small. This should be reversed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: German L. <la...@gm...> - 2007-03-21 08:09:27
|
Hi BC Look at http://support.hyperic.com/confluence/display/DOCSHQ30/JMX+Plugin or make your custom plugin, look at http://support.hyperic.com/confluence/display/DOCSHQ30/Plugin+Development+Center |
|
From: German L. <la...@gm...> - 2007-03-21 08:01:42
|
hi jegentom . I use a shell script to do that... The shell scrip do a SQLPlus to Oracle and return 0 when the script can connect and 1 when can't connect... And then i program an alert when "return code" value change... therefore when Oracle is going down the alert is fired and when oracle is come up the alert is fire too... |
|
From: Charles L. <cl...@hy...> - 2007-03-21 03:50:55
|
Hi Murray, Just to clarify, if you are running the beta version of 3.0 EE, then it's not 3.0.2. It should be 3.0.1. There have definitely been changes between the beta and GA around the authentication providers. Charles |
|
From: Ryan M. (JIRA) <ji...@hy...> - 2007-03-21 02:54:38
|
Shell control commands missing
------------------------------
Key: HHQ-758
URL: http://jira.hyperic.com/browse/HHQ-758
Project: Hyperic HQ
Type: Bug
Components: CLI
Versions: 3.0.2
Reporter: Ryan Morgan
Assigned to: Ryan Morgan
Fix For: 3.1.0
When the control functionality was open sourced the control commands from the shell were not included.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.hyperic.com/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|
|
From: Ryan M. <rm...@hy...> - 2007-03-21 01:34:11
|
I just confirmed that others have this working with 3.0.2, so it may be the login property that's causing the issue. If that were the case though, I'd expect some other errors to be logged.
To provide some background, the username and password entered in the LDAP configuration section is used for directories that do not allow anonymous searches. Those credentials are used to find the user using a filter that uses the login property.
So for example if my loginProperty is set to cn, when I login as rmorgan it will construct a fitler that looks like:
(cn=rmorgan)
HQ then tries to rebind to the directory using the credentials given in the login page.
You can also enable debug logging for this class which may provide some more info. Edit hq-engine/server/default/conf/log4j.xml and add a section that looks like:
<category name="com.hyperic.hq.auth.server.LdapLoginModule">
<priority value="DEBUG"/>
</category>
That should hopefully give us the info we need.
Thanks,
-Ryan
|
|
From: Ryan M. (JIRA) <ji...@hy...> - 2007-03-21 00:28:36
|
[ http://jira.hyperic.com/browse/HHQ-757?page=all ] Ryan Morgan resolved HHQ-757: ----------------------------- Resolution: Fixed Patch from nickbr tested and applied. Fixed in 3.0.3 and 3.1. > Dots in attribute names cause errors when collecting servlet metrics > -------------------------------------------------------------------- > > Key: HHQ-757 > URL: http://jira.hyperic.com/browse/HHQ-757 > Project: Hyperic HQ > Type: Bug > Components: Plugins > Versions: 2.7.7, 3.0.2 > Reporter: Ryan Morgan > Assignee: Ryan Morgan > Fix For: 3.0.3, 3.1.0 > > > As reported on the forums: > http://forums.hyperic.com/jiveforums/thread.jspa?threadID=1635&tstart=0 > 2007-03-18 22:46:22,139 DEBUG [MeasurementCommandsServer] Error getting real tim > org.hyperic.hq.product.MetricInvalidException: Incorrect response from monitored > at org.hyperic.hq.product.servlet.client.JMXRemote.refresh(JMXRemote.jav > at org.hyperic.hq.product.servlet.client.JMXRemote.getRemoteInfo(JMXRemo > at org.hyperic.hq.product.servlet.client.JMXRemote.getValue(JMXRemote.ja > at org.hyperic.hq.product.servlet.client.JMXRemote.getRemoteMBeanValue(J > at org.hyperic.hq.plugin.servlet.ServletMeasurementPlugin.getRemoteValue > at org.hyperic.hq.plugin.servlet.ServletMeasurementPlugin.getValue(Servl > at org.hyperic.hq.product.MeasurementPluginManager.getPluginValue(Measur > at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementP > at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementP > at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementP > at org.hyperic.hq.measurement.agent.server.MeasurementCommandsServer.get > at org.hyperic.hq.measurement.agent.server.MeasurementCommandsServer.dis > at org.hyperic.hq.agent.server.CommandDispatcher.processRequest(CommandD > at org.hyperic.hq.agent.server.CommandListener.listenLoop(CommandListene > at org.hyperic.hq.agent.server.AgentDaemon.start(AgentDaemon.java:680) > at org.hyperic.hq.agent.server.AgentDaemon$RunnableAgent.run(AgentDaemon > at org.hyperic.hq.agent.server.AgentDaemon.main(AgentDaemon.java:762) > Caused by: java.io.IOException: invalid header field name: path.to.something > at java.util.jar.Attributes.read(Attributes.java:409) > at java.util.jar.Manifest.read(Manifest.java:219) > at java.util.jar.Manifest.<init>(Manifest.java:52) > at org.hyperic.hq.product.servlet.client.JMXRemote.refresh(JMXRemote.jav > ... 16 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: <rm...@hy...> - 2007-03-21 00:27:07
|
Author: rmorgan Date: 2007-03-20 16:27:05 -0800 (Tue, 20 Mar 2007) New Revision: 3801 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3801 Modified: branches/HQ_3_0/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java Log: Ignore attributes with '.' in the name. The dots cause the Manifest parser to fail. [HHQ-757] [merge from trunk] Submitted By: nickbr (http://forums.hyperic.com/jiveforums/thread.jspa?threadID=1635&tstart=0) Modified: branches/HQ_3_0/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java =================================================================== --- branches/HQ_3_0/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java 2007-03-21 00:24:29 UTC (rev 3800) +++ branches/HQ_3_0/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java 2007-03-21 00:27:05 UTC (rev 3801) @@ -346,6 +346,7 @@ Object o = mServer.getAttribute(oname, attName); if(attName.indexOf( "=") >=0 || attName.indexOf( ":") >=0 || + attName.indexOf(".") >= 0 || attName.indexOf( " ") >=0 ) { continue; } |
|
From: <rm...@hy...> - 2007-03-21 00:24:33
|
Author: rmorgan Date: 2007-03-20 16:24:29 -0800 (Tue, 20 Mar 2007) New Revision: 3800 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3800 Modified: trunk/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java Log: Ignore attributes with '.' in the name. The dots cause the Manifest parser to fail. [HHQ-757] Submitted By: nickbr (http://forums.hyperic.com/jiveforums/thread.jspa?threadID=1635&tstart=0) Modified: trunk/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java =================================================================== --- trunk/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java 2007-03-20 23:28:10 UTC (rev 3799) +++ trunk/src/org/hyperic/hq/product/servlet/webapp/JMXServlet.java 2007-03-21 00:24:29 UTC (rev 3800) @@ -346,6 +346,7 @@ Object o = mServer.getAttribute(oname, attName); if(attName.indexOf( "=") >=0 || attName.indexOf( ":") >=0 || + attName.indexOf(".") >= 0 || attName.indexOf( " ") >=0 ) { continue; } |
|
From: Ryan M. (JIRA) <ji...@hy...> - 2007-03-21 00:23:37
|
Dots in attribute names cause errors when collecting servlet metrics
--------------------------------------------------------------------
Key: HHQ-757
URL: http://jira.hyperic.com/browse/HHQ-757
Project: Hyperic HQ
Type: Bug
Components: Plugins
Versions: 2.7.7, 3.0.2
Reporter: Ryan Morgan
Assigned to: Ryan Morgan
Fix For: 3.0.3, 3.1.0
As reported on the forums:
http://forums.hyperic.com/jiveforums/thread.jspa?threadID=1635&tstart=0
2007-03-18 22:46:22,139 DEBUG [MeasurementCommandsServer] Error getting real tim
org.hyperic.hq.product.MetricInvalidException: Incorrect response from monitored
at org.hyperic.hq.product.servlet.client.JMXRemote.refresh(JMXRemote.jav
at org.hyperic.hq.product.servlet.client.JMXRemote.getRemoteInfo(JMXRemo
at org.hyperic.hq.product.servlet.client.JMXRemote.getValue(JMXRemote.ja
at org.hyperic.hq.product.servlet.client.JMXRemote.getRemoteMBeanValue(J
at org.hyperic.hq.plugin.servlet.ServletMeasurementPlugin.getRemoteValue
at org.hyperic.hq.plugin.servlet.ServletMeasurementPlugin.getValue(Servl
at org.hyperic.hq.product.MeasurementPluginManager.getPluginValue(Measur
at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementP
at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementP
at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementP
at org.hyperic.hq.measurement.agent.server.MeasurementCommandsServer.get
at org.hyperic.hq.measurement.agent.server.MeasurementCommandsServer.dis
at org.hyperic.hq.agent.server.CommandDispatcher.processRequest(CommandD
at org.hyperic.hq.agent.server.CommandListener.listenLoop(CommandListene
at org.hyperic.hq.agent.server.AgentDaemon.start(AgentDaemon.java:680)
at org.hyperic.hq.agent.server.AgentDaemon$RunnableAgent.run(AgentDaemon
at org.hyperic.hq.agent.server.AgentDaemon.main(AgentDaemon.java:762)
Caused by: java.io.IOException: invalid header field name: path.to.something
at java.util.jar.Attributes.read(Attributes.java:409)
at java.util.jar.Manifest.read(Manifest.java:219)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at org.hyperic.hq.product.servlet.client.JMXRemote.refresh(JMXRemote.jav
... 16 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.hyperic.com/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|
|
From: Ryan M. (JIRA) <ji...@hy...> - 2007-03-21 00:10:36
|
[ http://jira.hyperic.com/browse/HHQ-755?page=all ] Ryan Morgan closed HHQ-755: --------------------------- Verified in my test setup. > Unable to store very large or small values. > ------------------------------------------- > > Key: HHQ-755 > URL: http://jira.hyperic.com/browse/HHQ-755 > Project: Hyperic HQ > Type: Bug > Components: Measurement > Versions: 3.0.0, 3.0.1, 3.0.2 > Environment: Seen on both Oracle 9i and Postgres 8.2.0 > Reporter: Ryan Morgan > Assignee: Jon Travis > Priority: Blocker > Fix For: 3.0.3, 3.1.0 > Attachments: patch.txt > > > Attempting to insert Double.MIN_VALUE or Double.MAX_VALUE fails on both Oracle and Postgres. Double.MIN_VALUE is 2-1074, but I've seen this behavior on numbers in the 2-210 range. > This is critical since any bad value could potentially cause the entire metric data batch to be thrown out. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Ryan M. <rm...@hy...> - 2007-03-20 23:57:44
|
Hi Thomas, It sounds like what you are looking for is recovery alerts. Recovery alerts allow you to setup 2 alerts which are counter conditions of each other. That way you can be alerted when something goes down as well as when it comes back up. Another advantage of recovery alerts is it allows alerts to be suppressed until the counter condition is triggered. This feature is limited to the HQ Enterprise subscription. More information can be found in our documentation: http://support.hyperic.com/confluence/display/DOCSHQ30/Defining+Recovery+Alerts -Ryan |
|
From: Brad F. <br...@br...> - 2007-03-20 23:35:27
|
I guess it's time for me to work on those platform packages. 8-) |
|
From: Jon T. (JIRA) <ji...@hy...> - 2007-03-20 23:31:36
|
[ http://jira.hyperic.com/browse/HHQ-755?page=all ] Jon Travis resolved HHQ-755: ---------------------------- Resolution: Fixed We now truncate precision greater than 5 digits, and more than 24 digits before the decimal > Unable to store very large or small values. > ------------------------------------------- > > Key: HHQ-755 > URL: http://jira.hyperic.com/browse/HHQ-755 > Project: Hyperic HQ > Type: Bug > Components: Measurement > Versions: 3.0.0, 3.0.1, 3.0.2 > Environment: Seen on both Oracle 9i and Postgres 8.2.0 > Reporter: Ryan Morgan > Assignee: Jon Travis > Priority: Blocker > Fix For: 3.0.3, 3.1.0 > Attachments: patch.txt > > > Attempting to insert Double.MIN_VALUE or Double.MAX_VALUE fails on both Oracle and Postgres. Double.MIN_VALUE is 2-1074, but I've seen this behavior on numbers in the 2-210 range. > This is critical since any bad value could potentially cause the entire metric data batch to be thrown out. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: <jt...@hy...> - 2007-03-20 23:28:12
|
Author: jtravis Date: 2007-03-20 15:28:10 -0800 (Tue, 20 Mar 2007) New Revision: 3799 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3799 Modified: branches/HQ_3_0/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java Log: HHQ-755 Truncate decimal places and place upper-bound on data value size. Modified: branches/HQ_3_0/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java =================================================================== --- branches/HQ_3_0/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java 2007-03-20 21:49:02 UTC (rev 3798) +++ branches/HQ_3_0/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java 2007-03-20 23:28:10 UTC (rev 3799) @@ -86,6 +86,8 @@ private static final String logCtx = DataManagerEJBImpl.class.getName(); private final Log _log = LogFactory.getLog(logCtx); + private static final BigDecimal MAX_DB_NUMBER = new BigDecimal("10000000000000000000000"); + private static final long MINUTE = 60 * 1000; // Table names @@ -285,6 +287,21 @@ } /** + * Convert a decimal value to something suitable for being thrown into the database + * with a NUMERIC(24,5) definition + */ + private BigDecimal getDecimalInRange(BigDecimal val) { + val = val.setScale(5, BigDecimal.ROUND_HALF_EVEN); + if (val.compareTo(MAX_DB_NUMBER) == 1) { + _log.warn("Value [" + val + "] is too big to put into the DB. Truncating to [" + + MAX_DB_NUMBER+ "]"); + return MAX_DB_NUMBER; + } + + return val; + } + + /** * This method is called to perform 'updates' for any inserts which failed * in addData. */ @@ -314,7 +331,7 @@ } stmt.setInt(1, metricId.intValue()); stmt.setLong(2, val.getTimestamp()); - stmt.setBigDecimal(3, bigDec); + stmt.setBigDecimal(3, getDecimalInRange(bigDec)); stmt.addBatch(); } @@ -450,7 +467,7 @@ } stmt.setInt(1, metricId.intValue()); stmt.setLong(2, val.getTimestamp()); - stmt.setBigDecimal(3, bigDec); + stmt.setBigDecimal(3, getDecimalInRange(bigDec)); stmt.addBatch(); } |
|
From: Petar P. <pet...@gm...> - 2007-03-20 23:25:18
|
Hi, I've tried the following code on both Fedora Core 4 and SUSE 10.2 and it aways returns 0. It works OK on Windows (the process which listens on port 6500 is running on all three machines): Sigar sigar = new Sigar(); sigar.getProcPort( "tcp", Long.toString( 6500 ) ); Any help will be greatly appreciated. What I'm trying to do is check if a given process is running on a given port. Any other way to do that in Java will also help (I need it to work on Linux, Solaris, Windows and AIX). Thanks. |
|
From: Stacey S. <sta...@hy...> - 2007-03-20 22:54:15
|
Whats the over under on how long it takes for someone to win? I'll go with 2 weeks. |
|
From: Noah S. <noa...@hy...> - 2007-03-20 22:28:36
|
Hi Thomas, Have you actually tried that and it didn't work or were you speculating? I just setup a "less than 100%" alert on a platform (slightly different than your example) and it worked as I would expect: when the platform came back the alert stopped. That is, it checks the most recently reported metric and not the "aggregated over time" value. --Noah-- |
|
From: <jt...@hy...> - 2007-03-20 21:49:07
|
Author: jtravis Date: 2007-03-20 13:49:02 -0800 (Tue, 20 Mar 2007) New Revision: 3798 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3798 Modified: trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java Log: Truncate very large values, and make sure the scale doesnt exceed what we want in the DB Modified: trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java 2007-03-20 20:50:02 UTC (rev 3797) +++ trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java 2007-03-20 21:49:02 UTC (rev 3798) @@ -86,6 +86,8 @@ private static final String logCtx = DataManagerEJBImpl.class.getName(); private final Log _log = LogFactory.getLog(logCtx); + private static final BigDecimal MAX_DB_NUMBER = new BigDecimal("10000000000000000000000"); + private static final long MINUTE = 60 * 1000; // Table names @@ -285,6 +287,21 @@ } /** + * Convert a decimal value to something suitable for being thrown into the database + * with a NUMERIC(24,5) definition + */ + private BigDecimal getDecimalInRange(BigDecimal val) { + val = val.setScale(5, BigDecimal.ROUND_HALF_EVEN); + if (val.compareTo(MAX_DB_NUMBER) == 1) { + _log.warn("Value [" + val + "] is too big to put into the DB. Truncating to [" + + MAX_DB_NUMBER+ "]"); + return MAX_DB_NUMBER; + } + + return val; + } + + /** * This method is called to perform 'updates' for any inserts which failed * in addData. */ @@ -314,7 +331,7 @@ } stmt.setInt(1, metricId.intValue()); stmt.setLong(2, val.getTimestamp()); - stmt.setBigDecimal(3, bigDec); + stmt.setBigDecimal(3, getDecimalInRange(bigDec)); stmt.addBatch(); } @@ -450,7 +467,7 @@ } stmt.setInt(1, metricId.intValue()); stmt.setLong(2, val.getTimestamp()); - stmt.setBigDecimal(3, bigDec); + stmt.setBigDecimal(3, getDecimalInRange(bigDec)); stmt.addBatch(); } |
|
From: Noah S. (JIRA) <ji...@hy...> - 2007-03-20 21:34:37
|
Add echo command to CLI
-----------------------
Key: HHQ-756
URL: http://jira.hyperic.com/browse/HHQ-756
Project: Hyperic HQ
Type: Improvement
Components: CLI
Versions: 3.0.2
Reporter: Noah Salzman
Assigned to: Charles Lee
Priority: Minor
Please add an "echo" command to the CLI. This will make scripting using the "source" command more friendly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.hyperic.com/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|