From: <sc...@hy...> - 2007-06-26 19:17:48
|
Author: scottmf Date: 2007-06-26 12:17:38 -0700 (Tue, 26 Jun 2007) New Revision: 4934 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=4934 Modified: trunk/plugins/sybase/etc/hq-plugin.xml trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseMeasurementPlugin.java trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseServerDetector.java Log: [HHQ-590] fixed up duplicate configuration Modified: trunk/plugins/sybase/etc/hq-plugin.xml =================================================================== --- trunk/plugins/sybase/etc/hq-plugin.xml 2007-06-26 18:34:13 UTC (rev 4933) +++ trunk/plugins/sybase/etc/hq-plugin.xml 2007-06-26 19:17:38 UTC (rev 4934) @@ -190,7 +190,7 @@ <config> <option name="jdbcUrl" description="JDBC Url (NOTE: localhost may not work)" - default="jdbc:sybase:Tds:localhost:4100/master"/> + default="jdbc:sybase:Tds:<hostname>:4100/master"/> <option name="jdbcUser" description="JDBC User" default="sa"/> @@ -343,6 +343,10 @@ This is neccessary to get the proper ENV vars setup in order to execute the sp_sysmon procedure. </p> + <p> + NOTE: The jdbcUrl may not work using localhost. Please specify the actual + hostname. + </p> ]]> </help> </plugin> Modified: trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseMeasurementPlugin.java =================================================================== --- trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseMeasurementPlugin.java 2007-06-26 18:34:13 UTC (rev 4933) +++ trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseMeasurementPlugin.java 2007-06-26 19:17:38 UTC (rev 4934) @@ -94,8 +94,6 @@ { String pass = (password == null) ? "" : password; pass = (pass.matches("^\\s*$")) ? "" : pass; - log.debug("user -> "+user+ - "\npass -> |"+pass+"|"); return DriverManager.getConnection(url, user, pass); } @@ -247,7 +245,7 @@ return builder.getSchema(); } - return super.getConfigSchema(info, config); + return new ConfigSchema(); } protected String getQuery(Metric metric) Modified: trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseServerDetector.java =================================================================== --- trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseServerDetector.java 2007-06-26 18:34:13 UTC (rev 4933) +++ trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseServerDetector.java 2007-06-26 19:17:38 UTC (rev 4934) @@ -146,7 +146,6 @@ public List getServerList(String path) throws PluginException { ConfigResponse productConfig = new ConfigResponse(); - productConfig.setValue(PROP_URL, DEFAULT_URL); productConfig.setValue(PROP_USER, "sa"); productConfig.setValue(PROP_PASSWORD, ""); @@ -166,7 +165,6 @@ String installdir = getParentDir(path, 3); ServerResource server = createServerResource(installdir); -// String version = getTypeInfo().getVersion(); // Set custom properties ConfigResponse cprop = new ConfigResponse(); cprop.setValue("version", version); @@ -186,6 +184,9 @@ String user = config.getValue(PROP_USER); String pass = config.getValue(PROP_PASSWORD); + pass = (pass == null) ? "" : pass; + pass = (pass.matches("^\\s*$")) ? "" : pass; + try { Class.forName(JDBC_DRIVER); } |