Skip to content

Commit 9886444

Browse files
committed
Update README.md
1 parent 53e7aa4 commit 9886444

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

README.md

+14-26
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Download ArbitrarySQLMonitor.zip from the Community site.
1717
Copy ArbitrarySQLMonitor.zip into the directory where you installed the machine agent, under $AGENT_HOME/monitors.
1818
Unzip the file. This will create a new directory called ArbitrarySQLMonitor.
1919
In $AGENT_HOME/monitors/ArbitrarySQLMonitor, edit the file monitor.xml and configure the plugin.
20-
Copy your JDBC driver jarfile into $AGENT_HOME/monitors/ArbitrarySQLMonitor/lib. The extension is pre-configured with an MS SQL
21-
driver.
20+
Copy your JDBC driver jarfile into $AGENT_HOME/monitors/ArbitrarySQLMonitor/lib. The extension is pre-configured with an MS SQL driver.
2221
Restart the machine agent.
2322

2423
Configuration
@@ -30,8 +29,6 @@ connectionString - The connection URL for the driver e.g. jdbc:mysql://localhost
3029
user - The user name to connect as
3130
password - The password for the user
3231

33-
metricPrefix: "Custom Metrics|SQL|"
34-
3532
2. monitor.xml properties to configure:
3633
execution-style Always set to periodic with this extension
3734
execution-frequency-in-seconds Time period in which the extension executes
@@ -40,17 +37,16 @@ execution-frequency-in-seconds Time period in which the extension executes
4037
<argument name="config-file" is-required="true" default-value="<RELATIVE_PATH>\config.yml"/>
4138
<argument name="machineAgent-relativePath" is-required="false" default-value="<PATH_TO timeStamp.txt>"/>
4239
<argument name="timeper_in_sec" is-required="false" default-value="<VALUE_PASSED_INTO_QUERIES>"/> #no effect if freqInSec used
43-
<argument name="execution_freq_in_secs" is-required="false" default-value="<SET_TO_SAME_AS execution-frequency-in-seconds"/>
40+
<argument name="execution_freq_in_secs" is-required="false" default-value="<SET_TO_SAME_AS_execution-frequency-in-seconds"/>
4441
</task-arguments>
4542

4643
Configure the path to the config.yaml file by editing the <task-arguments> in the monitor.xml file. Below is the sample
4744
<task-arguments> <!-- config file--> <argument name="config-file" is-required="true" default-value="monitors/SQLMonitor/config.yml" /> ... </task-arguments>
4845

49-
Note: Ensure that timeStamp.txt exists with a timeStamp.
46+
Note: Ensure that timeStamp.txt exists with a timeStamp. The exact time and date should be in the past, but the value does not matter as long as it is in the past because the extension will update it to the current execution time the first time the extension is run.
5047

5148
3. Configure queries in config.yml with commands and displayPrefix to determine metric path in AppD metric browser.
5249

53-
5450
Requirement - no duplicate data. You can ignore this section if you choose not to use the freqInSec variable in your queries.
5551
Set the below argument name for "machineAgent-relativePath" to the relative path of the MachineAgent folder location. For example:
5652
<argument name="machineAgent-relativePath" is-required="false" default-value="c:\MA5\MachineAgent\monitors\ArbitrarySqlMonitor\"/>
@@ -62,12 +58,8 @@ they run. If duplicate data is detected, this date/time in the file and the cur
6258

6359
Go to monitor.xml to the 'task-arguments' tag and find this tag within it:
6460
argument name="execution_freq_in_secs"
65-
*You must set this field equal to whatever value is configured for the 'execution-frequency-in-seconds' field within the same file.
66-
Next set
67-
argument name="timeper_in_sec"
68-
This is the value, in seconds, that will replace the variable
69-
freqInSec
70-
within the SQL queries in config.yml.
61+
*You must set this field equal to whatever value is configured for the 'execution-frequency-in-seconds' field within the same file. Next set argument name="timeper_in_sec" This is the value, in seconds, that will replace the variable
62+
freqInSec within the SQL queries in config.yml.
7163

7264
*Note: ALWAYS set "timeper_in_sec" LESS THAN "execution_freq_in_secs"
7365
This ensures no duplicate data.
@@ -104,15 +96,13 @@ the query data farther back than the execution frequency will create duplicate d
10496

10597
Dots below are execution frequency.
10698
<------| represents the length of time we are looking back when the query is executed, for instance, with the DateAdd() function:
107-
[REST_OF_QUERY] > DATEADD(ss, -120, GETDATE())
99+
[REST_OF_QUERY] > DATEADD(ss, -59, GETDATE())
108100

109-
This query is pulling data for the last 120 seconds from the present time. Say that the execution frequency specified in
110-
monitor.xml is 150 seconds. Then each time the extension executes, which is every 150 seconds, we get a data set covering the
111-
last 120 seconds. That leaves a 30 second gap in data. To ensure that these gaps are very small, set the execution frequency
101+
This query is pulling data for the last 59 seconds from the present time. Say that the execution frequency specified in
102+
monitor.xml is 60 seconds. Then each time the extension executes, which is every 60 seconds, we get a data set covering the
103+
last 59 seconds. That leaves a 1 second gap in data. To ensure that these gaps are very small, set the execution frequency
112104
10 seconds or more than timeper_in_sec, which is the variable that allows values passed into the queries. So, for example, if
113-
you set the execution frequency to 240 seconds, set the timeper_in_sec variable in the range of 230 - 240. If there is overlap
114-
in data, the extension will detect this and pass in a time that is the difference between the current time and the time the
115-
extension was last successfully executed(taken from timeStamp.txt) to the queries with the freqInSec variable.
105+
you set the execution frequency to 240 seconds, set the timeper_in_sec variable in the range of 230 - 240. If there is overlap in data, the extension will detect this and pass in a time that is the difference between the current time and the time the extension was last successfully executed(taken from timeStamp.txt) to the queries with the freqInSec variable.
116106

117107
No duplicate data, exec freq > timeper_in_sec
118108
. . .
@@ -129,17 +119,15 @@ Note-Please make sure to not use tab (\t) while editing yaml files. You may want
129119
yaml validator http://yamllint.com/
130120

131121
JDBC Driver
132-
To use this extension, you will need to provide the JDBC driver, class name, and connection URL. We've provided examples for some
133-
of the common databases. You'll need to replace the placeholders (HOST, PORT, DB, etc.) in the URL with your own values.
122+
To use this extension, you will need to provide the JDBC driver, class name, and connection URL. We've provided examples for some of the common databases. You'll need to replace the placeholders (HOST, PORT, DB, etc.) in the URL with your own values.
134123

135124
Metrics Provided
136125
The metrics created by this extension depend on the query you provide. The column names will be used as the metric names, and the first column of each row will be used as a folder name.
137126
For example, the query SELECT "A", 3 as "B" would create a new metric folder called A, with a new metric B whose value would be 3.
138127

139128
Restrictions
140-
The first column is assumed to be a string. All other columns are assumed to be long integers.
141-
129+
The first column is assumed to be a string. All other columns are assumed to be long integers. If you set an execution frequency longer than 1 minute, then you will get metric data gaps that will skew baselines. The machine agent, by design, places 0 values in the spots where there are gaps in metric data. For example, if you set the execution frequency in monitor.xml to 180 seconds, you will have two data points missing in between each metric.
142130

143-
Version: 1.0
131+
Version: 1.1
144132
Controller Compatibility: 3.6 or later
145-
Last Updated: 16-July-2015
133+
Last Updated: 21-August-2015

0 commit comments

Comments
 (0)