Page 1 of 1

Need check_mssql_health

PostPosted: Thu Mar 22, 2018 7:40 am
by sshekhar
Hi Team,

I am not able to configure MS SQL plugin. I am getting below error :

[root@nagios libexec]# ./check_mssql_health --hostname=192.168.1.68 --port 1433 --username=ma --password=MEDI1234 --mode connection-time

CRITICAL - could not load perl module DBD::Sybase


I have configured freetds also, below are the configuration :

/etc/freetds.conf

[sqlhost1]
host = 192.168.1.68
port = 1433
tds version = 8.0

vi /etc/odbcinst.ini

# Example driver definitions

# Driver from the postgresql-odbc package
# Setup from the unixODBC package
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbcw.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1


Plugin : http://labs.consol.de/nagios/check_mss_health

Can anyone help me on configuring this plugin? This is really needed for my environment.

Need Help on check_mssql_health

PostPosted: Thu Mar 22, 2018 8:00 am
by sshekhar
Hi Team,

i have tried configuring MS SQL plugin in Nagios core, but getting below error :


Can you please help us on configuring this plugin.



Below are configuration file of freetds.conf.

Re: Need check_mssql_health

PostPosted: Thu Mar 22, 2018 1:05 pm
by npolovenko
@sshekhar, Have you installed the DBD::Sybase module?
From your command line please run:
Code: Select all
cpan
install DBD::Sybase

Re: Need check_mssql_health

PostPosted: Fri Mar 23, 2018 12:06 am
by sshekhar
npolovenko wrote:@sshekhar, Have you installed the DBD::Sybase module?
From your command line please run:
Code: Select all
cpan
install DBD::Sybase


Hi , I have tried to install running the above command but getting below error :

"Please set SYBASE in CONFIG, or set the $SYBASE environment variable at Makefile.PL line 120, <IN> line 44.
Warning: No success on command[/usr/bin/perl Makefile.PL]
MEWP/DBD-Sybase-1.16.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Failed during this command:
MEWP/DBD-Sybase-1.16.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 512"

Re: Need check_mssql_health

PostPosted: Fri Mar 23, 2018 12:36 pm
by npolovenko
@sshekhar, Please make sure that you have the freetds-devel package installed:

Code: Select all
yum install freetds-devel


Chances are after you install it you'll be able to run:
Code: Select all
cpan
install DBD::Sybase


However, if it doesn't work we'll need to look into this error message:

"Please set SYBASE in CONFIG, or set the $SYBASE environment variable at Makefile.PL line 120, <IN> line 44.


Here's what I have on the line 44 in Makefile.PL :
Code: Select all
$ldflags = "-L$SYBASE/$libdir $ldflags" unless $^O eq 'VMS';

Re: Need check_mssql_health

PostPosted: Mon Mar 26, 2018 7:58 am
by sshekhar
npolovenko wrote:@sshekhar, Please make sure that you have the freetds-devel package installed:

Code: Select all
yum install freetds-devel


Chances are after you install it you'll be able to run:
Code: Select all
cpan
install DBD::Sybase


However, if it doesn't work we'll need to look into this error message:

"Please set SYBASE in CONFIG, or set the $SYBASE environment variable at Makefile.PL line 120, <IN> line 44.


Here's what I have on the line 44 in Makefile.PL :
Code: Select all
$ldflags = "-L$SYBASE/$libdir $ldflags" unless $^O eq 'VMS';



Hi, i have tried installing DBD but still no luck, still i am getting the same error :


Also freetds-devel is installed.

cpan[2]> exit
Lockfile removed.
[root@nagios ~]# yum install freetds-devel
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 8.3 kB 00:00:00
extras | 3.4 kB 00:00:00
packages-microsoft-com-prod | 2.9 kB 00:00:00
updates | 3.4 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirror.vbctv.in
* epel: mirror.xeonbd.com
* extras: mirror.vbctv.in
* updates: mirror.vbctv.in
Package freetds-devel-0.95.81-1.el7.x86_64 already installed and latest version
Nothing to do
[root@nagios ~]#

Re: Need check_mssql_health

PostPosted: Tue Mar 27, 2018 7:47 am
by sshekhar
Hi Team,

Can you please help on this issue? I need to fix this issue and implement in our production.

Re: Need check_mssql_health

PostPosted: Tue Mar 27, 2018 8:34 am
by scottwilkerson