What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

mssql sensor with exporting result on alert trigger

Votes:

0

Hey,

is it possible to create a mssql sensor that not only counts the result set or give me the first result value in a defined channel but give me a complete resukt set? And it would be perfect if i cpuld export and send this result set to a defined list of persons if the alert comes up.

Example:

SQL Query Result:

Line 1: 1234 Line 2: 2345

I`m searching for a way, to show me these 2 lines in the sensor (up to 2000 lines) an autmatically export this result.

custom mssql-sensor prtg

Created on Jul 18, 2022 1:32:51 PM



1 Reply

Votes:

0

Hello Lars,

Thank you for your message.

The Microsoft SQL v2 sensor doesn't have meta-scan capability and therefore I'm afraid that it is not possible to automate the creation of this sensor for each line returned by the SQL query.

At the moment, the API doesn't allow the creation of objects in PRTG nevertheless I invite you to have a look at the PowerShell module PRTGAPI. It provides the possibility to duplicate and modify sensor settings by executing raw HTTP requests (doesn't use the API). It might allow you to develop a script which can automate the modification of the sensors. Please, note that we do not provide official support for this module as it is developed by a third party and those raw requests might induce unexpected behavior with PRTG.

There is also quite a few lines that you would need to distribute within multiple SQL v2 sensors (10 lines per sensor), which would result to approximatively 200 Microsoft SQL v2 sensors (maximum supported). This number is quite important (including the channels) and therefore might induce performances issues as well as also trigger the limit of parallel .exe execution (set to 100). Therefore, I would recommend to distribute the sensors on two probes to avoid issues.

Finally, regarding the alerting you simply have to configure limits to the channels monitoring each line and then define a notification trigger, in each sensor or in the parent device notification triggers tab (to use the inheritance).

If you have questions, do not hesitate.

Regards.

Created on Jul 21, 2022 11:38:40 AM by  Florian Lesage [Paessler Support]

Last change on Jul 21, 2022 11:56:01 AM by  Florian Lesage [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.