MSSQL using NSClient++

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

i dont have that file

i tried:

locate psqlodbc.so

and i tried:

find psqlodbc.so
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: MSSQL using NSClient++

Post by sreinhardt »

My mistake, that happens to be for postrgres not mysql. You can take a look at the link below. It seems fairly updated and accurate.
http://guywyant.info/log/206/connecting ... om-ubuntu/
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

ok i am followed that guide and got stuck at this step :

tsql -S 192.168.0.1 -U devuser

i know i change the ip address in the middle, do i also change "devuser"? if so, what do i change it to?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: MSSQL using NSClient++

Post by sreinhardt »

It would be a sql user with login permissions.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

ok i got through that fine and now im stuck at this part:

Now open the ODBC configuration file:
/usr/local/etc/odbcinst.ini

And add the following MSSQL driver entry (FreeTDS) at the end:
[FreeTDS]
Description = FreeTDS driver
Driver = /usr/local/lib/libtdsodbc.so
Setup=/usr/lib/odbc/libtdsS.so
FileUsage = 1
UsageCount = 1

Firstly, the odbcinst.ini file is empty. Secondly, i cannot locate libtdsodbc.so
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: MSSQL using NSClient++

Post by sreinhardt »

Have you done an "updatedb" since the install of libtds? Locate works off a database not searching the filesystem. Otherwise try doing a locate on just "tds".
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

ok i got a bunch of files for locate tds, what am i suppose to do next?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: MSSQL using NSClient++

Post by sreinhardt »

can you list them, we cannot help you without some knowledge of what is on your system.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

/etc/freetds
/etc/freetds/freetds.conf
/lib/modules/3.2.0-23-generic/kernel/drivers/mtd/mtdswap.ko
/lib/modules/3.2.0-44-generic/kernel/drivers/mtd/mtdswap.ko
/lib/modules/3.2.0-45-generic/kernel/drivers/mtd/mtdswap.ko
/lib/modules/3.2.0-48-generic/kernel/drivers/mtd/mtdswap.ko
/usr/bin/tdspool
/usr/include/tds_sysdep_public.h
/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
/usr/share/freetds
/usr/share/tdsodbc
/usr/share/doc/freetds-bin
/usr/share/doc/freetds-common
/usr/share/doc/freetds-dev
/usr/share/doc/libmono-data-tds2.0-cil
/usr/share/doc/libmono-data-tds4.0-cil
/usr/share/doc/tdsodbc
/usr/share/doc/freetds-bin/changelog.Debian.gz
/usr/share/doc/freetds-bin/copyright
/usr/share/doc/freetds-common/NEWS.gz
/usr/share/doc/freetds-common/README
/usr/share/doc/freetds-common/README.Debian
/usr/share/doc/freetds-common/TODO.Debian
/usr/share/doc/freetds-common/TODO.gz
/usr/share/doc/freetds-common/changelog.Debian.gz
/usr/share/doc/freetds-common/copyright
/usr/share/doc/freetds-common/examples
/usr/share/doc/freetds-common/examples/freetds.conf
/usr/share/doc/freetds-common/examples/freetds.conf.pl
/usr/share/doc/freetds-common/examples/locales.conf
/usr/share/doc/freetds-dev/changelog.Debian.gz
/usr/share/doc/freetds-dev/copyright
/usr/share/doc/libmono-data-tds2.0-cil/changelog.Debian.gz
/usr/share/doc/libmono-data-tds2.0-cil/copyright
/usr/share/doc/libmono-data-tds4.0-cil/changelog.Debian.gz
/usr/share/doc/libmono-data-tds4.0-cil/copyright
/usr/share/doc/tdsodbc/changelog.Debian.gz
/usr/share/doc/tdsodbc/copyright
/usr/share/freetds/freetds.conf
/usr/share/man/man5/freetds.conf.5.gz
/usr/share/tdsodbc/odbcinst.ini
/var/cache/apt/archives/freetds-bin_0.91-1_amd64.deb
/var/cache/apt/archives/freetds-common_0.91-1_all.deb
/var/cache/apt/archives/freetds-dev_0.91-1_amd64.deb
/var/cache/apt/archives/tdsodbc_0.91-1_amd64.deb
/var/lib/dpkg/info/freetds-bin.list
/var/lib/dpkg/info/freetds-bin.md5sums
/var/lib/dpkg/info/freetds-common.list
/var/lib/dpkg/info/freetds-common.md5sums
/var/lib/dpkg/info/freetds-common.postinst
/var/lib/dpkg/info/freetds-common.postrm
/var/lib/dpkg/info/freetds-dev.list
/var/lib/dpkg/info/freetds-dev.md5sums
/var/lib/dpkg/info/freetds-dev.preinst
/var/lib/dpkg/info/libmono-data-tds2.0-cil.clilibs
/var/lib/dpkg/info/libmono-data-tds2.0-cil.list
/var/lib/dpkg/info/libmono-data-tds2.0-cil.md5sums
/var/lib/dpkg/info/libmono-data-tds4.0-cil.clilibs
/var/lib/dpkg/info/libmono-data-tds4.0-cil.list
/var/lib/dpkg/info/libmono-data-tds4.0-cil.md5sums
/var/lib/dpkg/info/tdsodbc:amd64.config
/var/lib/dpkg/info/tdsodbc:amd64.list
/var/lib/dpkg/info/tdsodbc:amd64.md5sums
/var/lib/dpkg/info/tdsodbc:amd64.postinst
/var/lib/dpkg/info/tdsodbc:amd64.postrm
/var/lib/dpkg/info/tdsodbc:amd64.preinst
/var/lib/dpkg/info/tdsodbc:amd64.prerm
/var/lib/dpkg/info/tdsodbc:amd64.templates
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

ok so i went ahead with guide after locating several files, and got stuck at the end. When trying to run this:

isql -v MSSQL devuser 'devpass'( i changed user and pass to fit my username and pass)

i got this:


[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
Locked