News

How to use the SQL-Request-integer template?

graphic 3625724 340

ServiceNav offers 2 service models to allow you to run your own MS-MSSQL-request-integer and MS-MSSQL-request-integer SQL queries.

By default these templates work with Microsoft SQLServer and Sybase.

We will focus here on the MS-MSSQL-Request-Integer model

Using the MS-MSSQL-request-integer model

This template allows you to execute a query that will return an integer value on a single line.

The returned value can be compared to thresholds.

Prerequisites for configuration :

Supervision account type MS SQL with the right to run the command on the SQL Server or Sybase instance and database.

File configuration freetds.conf. To consult the documentation on this link : https://servicenav.coservit.com/en/documentations/configure-the-supervision-of-ms-sql-server-database/

Model Parameter :
- The server name: This is the name defined in the freetds.conf file: [LOGIN_NAME]
- The name of the database to be queried
- The SQL query
- The text to be displayed as a prefix of the returned value
- The alert threshold and the whole type critical threshold

Use Case - Controlling an Application Scenario

Introduction : I have an application that manages application scenarios. As I don't have a model for this application in ServiceNav, I can nevertheless control the scenario execution time directly in the database.

Using the model MS-MSSQL-request-integer present in ServiceNav, so I will create my own service model to supervise my application scenario.

From its SQL server

In its Microsoft SQL Server Management console, prepare your query to return only one value on a row.
select top 1 status from SchedItemResult where webscriptName='ServiceNav - Demo' and DATEDIFF(minute, PollTime, getdate()) < 5 order by PollTime desc;

The result is this:

Here, I have a result with the column "Totaltime" which I will use to know the execution time of my scenario.

Now you just need to implement it in a ServiceNav service model.

From ServiceNav

Create a new unit service from the template MS-MSSQL-Query_Integer

In the Configuration Module / Services Menu / Lists

Click on the Add button:

Choose Service Model

Instanciate the fields :

The query will therefore return an integer value that I will compare to the defined thresholds.

Add this service on its equipment that manages scenarios.

Click Apply and reload its configuration.

Verification of this new model in supervision

In the Supervision / Technical Operation Module

Look for its control point and check its operation.

There is also access to performance data.

Click on the service

This model opens up many possibilities that can be displayed in its MAP module.

This may also be of interest to you

Map 4
Monitoring

Application mapping

Representing application supervision Supervising applications can pose problems of legibility of information, dependencies and alerts,

Read more "
en_US
fr_FR en_US

Welcome to ServiceNav!

Need help? More information about our products? Write to us!
You have taken note of our privacy policy.

[COVID - 19 ] - TELEWORKING, TARGET AVAILABILITY 100% !

While the epidemic lasts, ensure the availability and performance of your IT services for teleworking, with ServiceNav!

Following the government's call to mobilize to help businesses overcome the current health and economic context, we help you, free of charge, to ensure the complete monitoring of your teleworking environments: VPN, VDI, Teams, Skype Enterprise, Citrix... Objectives: collection, availability and usage indicators, dashboards to support your communication.
We use cookies to ensure that you have the best possible experience on our site, and if you continue to use this site, we will assume that you are satisfied with it.

Reserve your place

You have taken note of our privacy policy.