Difference between revisions of "Subagent:ODBCQuery"

From NetXMS Wiki
Jump to navigation Jump to search
(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...")
 
Line 1: Line 1:
{{DISPLAYTITLE:ODBCQuery Subagent}}
Information moved to documentation:
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 =
https://www.netxms.org/documentation/adminguide/application-monitoring.html#application-database-monitoring
 
{| 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).
 
= 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''

Revision as of 16:44, 24 November 2017