Re: [Nagios-users] Monitoring a Microsoft SQL Server

2011-11-18 Thread Kaplan, Andrew H.
Hi there --
 
I finally got both the check_mssql and check_mssql_health scripts to work with
the server in question. Listed below are the notes
that I took during the testing process. I hope they are of use, and if there are
any questions, please feel free to contact me at your
convenience. Thanks again to everyone for the help.
 
NOTE: The SQL Server in this scenario uses named instances, which result in
dynamic TCP/IP ports being used rather than 

static ones. The ports can be identified by running the SQL Server Configuration
Manager utility. Once the utility is open, go 

to the SQL Server Network Configuration section. Select the database in question
from the list of Protocols for... entries. 

Double-click on the TCP/IP option listed in the right pane. Select the IP
Addresses tab of the window that appears on-screen. 

Scroll down to the IPAll section, and make note of the value that is listed next
to the TCP Dynamic Ports field. That value is what 

will be used in the command syntax when running the script.

 

The user account, sa, along with its password will be needed to successfully
access the database. The command syntax, 

with the resulting output is shown below. 

 

check_mssql -H   --username sa --password  --port 

 

OK: Connect time=0.022503 seconds.

 

When using the check_mssql_health plugin, the first thing that needs to be done
is to add an entry of the SQL server to the 

/etc/freetds/freetds.conf file. This file is used by the plugin to connect to
the server. An excerpt of the file is shown below:

 

# 

[name of sql server]<- name of the server
used in the command syntax

host =  or 

port =<- TCP Dynamic port used by
the server instance  

tds version = 7.0

 

An example of the command syntax that is used to connect to the server is the
following:

 

/usr/local/nagios/libexec/check_mssql_health --server=
--username=sa 

--password= --port= --mode=connection-time

 

The output of the above command is shown below:

 

OK - 0.06 seconds to connect as sa | connection_time=0.06;1;5




From: Claudio Kuenzler [mailto:c...@claudiokuenzler.com] 
Sent: Thursday, November 17, 2011 3:33 PM
To: Kaplan, Andrew H.
Cc: Nagios Users List
Subject: Re: [Nagios-users] Monitoring a Microsoft SQL Server


The other ports don't appear like typical MSSQL ports.
Do you have by any chance the Windows firewall still active? Maybe the port is
being blocked there?
http://support.microsoft.com/kb/968872

Or do you use a named instance? I found this information on
http://benchmarkitconsulting.com/colin-stasiuk/2009/02/02/what-tcp-port-is-sql-s
erver-running-under/: "If you have a named instance the TCP port is dynamically
configured."
I've never seen this in a practical way before though.



On Thu, Nov 17, 2011 at 8:59 PM, Kaplan, Andrew H. 
wrote:



Hi there --
 
I tried connecting to port 1433 of the SQL server, and the connection
was refused. It appears that efforts to connect via the default
port will not work in this case. I took the liberty of running the
nestat -abn command syntax on the console of the SQL server, and
searched for all references to the sqlservr.exe binary. The results are
shown below:
 
Active Connections

[sqlservr.exe]

TCP 0.0.0.0:58477 0.0.0.0:0 LISTENING

[sqlservr.exe]

TCP 0.0.0.0:62502 0.0.0.0:0 LISTENING

[sqlservr.exe]

TCP 0.0.0.0:65249 0.0.0.0:0 LISTENING

[sqlservr.exe]

TCP 127.0.0.1:58751 0.0.0.0:0 LISTENING

[sqlservr.exe]

TCP 127.0.0.1:62503 0.0.0.0:0 LISTENING

[sqlservr.exe]

TCP 127.0.0.1:63954 127.0.0.1:63955 ESTABLISHED

[sqlservr.exe]

TCP 192.168.40.114:62502 192.168.40.122:50342 ESTABLISHED

[sqlservr.exe]

TCP 192.168.40.114:62502 192.168.40.125:60257 ESTABLISHED

[sqlservr.exe]

TCP 192.168.125.1:139 0.0.0.0:0 LISTENING

[sqlservr.exe]

TCP [::]:58477 [::]:0 LISTENING

[sqlservr.exe]

TCP [::]:62502 [::]:0 LISTENING

[sqlservr.exe]

TCP [::]:65249 [::]:0 LISTENING

[sqlservr.exe]

TCP [::1]:58751 [::]:0 LISTENING

[sqlservr.exe]

TCP [::1]:62005 [::1]:62006 ESTABLISHED

[sqlservr.exe]

UDP 0.0.0.0:123 *:* 

 

If the default port, 1433, is not reachable would one the above ports be
the alternate means of connecting to the server?

 

 







From: Claudio Kuenzler [mailto:c...@claudiokuenzler.com] 
Sent: Thursday, November 17, 2011 1:39 PM 

To: Nagios Users List
Subject: Re: [Nagios-users] Monitoring a Microsoft SQL Server


Please let us know if you get it working - I might have to add such a
check s

Re: [Nagios-users] MSSQL CRITICAL - Error: Provider cannot be found. It may not be properly installed

2011-11-18 Thread Minh R .
> Leif J.  ljnet.dk> writes:

> 
> 
> On a brand new Windows 2008R2 and MSSQL 2008R2 I have installed
> NSClient++ and put check_mssql_nt but when I try to connect to the
> localhost I'm getting: MSSQL CRITICAL - Error: Provider cannot
>   be found. It may not be properly installed
> What can it be ? I have looked several sites and have not yet
> figured it out why.
> /Leif
> 
> 
> --
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> 
> ___
> Nagios-users mailing list
> Nagios-users  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


I'm having the same issue. I have added the check_mssql_nt.exe file to the 
\NSClient++\scripts\ folder, un-commented the NRPEListener.dll in the nsc.ini 
file, allowed arguments under "COMMAND ARGUMENT PROCESSING" in the nsc.ini 
file, 
and added the following line to the "[External Scripts]" section of my client 
server's NSC.ini file:

check_mssql_connection=scripts\check_mssql_nt.exe /H:$ARG1$ /D:$ARG2$ /U:$ARG3$ 
/P:$ARG4$

Then I run the following command from the Nagios server as a test:

./check_nrpe -H sqlservername -c check_mssql_connection -a sqlservername 
sqldatabasename username password

The error returned is:

MSSQL CRITICAL - Error: Provider cannot be found. It may not be properly 
installed

Does anyone have any ideas?


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Presumed service dependencies?

2011-11-18 Thread Mike Chesnut
On 11/17/2011 01:00 AM, m...@catsnest.co.uk wrote:
>
>
> On Wed, Nov 16, 2011 at 9:33 PM, Mike Chesnut
> mailto:mi...@aggregateknowledge.com>> wrote:
>
> Is there a way to tell Nagios that I want all services on a host to be
> dependent on that host without having to write a separate
> servicedependency for every single service?  I can't even conceive of a
> situation where, when a host is down, I still want to get notified for
> all of its services being down too.
>
> Hopefully I'm just missing something simple...  Ideally I'd like to set
> this globally, in fact.
>
>
> Unless i am missing something that is the default behaviour, or at least
> how it works for us =)

I think what happens is something like this:

1. Nagios polls the host, it's UP
2. Host goes down
3. Nagios polls the services, they're DOWN

I suppose the way to address this would be to set it to not alert until 
the service has failed twice (and presume the host will be checked again 
in between those two service checks).  Is that what most people do?  Or 
is there a better way?

Thanks,
Mike

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Oracle plugin

2011-11-18 Thread Dermot Duffy
I have successfully installed the oracleclient and connected to the db - used a 
different version in the end (downgraded to 10_2_ and it worked fine).

My "check_oracle_instant" script however is posting out the following errors. 

libexec]# ./check_oracle_instant
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_UK"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
sh: sqlplus: command not found
Unable to connect to  ORACLE !!!

I have got the sqlplus & LD_LIB paths set correctly:

#!/usr/bin/perl

$host = $ARGV[0];
$port = $ARGV[1];
$service_name  = $ARGV[2];
$user  = $ARGV[3];
$pass  = $ARGV[4];

$ORACLE_HOME = "/root/instantclientdir";

### point this to your sqlplus binary
my $sqlplus = "/root/instantclientdir/bin/sqlplus";

### point this to your sqlplus directory
$ENV{"LD_LIBRARY_PATH"} = "/root/instantclientdir/lib";

...any ideas on how to resolve this?


-Original Message-
From: Onotsky, Steve x55328 [mailto:steve.onot...@broadridge.com] 
Sent: 17 November 2011 17:40
To: Nagios Users List
Subject: Re: [Nagios-users] Oracle plugin

>From: Dermot Duffy [mailto:dermot.du...@brandtone.ie]
>Sent: Thursday, November 17, 2011 11:49 AM
>To: Nagios Users List
>Subject: Re: [Nagios-users] Oracle plugin
>
>I brought the sqlplus binary across from the db server but I get the
following error..
>
># ldd /usr/local/instantclient_10_2/sqlplus
>/usr/local/instantclient_10_2/sqlplus: error while loading shared
libraries: /usr/lib/libclntsh.so.10.1: ELF file data encoding not little-endian
>
>Is there any way to load these shared libraries onto the nagios server?

There is, but you'll save yourself a lot of heartache if you just installed the 
Oracle client on your Nagios machine.  IIRC you can obtain it from Oracle as 
part of your maintenance, gratis...

\sao


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

--
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security threats, 
fraudulent activity, and more. Splunk takes this data and makes sense of it. IT 
sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Nagios-users mailing list
Nagios-users@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

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] R: I: R: R: configuration tool

2011-11-18 Thread Marco Borsani
I am connecting as root .. also using a tool like TOAD.
But I still can't perform any admin tasks remotely (via command line or web 
tool).

MySQL> Select user,host,password from user;
+--+--+--+
| user | host   | password  
  |
+--+--+--+
| root | localhost   | *FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E |
| root || *FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E |
| root | 127.0.0.1   | *FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E |
|   | localhost   | 
  |
|   ||
   |
| root |  | *FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E |
| root |   | *FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E |
| root | % | *FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E |
+--+--+--+
 

Thanks
Marco

-Messaggio originale-
Da: Giorgio Zarrelli [mailto:zarre...@linux.it] 
Inviato: giovedì 17 novembre 2011 22:02
A: Nagios Users List
Cc: NAGIOS
Oggetto: Re: [Nagios-users] I: R: R: configuration tool

So, you are not Connecting as root from nagiosql

Please paste here The nagiosql install screenshot and The result of

use mysql ;

Select user,host,password from user;

Ciao,

Giorgio

Il giorno 17/nov/2011, alle ore 16:45, "Marco Borsani"  ha 
scritto:

> Nothing happen, I still have same problem.
> 
> Marco
> 
> -Messaggio originale-
> Da: Giorgio Zarrelli [mailto:zarre...@linux.it]
> Inviato: gioved  17 novembre 2011 14:39
> A: Marco Borsani
> Cc: 'Giorgio Zarrelli'; 'Nagios Users List'
> Oggetto: Re: R: R: [Nagios-users] configuration tool
> 
> Hi,
> 
>> MySQL> grant all on mysql.* to root@’' identified by
>> 'password';
> 
> Try
> 
> MySQL> grant all on *.* to root@% identified by 'password';
> 
> It will allow connection as root from ANY host/hostname and will give ALL 
> privileges on ALL databases.
> 
> As I told before: REMOVE this user as soon as you complete NagioSQL 
> installation.
> 
> 
> --
>  All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> Nagios-users mailing list
> Nagios-users@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

--
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security threats, 
fraudulent activity, and more. Splunk takes this data and makes sense of it. IT 
sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Nagios-users mailing list
Nagios-users@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


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Nagios-users mailing list
Nagios-users@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