• 0

Question

Hi,

Looking for the best option to run a SQL query on one of the databases we have on the SQL server, get the result and:

1. Add value to the server properties so I can see it unxer the info.

2. Create graph from the query results 

Some of the queries may return one value but some several rows like:

Pass 100

Failed 200

Ignored 50

 

I would like to alert e.g. if we have more than 500 failed.

I would like to create chart how many pass, failed, ignore.

 

What is the best option to run those queries ?

I would like to get automatically the DB name from the SQL and run it on each database that the database name contain "public"

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi Idan -

In this case it sounds like what you'll want to do is create a datasource that uses JDBC-based Active Discovery to get the database name (e.g. something like "SHOW DATABASES") then use JDBC Data Collection to run your query. See:
    https://www.logicmonitor.com/support/datasources/active-discovery/jdbc-active-discovery/
and
    https://www.logicmonitor.com/support/datasources/data-collection-methods/jdbc-data-collection/
respectively. You can then create datapoints with appropriate thresholds to generate alerts.

To get the current value of the datapoint somewhere you can see, the best bet is probably to use our "Big Number Widget" on a dashboard. For details see:

https://www.logicmonitor.com/support/dashboards-and-widgets/widgets/big-number-widget/

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.