VMware Cloud Community
Argon0_hyperic
Contributor
Contributor

Hokay... SQL Query... Seen various references...

To this, but cannot work out if it can be used directly within Hyperic, or whether it is just a building block for building other monitors...

What I'd like to do is a select * from tablex.dby on a remote host and get the response how long it took to respond, and how many lines were sent back (TBH the query would probably be more complex than that, but it gives the idea).

Do I have to write a plugin to do this, or does one already exist, where I can put the select statement into a particular field and let it go....?

Argon0
0 Kudos
8 Replies
excowboy
Virtuoso
Virtuoso

Hi Argon0,

have a look at the Platform -> Platform services. You should see a plugin called SQL Query (sorry can not recall the exact name). It does exactly what you require.


Cheers,
Mirko
Argon0_hyperic
Contributor
Contributor

Yup, I know the SQL Query exists as a Platform service, but how does one use it?

Do I need to setup a new platform? or use an existing one, or what?

Actually I can't see it as a platform service, but it is there as as Monitor when I look at the monitoring defaults.

Clarifying that SQL Query doesn't exist as a platform service.


Message was edited by: Argon0
0 Kudos
Argon0_hyperic
Contributor
Contributor

Hmmm, well I *THINK* I can see how to use it now, but it looks like it needs the files:

mssqlserver.jar,msbase.jar,msutil.jar

Which *WERE* Microsoft provided jar files as part of their JDBC driver (in SQL 2000).

I take it these need to be in the directory specified when you set up a server, but I cannot find these anywhere now, as SQL Server 2000 has been discontinued you just get redirected to the most recent MS pages to download the current jdbc driver, which doesn't include the above jars...

Any ideas anyone?

Cheers
0 Kudos
Argon0_hyperic
Contributor
Contributor

Well I found the files and put them in a directory on the machine running the agent (c:\jdbcsql) then I set up a server on the machine with the agent (ipt568), telling it the install path for the SQL Server was c:\jdbcsql.

So then I configure the server to run a query against default instance on my sql server (port 1433), database master, a simple "select * from sysdatabases"...

Choose "com.microsoft.jdbc.sqlserver.SQLServerDriver" from the jdbc driver dropdown, click on OK...

I get:
"The configuration has not been set for this resource due to : Invalid configuration: Plugin error: Failed to load jdbcDriver=com.microsoft.jdbc.sqlserver.SQLServerDriver (missing mssqlserver.jar,msbase.jar,msutil.jar?)"

Why am I getting this, are the .jar files in the wrong location? Have I missed something else out?

As it says above - HAYELP!!!

Argon0
0 Kudos
bclark_hyperic
Enthusiast
Enthusiast

Yes, Hyperic pulled the Microsoft-provided jdbc drivers from the distribution a while back, maybe with the 4.4 release. They also pulled the Oracle and DB2 jdbc drivers. I think they didn't want to deal with the licensing issues associated with those products. Anyway, it is a quick fix, just go get them from the vendors website (Microsoft's current jdbc driver website in this case) and drop them in.

You also need to change "com.microsoft.jdbc.sqlserver.SQLServerDriver" to
"com.microsoft.sqlserver.jdbc.SQLServerDriver". The words jdbc and sqlserver changed places.

Brian
Argon0_hyperic
Contributor
Contributor

OK....

You say:"...Vendors website (Microsoft's current jdbc driver website in this case) and drop them in.... "

What the new 3.0 version? which doesn't have mssqlserver.jar or the others? and Drop it in where (the agent pkg... directory with the other sql jars)?

Then you say:
"You also need to change "com.microsoft.jdbc.sqlserver.SQLServerDriver" to
"com.microsoft.sqlserver.jdbc.SQLServerDriver". The words jdbc and sqlserver changed places. "

I was already aware of this, but do not know where to change it. I could look through all the code and find it, I'm pretty sure, but.... (Oh and something in this text/post is breaking the post message action (I could preview but not post.....)

Message was edited by: Argon0
0 Kudos
bclark_hyperic
Enthusiast
Enthusiast

0 Kudos
Argon0_hyperic
Contributor
Contributor

Still not answered completely I'm afraid. If I get the info requested in other thread, or if there is a bug fix, will mark this as answered.
0 Kudos