Problems installing check_mssql
Andreas Ericsson
ae at op5.se
Fri Dec 17 01:52:44 CET 2004
Rimbert Rivera wrote:
>>It's in 1.4 (since july this year, I believe).
>
>
> I only see check_mssql.sh in the contrib of 1.4 and check_mssql isn't
> anywhere in that release. If I understand correctly, check_mssql.sh
> only checks connectivity to a SQL server but doesn't allow running a
> query. We need to run a query which check_mssql does.
>
>
>>Install freetds.
>
>
> I did do that and I am able to run check_mssql.sh and tsql. But unless
> I misunderstood the man for both of them, I cannot run a query with
> them.
>
tsql lets you run any arbitrary query against any sql server using the
tabular data stream protocol (i.e. sybase and mssql servers).
>
>>Install freetds and DBD::Sybase. I know it can use the freetds libs (I
>
> compiled it that way myself).
>
> I had problems installing DBD::Sybase (via Webmin's install from CPAN).
> It keeps complaining of not finding Sybase libraries or the lib
> directory:
>
Did you install freetds-devel as well?
> "Can't find any Sybase libraries in /usr/local/lib at Makefile.PL line
> 107, line 44." (/usr/local is supposed to be the default location of
> Sybase libraries)
>
> "Can't find the lib directory under /etc! at Makefile.PL line 104, line
> 44." (/etc is where my freetds.conf file is)
>
Naturally not. No libraries are installed under /etc (aka sysconfdir) on
any sane distribution.
> "Can't find the lib directory under /usr/share/doc/freetds-0.62.1! at
> Makefile.PL line 104, <IN> line 44." (/usr/share/doc/freetds-0.62.1 is
> the only other place I could locate freetds though I knew it was a long
> shot)
>
Very long indeed.
> "Can't find the lib directory under /usr/share/pear/DB! at Makefile.PL
> line 104, line 44." (/usr/share/pear/DB is where my sybase.php is)
>
Naturally not. /usr/share/pear/DB is probably where your PHP database
things are installed.
> I couldn't locate any other directories that had either freetds or
> sybase in it.
>
> So I think I need to install Sybase? I see that ASE Express Edition for
> Linux is free but it requires registration before I can install. Am I
> still on the right track and install it?
>
I wouldn't know. I did SYBASE=/usr perl Makefile.PL when I built it (as
per instructions in the README, as I recall it). It then autodetected my
freetds libs and everything else.
>
> What I find really strange is, the other RH9 that has check_mssql
> running, does have DBD::Sybase perl module installed but not the freetds
> package (according to Webmin). Check_mssql has no man but check_mssql
> -h gives:
> Syntax: ./check_mssql -s <server> -d <database> -u <username> -p
> <password> -q <query> [-v]
> * --database -d Database name
> * --server -s Server name
> * --username -u Username
> * --password -p Password
> * --query -q SQL query to run
> --verbose -v verbose
>
> There is no -V option so I don't know what version this is.
>
> Here's the command definition from the working RH9 (I cleaned up our
> values in <>):
> # 'check_mssql' command definition
> define command{
> command_name check_mssql
> command_line $USER1$/check_mssql -s $HOSTADDRESS$ -d
> <databasename> -u <username> -p <password> -q "$ARG1$"
> }
>
> Here's the service definition from the working RH9 (I cleaned up our
> values in <>):
> # Service definition
> define service{
> use comtex-service-template
> ; Name of service template to use
>
> host_name <hostname>
> service_description <desc>
> max_check_attempts 1
> check_command check_mssql!exec <name of stored
> procedure>!
> }
>
> I've even tried installing sqsh because I think I read check_mssql may
> need both freetds and sqsh, but I had problems installing sqsh, too:
>
> error: Failed dependencies:
> libcomn.so is needed by sqsh-1.7-1
> libcs.so is needed by sqsh-1.7-1
> libct.so is needed by sqsh-1.7-1
> libintl.so is needed by sqsh-1.7-1
> libncurses.so.4 is needed by sqsh-1.7-1
> libreadline.so.3 is needed by sqsh-1.7-1
> libsybtcl.so is needed by sqsh-1.7-1
>
> I tried installing libcomn.so but I can't seem to find that package (or
> whatever it is).
>
> The working RH9 did not have sqsh package installed on it.
>
>
> If you haven't guessed, I'm very clueless about most of this stuff. I'm
> only starting to understand the basics of nagios, but I am not a
> programmer and still a Linux newbie so I don't even know what I'm
> installing (I don't know the difference between a package and a perl
> module or whatever). Not that I am expecting anyone to suddenly get me
> up to speed on any of this, but please don't assume I know something
> that you think is basic. :)
>
> Unfortunately, going back to the consultant is not an option.
>
> So, how do I install check_mssql?
>
>
>
>
>
> - Rim
>
> Rimbert Rivera
> Manager, Information Technology
> COMTEX News Network
> rrivera at comtex.com
> (703) 820-2000
> Discover more about COMTEX at: http://www.comtex.com/
> This e-mail is intended solely for the person or entity to which it is
> addressed and may contain confidential and/or privileged information.
> Any review, dissemination, copying, printing or other use of this e-mail
> by persons or entities other than the addressee is prohibited. If you
> have received this e-mail in error, please contact the sender
> immediately and delete the material from any computer.
>
> -----Original Message-----
> From: Andreas Ericsson [mailto:ae at op5.se]
> Sent: Thursday, December 16, 2004 3:15 PM
> To: Rimbert Rivera
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Problems installing check_mssql
>
> Rimbert Rivera wrote:
>
>>First off, I thought I read on a Google search that check_mssql was in
>
>
>>the contrib directory of the Nagios plugins but it wasn't there (I
>>installed 1.3.1). Even the extra plugins did not have it.
>>
>
>
> It's in 1.4 (since july this year, I believe).
>
>
>>We have another RH9 Linux box (setup up by a consultant that is no
>>longer with us) that has check_mssql and is working properly. I
>>copied that file to the RH9 box that I am installing another Nagios
>>install on and when I tried to run it, it gave me errors about DBI. I
>
>
>>installed perl-dbi. Then it complained about DBD::Sybase. I tried to
>
>
>>install DBD::Sybase but it can't find the Sybase libraries.
>>
>
>
> Install freetds.
>
>
>>I don't even know where the original check_mssql plugin came from.
>>I've searched for it and only found check_mssql.sh, which is a
>>different version I believe.
>
>
> Yes. It uses the tsql program (included in the freetds dist).
>
>
>> If I could download check_mssql with install instructions, I think I
>>can do it. We need check_mssql so we can run stored procedures on our
>
>
>>SQL server that checks the health of our internal app.
>>
>>Any suggestions?
>>
>
>
> Install freetds and DBD::Sybase. I know it can use the freetds libs (I
> compiled it that way myself).
>
>
>>I consider myself a Linux newbie and I've been doing most of this
>>through WebMin, if that matters.
>>
>
>
> Probably yes, but building perl modules is fairly straight forward. You
> should be able to find a README or something included with each module.
> If all else fails you can always call the consultant who set up the
> other box.
>
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list