Difference between revisions of "OdbcQuery Monitoring Subagent"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "This subagent periodically executes SQL queries and returns results and error codes as DCI parameters. = Configuration = = Provided Parameters = ODBC.QueryResult(*) ODBC....")
 
Line 1: Line 1:
This subagent periodically executes SQL queries and returns results and error codes as DCI parameters.
This subagent periodically executes SQL queries and returns results and error codes as DCI parameters. SQL queries are specified in the agent configuration. As the name suggests, OdbcQuery uses ODBC API to access databases and execute queries. This subagent enables NetXMS to monitor virtually any database application.


= Configuration =  
= Provided Parameters =


{| class="wikitable" style="width: 50%"
|-
!Parameter !! Description
|-
|ODBC.QueryResult(''name'') || Returns the result of the query
|-
|ODBC.QueryStatus(''name'') || Returns SQL query error code (Integer)
|-
|ODBC.QueryStatusText(''name'') || Returns textual description of the SQL error code
|-
|}
''name'' is the name of the query as defined in the configuration file (see below).


= Provided Parameters =
= Configuration File =


ODBC.QueryResult(*)
The subagent's configuration consists of one or more lines in the section *ODBC of the following format:
ODBC.QueryStatus(*)
Query = ''Name'':''ODBC DSN'':''SQL Query'':''Poll interval''
ODBC.QueryStatusText(*)

Revision as of 22:48, 15 May 2012

This subagent periodically executes SQL queries and returns results and error codes as DCI parameters. SQL queries are specified in the agent configuration. As the name suggests, OdbcQuery uses ODBC API to access databases and execute queries. This subagent enables NetXMS to monitor virtually any database application.

Provided Parameters

Parameter Description
ODBC.QueryResult(name) Returns the result of the query
ODBC.QueryStatus(name) Returns SQL query error code (Integer)
ODBC.QueryStatusText(name) Returns textual description of the SQL error code

name is the name of the query as defined in the configuration file (see below).

Configuration File

The subagent's configuration consists of one or more lines in the section *ODBC of the following format:

Query = Name:ODBC DSN:SQL Query:Poll interval