Hi
I’m having trouble connecting to my MSSQL instance. My server is version 2014, ie SQL Server 12.
I enter all the details correctly in Configuration/hosts/hosts
When Centreon tries to poll the server, it fails with this error:
I’ve tried setting up the freetds.conf in /etc with the following:
I get the following error from the polls:
UNKNOWN: Cannot connect: 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 = (34)
Server , database
Message String: Adaptive Server connection failed
The command is shown as:
/usr/lib/centreon/plugins//centreon_mssql.pl --plugin database::mssql::plugin --hostname='192.168.100.101' --port='1433' --username='username' --password='password' --mode='databases-size' --filter-database='^(?!(tempdb))' --filter-database-state='' --datafiles-maxsize='' --logfiles-maxsize='' --datafiles-maxsize-unlimited='' --logfiles-maxsize-unlimited='' --warning-logfiles-space-usage='' --critical-logfiles-space-usage='' --warning-logfiles-space-usage-free='' --critical-logfiles-space-usage-free='' --warning-logfiles-space-usage-prct='' --critical-logfiles-space-usage-prct='' --warning-datafiles-space-usage='' --critical-datafiles-space-usage='' --warning-datafiles-space-usage-free='' --critical-datafiles-space-usage-free='' --warning-datafiles-space-usage-prct='' --critical-datafiles-space-usage-prct='' --verbose
however, if I change the command to include the --server option and remove the --hostname, like this:
/usr/lib/centreon/plugins//centreon_mssql.pl --plugin database::mssql::plugin --username='username' --password='password' --server=Sql --mode='databases-size' --filter-database='^(?!(tempdb))' --filter-database-state='' --datafiles-maxsize='' --logfiles-maxsize='' --datafiles-maxsize-unlimited='' --logfiles-maxsize-unlimited='' --warning-logfiles-space-usage='' --critical-logfiles-space-usage='' --warning-logfiles-space-usage-free='' --critical-logfiles-space-usage-free='' --warning-logfiles-space-usage-prct='' --critical-logfiles-space-usage-prct='' --warning-datafiles-space-usage='' --critical-datafiles-space-usage='' --warning-datafiles-space-usage-free='' --critical-datafiles-space-usage-free='' --warning-datafiles-space-usage-prct='' --critical-datafiles-space-usage-prct='' --verbose
...it works! (* when I say it works, I get a reply that says “OK: 0.00 dead lock/s | ‘mssql.deadlocks.count’=0.00;;;0; - don’t know if this is what the poller is looking for!)
Is there a way to remove the hostname/port when the --server parameter is specified? The docs seem to suggest that if you specify the --server parameter, one does not need hostname/port. If not, is there a workaround please?
Thanks
Dan