cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Highlighted
Level 7

Display SQL Query Results

I'm trying to figure out how to get a list from one of our databases and display it in the application monitor.

It's for keeping track of the status of some database processes.

I've tried using the sql service experience monitor but it seems to expect the sql to just return one value.

Is there something else i should be looking at instead?

Thanks.

Tags (1)
0 Kudos
7 Replies
Highlighted
Product Manager
Product Manager

Re: Display SQL Query Results

This isn't possible today using the SQL User Experience Monitor but you'll probably be interested in checking out our AppInsight for SQL in the latest SAM 6.0 beta.

0 Kudos
Highlighted
Level 12

Re: Display SQL Query Results

How is AppInsight utilized to display multiple results from a custom query?  It's a shame that this can't be done for simple data display a single component at a time.

0 Kudos
Highlighted
Product Manager
Product Manager

Re: Display SQL Query Results

AppInsight applications are complex, purpose built, application specific monitors that do not always adhere to the limitations of traditional component monitors. Because the data set/types are known and the use cases well understood and properly defined they can sometimes be far easier to implement than a general purpose component monitor type that could be used for various other tasks. I have logged this as a feature request internally under FB153908, but I encourage you to create an idea for this so others in the Thwack community can also vote on it. I suggest including a full description of what you would be trying to accomplish with such a monitor so we can understand the various different use cases and value this would provide.

0 Kudos
Highlighted
MVP
MVP

Re: Display SQL Query Results

There are two approaches to this problem:

1. Write a query that returns several values, formats those values in a table format or similar, and returns a single number that summarises those.  The problem with this, is that you only have the full details/numbers on the current read - the historical numbers only have that single number.

2. use a script instead of SQL.  All scripts can return up to 10 numbers and descriptions, and you get the whole history for all of them.

0 Kudos
Level 8

Re: Display SQL Query Results

Do you have any examples of how to add the 10 numbers and descriptions to a PS script?

0 Kudos
Highlighted

Re: Display SQL Query Results

You add dot name so 'message.blah:' with matching 'Statistic.blah:'

You can return up to 10 outputs per script.

0 Kudos
Highlighted
MVP
MVP

Re: Display SQL Query Results

etail Type

Required

Meaning

Statistic

Yes

A numeric value used to determine how the monitor compares to its set thresholds. This must be an integer value, (negative numbers are supported).

Statistic.Name1: 123

Statistic.Name2: 456

Message

No

An error or information message to be displayed in the monitor status details. Note: Multi-line messages are supported. To use this functionality print each line using a separate command. For example:
Message.Name1: abc

Message.Name2: def

Official guide:  Create a Windows PowerShell Script monitor - SolarWinds Worldwide, LLC. Help and Support

Example code: Example template: SolarWinds MIB Database - SolarWinds Worldwide, LLC. Help and Support

Only real thing to trip over, is that you can't have new line characters in your message value.  If you need to display multiple lines use HTML eg <br /> <p> <table> etc

0 Kudos