Need check_mssql_health

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.
Locked
sshekhar
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Need check_mssql_health

Post 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.
sshekhar
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Need Help on check_mssql_health

Post 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.
Attachments
freetds.conf
(982 Bytes) Downloaded 609 times
odbcinst.ini
(620 Bytes) Downloaded 595 times
Error
Error
Error.PNG (6.65 KiB) Viewed 6639 times
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Need check_mssql_health

Post by npolovenko »

@sshekhar, Have you installed the DBD::Sybase module?
From your command line please run:

Code: Select all

cpan
install DBD::Sybase
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sshekhar
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Re: Need check_mssql_health

Post 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"
Attachments
cpan error
cpan error
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Need check_mssql_health

Post 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';
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sshekhar
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Re: Need check_mssql_health

Post 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 ~]#
Attachments
DBD Error
DBD Error
sshekhar
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Re: Need check_mssql_health

Post by sshekhar »

Hi Team,

Can you please help on this issue? I need to fix this issue and implement in our production.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Need check_mssql_health

Post by scottwilkerson »

Here is a guide for what you are trying to do
http://thibs.skynetblogs.be/archive/201 ... 82244.html
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked