SQL Querier Tool
Plugin for monitoring SQL Server databases through custom SQL queries.
Obtains the result of the launched SQL query as a value for the modules that use it.
Introduction
Plugin for monitoring SQL Server databases through custom SQL queries.
Obtains the result of the launched SQL query as a value for the modules that use it.
Type: Server plugin
Prerrequisites
This plugin requires:
● Connection between the Pandora server and the SQL Server database.
● Login username and password.
● The package "perl DBI SQL server odbc" installed on the Pandora server (only for the perl version of the plugin).
● The ODBC Driver 18 is required for the Python version.
Execution Perl version
./msql_query -Q "<sql_query>" -U "<sql_user>" -P "<sql_password>" -H "<sql_host>"
<sql_query>
SQL query to get the value.
<sql_user>
Database connection user.
<sql_password>
Database connection password.
<sql_host>
SQL ServerHost\Instance to connect.
Example:
./msql_query -Q "select * from tdata where value=’monitoring’" -U "artica" -P "pandora" -H "SQLSERVER\INSTANCE1"
Execution Python version
./msql_query "<sql_host>" "<sql_port>" "<sql_user>" "<sql_password>" "<sql_database>" "<sql_query>" ["<delimiter_character>"]
<sql_host>
SQL ServerHost\Instance to connect.
<sql_port>
Sql port
<sql_user>
Database connection Domain\User.
<sql_password>
Database connection password.
<sql_database>
Database name.
<sql_query>
SQL query to get the value. Strings in WHERE statement must use single quotes..
<delimiter_character>
Optional. Field delimiter character of the SQL query result. By default it uses “,”
Example:
./msql_query "SQLSERVER\INSTANCE1" "artica" "pandora" "pandora_database" "select * from tdata where value=’monitoring’" "|"