The query should return the numeric data.
Add SQL Sensor
1. Select Sensor Analyzer > Configure Sensors button on right (wheel).
[Screenshot 1 is not available on this page.]
2. Select DB Query Sensors from the drop-down.
[Screenshot 2 is not available on this page.]
3. All the database agents will be loaded in the server drop-down. Select the agent.
[Screenshot 3 is not available on this page.]
4. The JDBC URL which we configured in the overview screen for that agent will be loaded in the DB URL drop-down.
[Screenshot 4 is not available on this page.]
For Oracle
a. Select the URL and enter the SQL which we are going to add it as a sensor.
[Screenshot 5 is not available on this page.]
For MySQL
a. Select the URL and enter the SQL which we are going to add it as a sensor.
The database name must be appended with the table name.
For Example:
Database Name: testdb
Table Name: login
Syntax: select count(*) from databasename.tablename
select count(*) from testdb.login
[Screenshot 6 is not available on this page.]
For MSSQL
a. Select the URL and enter the SQL which we are going to add it as a sensor.
The database name must be appended with the table name with dbo. in the middle.
For Example:
Database Name: testdb
Table Name: login
Syntax: select count(*) from databasename.dbo.tablename
select count(*) from testdb.dbo.login
[Screenshot 7 is not available on this page.]
Note:
To add the SQL as a custom sensor the SQL result should return a numeric value.
6. Save Sensor configuration. a. Enter the Dashboard Name. b. select the chart type. c. By default the time interval is 10 minutes. we can change the interval value.
d. Enter the Sensor Name. e. Click the Add Sensors button.
[Screenshot 8 is not available on this page.]
7. The added sensor will be displayed in the grid.
[Screenshot 9 is not available on this page.]
8. Click the back arrow to go to the Manage sensors screen.
[Screenshot 10 is not available on this page.]
Note:
From Applicare 8.7.0 Test SQL button and Test Result text box is removed. Because for auto add agents controller will not send request to agent.
9. Search the dashboard name and select the dashboard.
[Screenshot 11 is not available on this page.]
10. The dashboard will be displayed.
[Screenshot 12 is not available on this page.]
Add SQL Sensor Alert
1. Select Alert > Configure Alert button on right (wheel).
[Screenshot 13 is not available on this page.]
2. Select DB Query Sensor Alert on the drop-down.
[Screenshot 14 is not available on this page.]
3. Save Alert configuration.
a. Enter the name in the name field. b. We can enter the description but it is not mandatory. c. Select the server from the server drop-down. d. Select the query from the query drop-down. e. Select the condition. f. Enter the Warning/Critical and consecutive check and interval values. g. Click the save button to save the alert.
[Screenshot 15 is not available on this page.]
4. Enter the server name in the server search box and click the search icon. It will display the alerts added for that server.
[Screenshot 16 is not available on this page.]
[Screenshot 17 is not available on this page.]
5. Click the back arrow to go to the Alerts screen.
[Screenshot 18 is not available on this page.]
6. The triggered alerts will be displayed on this screen. Select the alert from the grid to view the details.
Critical Alert
[Screenshot 19 is not available on this page.]
Warning Alert
[Screenshot 20 is not available on this page.]
Critical Alert Cleared
[Screenshot 21 is not available on this page.]
Warning Alert Cleared
[Screenshot 22 is not available on this page.]
7. If the Email/SMTP Server configuration is configured and Alert ON option is enabled in the Applicare Advanced Options screen then the alerts will be sent to the configured mails.
Email/Smtp configuration https://helpdesk.arcturustech.com/hc/en-us/community/posts/360050531732-Email-Smtp-configuration-in-applicare
[Screenshot 23 is not available on this page.]
Applicare Advanced Options
[Screenshot 24 is not available on this page.]
[Screenshot 25 is not available on this page.]
Critical Alert mail
[Screenshot 26 is not available on this page.]
Warning Alert mail
[Screenshot 27 is not available on this page.]
Critical Alert Cleared mail
[Screenshot 28 is not available on this page.]
Warning Alert Cleared mail
[Screenshot 29 is not available on this page.]