-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Informix DC: Add onstat command support for release 2 metrics #26
Conversation
5de822f
to
1f52981
Compare
@@ -20,7 +20,9 @@ public class Constants { | |||
public static final String MEMORY_UTILIZATION_SCRIPT = "memory_utilization.sh"; | |||
public static final String DISK_READ_SCRIPT = "disk_read.sh"; | |||
public static final String DISK_WRITE_SCRIPT = "disk_write.sh"; | |||
|
|||
public static final String TASK_WAIT_COUNT_SCRIPT = "task_wait_count.sh"; | |||
public static final String TOTAL_SESSION_COUNT_SCRIPT ="session_count.sh"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is not proper.
rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java
Outdated
Show resolved
Hide resolved
rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java
Outdated
Show resolved
Hide resolved
rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixUtil.java
Outdated
Show resolved
Hide resolved
…percase SQL queries
public static final String DB_DATABASE_ANSI_COMPLAINT_SQL = "SELECT is_ansi, name as database_name FROM sysdatabases"; | ||
public static final String DB_DATABASE_NLS_ENABLED_SQL = "SELECT is_nls, name as database_name FROM sysdatabases"; | ||
public static final String DB_DATABASE_CASE_INCENSITIVE_SQL = "SELECT is_case_insens, name as database_name FROM sysdatabases"; | ||
public static final String TABLESPACE_SIZE_SQL = "SELECT(pt.nptotal * pt.pagesize) * 1024 AS total_kb,tabname FROM SYSMASTER:SYSPTNHDR pt INNER JOIN SYSMASTER:SYSTABNAMES tn ON tn.partnum = pt.partnum WHERE (tn.dbsname IN ( %s )) ORDER BY tabname DESC LIMIT 40;"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of in we will focus on a single DB, i.e. the DB we are monitoring.
Applicable to all the tablespace query.
public static final String SQL_ELAPSED_TIME_SQL = "SELECT sql_runtime*1000 as ELAPSED_TIME_MILLIS, sql_id as sql_id, sql_statement as sql_text FROM sysmaster:syssqltrace where sql_statement not like '%syssqltrace%' ORDER BY sql_runtime desc limit 20;"; | ||
public static final String SQL_COUNT_SQL = "SELECT COUNT(1) FROM SYSSQLTRACE WHERE (dbinfo('utc_current') - sql_finishtime)<24*60*60;"; | ||
public static final String TRANSACTION_COUNT_SQL = "SELECT COUNT(1) FROM SYSTRANS;"; | ||
public static final String SQL_ELAPSED_TIME_SQL = "SELECT sql_runtime*1000 AS ELAPSED_TIME_MILLIS, sql_id AS sql_id, sql_statement AS sql_text FROM SYSMASTER:SYSSQLTRACE WHERE sql_statement NOT LIKE '%syssqltrace%' ORDER BY sql_runtime DESC LIMIT 20;"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can have more filter for this query and please validate the usage of sql_statement NOT LIKE '%syssqltrace%'
also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
public static final String TABLESPACE_UTILIZATION_SQL = "SELECT CASE WHEN (pt.nptotal > 0) THEN ((pt.npused) /pt.nptotal) * 100 ELSE 0 END AS table_utilization, tabname FROM SYSMASTER:SYSPTNHDR pt INNER JOIN SYSMASTER:SYSTABNAMES tn ON tn.partnum = pt.partnum WHERE (tn.dbsname IN ('instana')) ORDER BY tabname DESC LIMIT 40;"; | ||
public static final String TABLESPACE_MAX_SQL = "SELECT(pt.nptotal * pt.pagesize) * 1024 AS total_kb, tabname FROM SYSMASTER:SYSPTNHDR pt INNER JOIN SYSMASTER:SYSTABNAMES tn ON tn.partnum = pt.partnum WHERE (tn.dbsname IN ('instana')) ORDER BY tabname DESC LIMIT 40;"; | ||
|
||
public static final String DB_DISK_WRITE_COUNT_SQL = "SELECT value FROM SYSPROFILE WHERE name = 'dskwrites';"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have support for onstat command for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have support for onstat command for the mentioned. We have retained the query to facilitate both remote and local monitoring, to accommodate future needs.
…s from last 15 mins in custom databases
Added onstat command support for below metrics: