ODBCQuery Subagent
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