Customizing Oracle DB Monitoring
Customizing Oracle DB Monitoring
2. Navigate to /usr/local/thoughtdata/infrasense/bin
Add new section for new sql query, each SQL query shall have 3 lines
This will create a csv file which will hold the data of the following SQL query
You can provide any csv file name of your choice which represents the sql query
This is your custom SQL query which shall output the key statistics which you intend
to monitor periodically
spool off
This will close the csv file after writing the output of the SQL query
Make sure to add the new lines before the exit; line
sample below
Too much data output from SQL Select query will slow down monitoring and data
movement, make sure to limit the SQL query to output only key statistics what you
want using ORDER BY and FETCH FIRST X ROWS options in query
In the above 265 is the new table number, you will have to increment the table
number after checking the last existing row table number in the file
dynamic_local is a constant,
sqltop5memorycounters is the table name which will be used for storing data in
Enteprise360 database, you can give appropriate table name which can be easily
recognized for the data of the new SQL query in Enterprise360
cat sqltop5memorycounters.csv is the csv file which contains the data from the
new SQL query from previous steps 2c, the csv file name has to match
Please note that 265 is existing row, your new rows will start from 266
e. Create a new file called oracle_kv_266 using vi editor, this file is for information to
infrasense sensor on how to parse the data from the output of the new SQL query in
table number 266 which was entered into oracle_cmds file.
You can check one of the existing kv files to understand the structure, sample cat output
of an existing file for table #258
Before entering information in this file, you should check the output of the select sql
query from the sqlplus client
Sample output below for existing table #258, note the output has 4 columns, hence
there are 4 rows in oracle_kv_258, 1 row per column
Each row follows the format below
<datatype>, <fieldname>
For a column which has string data type, choose string as data type, fieldname is the
name of the column what you prefer it to be in the data table which is reported to
Enterprise360 server
string_index means you would to index the column in Enterprise360, indexing helps to
filter data in Enteprise360 database, only those columns which you intend to filter
should have _index
for numeric column values use long/counter. long if the statistics is not a cumulative
counter, if its cumulative choose counter
#rows in the kv file should exactly match the number of columns in the SQL query
output
In /usr/local/thoughtdata/infrasense/bin run
./stop
./start passive
2. Navigate to /thoughtdata/platform/tools
a. run
i. ./update_new_sources.sh
ii. Check if the new tables which you created on Infrasense sensors are added as
new data sources in Enteprrise360
This would mean Enteprrise360 is receiving new data for new SQL query
from infrasense sensor
3. Go to oracle Monitoring Dashboard in UI, refresh the dashboard in browser, you can now add a
new panel in Enterprise360 dashboard
4. Follow the Steps in below link(note that you will be adding only a new panel in existing oracle
monitoring dashboard, follow only the steps to add a new panel to visualize the new data in
Enteprise360
Link