我想使用Nagios监控Azure Paas数据库。我在https://github.com/MsOpenTech/WaMo
使用此插件当我尝试检查数据库时: ./check_azure_sql.py -u -p -d -k top5queries
我收到此错误消息:
(' 08001',' [08001] [unixODBC] [FreeTDS] [SQL Server]无法连接到数据源(0)(SQLDriverConnect)') 连接到数据库时出错
安装所有依赖项(在GitHub插件站点中列出)。
在这里你可以看到我的/etc/odbcinst.ini:
[ODBC]
Trace = Yes
TraceFile = /tmp/odbc.log
[FreeTDS]
Description = ODBC For TDS
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1

在这里你可以看到我的/etc/freetds/freetds.conf:
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 5.0
# A typical Microsoft server
[egServer70]
host = ntmachine.domain.com
port = 1433
tds version = 7.0

我的/etc/odbc.ini是空的。
有人有任何想法吗?
答案 0 :(得分:0)
不是我用github.com/MsOpenTech/WaMo编写的插件。对于nagios管理员,我只需要从debian linux cli执行命令./check_azure_sql.py -u(用户名)-p(密码)-d(数据库)-k(密钥)(用python编写的check_azure_sql.py)。
所以当我执行上面的命令时,我收到错误消息:
(' 08001',' [08001] [unixODBC] [FreeTDS] [SQL Server]无法连接到数据源(0)(SQLDriverConnect)')连接错误数据库。
比你帮助的人
。