ODBCQuery Subagent

From NetXMS Wiki
Revision as of 12:23, 28 June 2012 by Victor (talk | contribs) (Created page with "{{DISPLAYTITLE:ODBCQuery Subagent}} This subagent periodically executes SQL queries and returns results and error codes as DCI parameters. SQL queries are specified in the age...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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