8 years ago
SQL query
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...
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/