Need check_mssql_health

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Need check_mssql_health

Postby sshekhar » Thu Mar 22, 2018 7:40 am

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

Postby sshekhar » Thu Mar 22, 2018 8:00 am

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 90 times
odbcinst.ini
(620 Bytes) Downloaded 89 times
Error.PNG
Error
Error.PNG (6.65 KiB) Viewed 597 times
sshekhar
 
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Re: Need check_mssql_health

Postby npolovenko » Thu Mar 22, 2018 1:05 pm

@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.
User avatar
npolovenko
Support Tech
 
Posts: 1883
Joined: Mon May 15, 2017 5:00 pm

Re: Need check_mssql_health

Postby sshekhar » Fri Mar 23, 2018 12:06 am

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
Error-2.PNG
cpan error
sshekhar
 
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Re: Need check_mssql_health

Postby npolovenko » Fri Mar 23, 2018 12:36 pm

@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.
User avatar
npolovenko
Support Tech
 
Posts: 1883
Joined: Mon May 15, 2017 5:00 pm

Re: Need check_mssql_health

Postby sshekhar » Mon Mar 26, 2018 7:58 am

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

Re: Need check_mssql_health

Postby sshekhar » Tue Mar 27, 2018 7:47 am

Hi Team,

Can you please help on this issue? I need to fix this issue and implement in our production.
sshekhar
 
Posts: 5
Joined: Thu Mar 22, 2018 5:49 am

Re: Need check_mssql_health

Postby scottwilkerson » Tue Mar 27, 2018 8:34 am

As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11179
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 2 guests