0% found this document useful (0 votes)
6 views

Customizing Oracle DB Monitoring

Uploaded by

Bishwanath Das
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Customizing Oracle DB Monitoring

Uploaded by

Bishwanath Das
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Steps to customize the oracle DB monitoring

Steps on InfraSense sensor side

1. Login into Infrasense sensor as su user

2. Navigate to /usr/local/thoughtdata/infrasense/bin

a. In this directory, you will find a file called sql

b. Edit the file using vi editor

c. At the end of the file

Add new section for new sql query, each SQL query shall have 3 lines

spool <csv file name>

 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

SQL query select statement

 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

save this file and exit

sample below

Recommendations for adding new SQL SELECT query

 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

d. Edit oracle_cmds file in same directory

i. Add a new entry at the end using following sample format


 265, dynamic_local, 5, oracle_sqltop5memorycounters, cat
sqltop5memoerycounters.csv

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,

5 is the frequency of polling in minutes, you can leave it at 5

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

sample row below, note that each row ends in a comma,

Please note that 265 is existing row, your new rows will start from 266

Once done, save and exit file.

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

Enter all rows accordingly

Save and exit the file

Make the kv file executable using

chmod 777 <filename>

f. Stop and start infrasense sensor service process

In /usr/local/thoughtdata/infrasense/bin run
./stop

./start passive

Steps on Enterprise360 side

1. Login into Enterprise360 shell console as su user

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

 Failure to see updation of new tables/datasources in above command


would mean new SQL query output data is not reaching Enterprise360
server and needs to be troubleshooted back on Infrasense sensor side

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

You might also like