Sign in to follow this  
Jonathan Arnold

Monitoring Databases as Instances

Recommended Posts

One of our customers wanted a datasource that has instances that call from each database.

Trying to use the auto discovery in the datasource for jdbc with a discovery type of "Database List" so that they could monitor each customer's database the same way.

Quote

Database list: This option is intended to query a global database about other databases to be monitored. It expects the SQL statement to return a list of databases, which are concatenated with the port used. This value can then be used in the JDBC URL. Each listed database will be returned as an instance.

 
 
 
 
 
 
 
 
 

So the above per our documentation explains how this should work, but this will return port#:databaseName. 

It will pass this to the ##WILDCARD## as port#databaseName (ex: 1433testDB). This is great if you want to see where you have what databases, but if you want to monitor the individual database then it won't work since the database is not written in that form. 

To do this you can change the active discovery to be "Instance List" 

Quote

Instance list: The result of the SQL statement will be used as instances. The query must return only a single column, of varying numbers of rows (e.g. "select name from customers").

and write a SQL statement that will return the database names (Select name as databasename From sys.databases) 

LogicMonitor_-_setting.png

This will discover all of the databases that are in the master database and pass them as wildcards to the collector which you can use in the URL, and then you are able to write a SQL statement that will query all of the databases the same way.

Quotes via: https://www.logicmonitor.com/support/datasources/active-discovery/jdbc-active-discovery/

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   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.

Sign in to follow this