lausser / check_mssql_health

Wenn du dich für Plugins (oder OMD oder allgemein Monitoring) interessierst oder von deiner Installation erzählen willst...die Tradition der deutschsprachigen Monitoring-Workshops wird wiederbelebt: https://discord.gg/jDfPZ63FcJ A plugin, which checks various parameters of Microsoft SQL database servers.
http://labs.consol.de/nagios/check_mssql_health
GNU General Public License v2.0
38 stars 27 forks source link

Unable to connect when not utilizing freetds.conf for connection information #22

Open fmikker opened 8 years ago

fmikker commented 8 years ago

When trying to use the plugin without specifying the connection information in /etc/freetds.conf and using the flags "--hostname" and "--port" instead to remove the dependency on the configuration file, the plugin fails to connect to the database server.

Microsoft SQL Server 2012 CentOS release 6.7 (Final) freetds-0.91-2.el6.x86_64 check_mssql_health (1.6.2.3)

The below error is displayed: ./check_mssql_health --hostname ref-sql-03.local --port 1433 --username "DEV\mon" --password "666-passWOR-D" -m database-online --name msdb CRITICAL - cannot connect to ref-sql-03.local. DBI connect(';host=ref-sql-03.local;port=1433','DEV\mon',...) failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (44) Server , database Message String: Server name not found in configuration files. OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (45) Server , database Message String: Unknown host machine name. at /opt/plugins/check_mssql_health line 3273

The error message reports that the server name isn't found in configuration files, but that exactly what I want to avoid.

rhagman commented 8 years ago

This looks very similar to #10 a comment in that issue refers to a commit in FreeTDS that seems to fix the problem. I have not verified that it does though but looks like it might.