Re: [Nagios-users] large map

2009-08-28 Thread Simone Felici

Thank you!
I'll try it asap

Have a nice day!

Simon

Max Hetrick ha scritto in data 27/08/2009 22.10:
> Yeah, it's a rather large map too, but it's more readable than some of 
> the Nagios maps. I only have 160 Hosts and 480 services. What I did for 
> the main network map, was trim out all the services and have it just 
> print the host and dependencies with an IP address.
> 
> Attached is the shell script that was edited from NagiosExchange:
> 
> http://exchange.nagios.org/directory/Addons/Frontends-(GUIs-and-CLIs)/Linux-Interfaces/nagiosCfgVisualizer/details
>  
> 
> 
> I have another that I changed that does just hosts and services as well. 
> All I did was delete the items I didn't want gathered from the original 
> script.
> 
> The original author had no usage lines in the script, so you can either 
> edit it to include fulls paths, or just copy objects.cache to a working 
> directory and work from it there.
> 
> # USAGE: You need to be in the same directory where a copy
> # of objects.cache resides.
> # cp /var/log/nagios/objects.cache .
> # sh /path/to/nagiosCfgVisualizer_Hosts.sh objects.cache
> 
> 
> Regards,
> Max
> 
> 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Nagios Start-up Failure

2009-08-28 Thread Wheeler, Jonathan (STFC,RAL,ESC)
> -Original Message-
> From: VINCENT BOB-DMHG67 [mailto:bob.vinc...@motorola.com]
> Sent: 27 August 2009 17:11
> To: Terry
> 
> Here is the beginning and the tail end of the debug output generated
by
> adding the settings below.
> It doesn't seem to indicate any reason why it stops.
> I'm hoping that someone more familiar with Nagios than I can help.

I have not been following this thread, but one reason that Nagios fails
at the very end of its start-up is if the command pipe file (ours is in
/var/log/nagios/rw/nagios.cmd - defined by parameter command_file in the
main Nagios configuration file) exists as a file rather than a pipe.  On
our installation this can occur during Nagios start-up as some of our
procedures, running from a cron job, write directly to the command pipe
and will create it as a standard file if it does not exist.  The
solution is to delete the file and restart the Nagios process.

Jonathan Wheeler 
e-Science Centre 
Rutherford Appleton Laboratory
-- 
Scanned by iCritical.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Nagios Start-up Failure

2009-08-28 Thread Kevin Keane
Wheeler, Jonathan (STFC,RAL,ESC) wrote:
>> -Original Message-
>> From: VINCENT BOB-DMHG67 [mailto:bob.vinc...@motorola.com]
>> Sent: 27 August 2009 17:11
>> To: Terry
>>
>> Here is the beginning and the tail end of the debug output generated
>> 
> by
>   
>> adding the settings below.
>> It doesn't seem to indicate any reason why it stops.
>> I'm hoping that someone more familiar with Nagios than I can help.
>> 
>
> I have not been following this thread, but one reason that Nagios fails
> at the very end of its start-up is if the command pipe file (ours is in
> /var/log/nagios/rw/nagios.cmd - defined by parameter command_file in the
> main Nagios configuration file) exists as a file rather than a pipe.  On
> our installation this can occur during Nagios start-up as some of our
> procedures, running from a cron job, write directly to the command pipe
> and will create it as a standard file if it does not exist.  The
> solution is to delete the file and restart the Nagios process.
>   
Interesting observation! I haven't tried it, but one possible way to 
address this is by putting the command pipe file into a directory that 
is read-only to everybody but user Nagios. As long as the cron jobs run 
as a different user (and not as user root, who can always write 
anywhere), they would not be able to create ordinary files in that 
directory, but they would still be able to access the pipe once Nagios 
creates it.

Of course you would then possibly have to handle any errors within the 
cron scripts.

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] [Nagiosplug-help] Regarding Reports in Nagios

2009-08-28 Thread Saiprasad @ Yahoo
Can someone let me know what all options (see the print screen) do I need to 
select if I need to generate a report (Availability) for a particular host / 
service using Nagios.
 
NOTE : I am using Nagios Version 3.0.3 on Linux

Would appreciate a quicker response.



From: Marc Powell 
To: Nagios Plugin Help List 
Sent: Wednesday, 26 August, 2009 8:27:17 PM
Subject: Re: [Nagiosplug-help] Regarding Reports in Nagios


On Aug 26, 2009, at 9:32 AM, Narasimha Tadepalli wrote:

> Hi Mark
>
> I got same question for a while. If I turn of this flag  
> 'log_initial_states' am I able to see the all entries even after  
> every restart of nagios?.

With this enabled, on restart Nagios will log the current state of all  
hosts and services. The option only controls whether nagios does this  
on restart. Nagios does not need this but it's there in case you do.

--
Marc


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Nagiosplug-help mailing list
nagiosplug-h...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null



  See the Web's breaking stories, chosen by people like you. Check out 
Yahoo! Buzz. http://in.buzz.yahoo.com/<>--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] [Nagiosplug-help] Regarding Reports in Nagios

2009-08-28 Thread Juki
Assuming you have already selected the particular host a couple of screens
back, you can select a Report Period from the drop down menu say, last 7
days or last month. After which, just click 'Create Availability Report'

If you would like to specify a custom period, go under the 'Report Period'
drop down menu and select 'Custom Period'. After which, you may go ahead and
choose your Start and End dates. After which, just click 'Create
Availability Report'


HTH,
Juki



2009/8/28 Saiprasad @ Yahoo 

>  Can someone let me know what all options (see the print screen) do I need
> to select if I need to generate a report (Availability) for a particular
> host / service using Nagios.
>
> NOTE : I am using Nagios Version 3.0.3 on Linux
> Would appreciate a quicker response.
>  --
> *From:* Marc Powell 
> *To:* Nagios Plugin Help List 
> *Sent:* Wednesday, 26 August, 2009 8:27:17 PM
> *Subject:* Re: [Nagiosplug-help] Regarding Reports in Nagios
>
>
> On Aug 26, 2009, at 9:32 AM, Narasimha Tadepalli wrote:
>
> > Hi Mark
> >
> > I got same question for a while. If I turn of this flag
> > 'log_initial_states' am I able to see the all entries even after
> > every restart of nagios?.
>
> With this enabled, on restart Nagios will log the current state of all
> hosts and services. The option only controls whether nagios does this
> on restart. Nagios does not need this but it's there in case you do.
>
> --
> Marc
>
>
>
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ___
> Nagiosplug-help mailing list
> nagiosplug-h...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
> --
> Beauty is just a click away. Find beauty parlor listings on Yahoo! India
> Local 
>
>
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ___
> 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
>



-- 
JuKi

"Intelligence plus character - that is the goal of true education."
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] Occasionally "Return code of 127 for check of host/service was out of bounds. Make sure the plugin you're trying to run actually exists."

2009-08-28 Thread Marc Powell

On Aug 28, 2009, at 12:52 AM, Morten Guldager wrote:

> Warning: Return code of 127 for check of host 'myhost' was out of  
> bounds. Make sure the plugin you're trying to run actually exists.
> Warning: Return code of 127 for check of service 'myservice' on host  
> 'myhost' was out of bounds. Make sure the plugin you're trying to  
> run actually exists.
>
> I tracked it down to calls to the plugins were bloated with a huge  
> set of environment variables, every plugin call where served  
> something that looked like a big chunk of sibling hosts or services  
> from the same hostgroup/servicegroup.
>
> The fix were easy, flip the config variable  
> "enable_environment_macros" in nagios.cfg from 1 to 0.

Interesting... Good catch. Thanks for sharing.

--
Marc


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Odd problem with services listing

2009-08-28 Thread Joe Hartley
Ah, brilliant thinking, it hadn't occurred to me to check the HTML.
Turns out that all the entries are there, but because of a malformed
statement in a config file that had been auto-generated for
NagiosGrapher, there was a quotation mark that didn't have a
corresponding closer, causing a large section of HTML to be included in
an HREF statement.  It was only when it got to yet another malformed
statement in a different NagiosGrapher config file that the quote was
closed to the satisfaction of the browser and the services started to be
displayed again.

I just deleted the bad config files (I wasn't interested in them anyway,
and am not sure exactly what caused them to be created in the first
place) and I saw all the services.

Thanks for the pointer! 

--
Joe Hartley | Sr. Linux SysAdmin
Retail Solutions, Inc.
40 Sharpe Drive
Cranston, RI 02920
joe.hart...@retailsolutions.com 
+1 401.824.5040 (o) | +1 401.824.5002 (f)


-Original Message-
From: Jim Avery [mailto:j...@jimavery.me.uk] 
Sent: Thursday, August 27, 2009 2:16 PM
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] Odd problem with services listing

I haven't seen anything like this myself, but here are some thoughts
in case any of them might help ...

Try a different browser.

Do a 'view source' of the defective page (and the good one) to see if
that holds any clues.

Do your Apache logs show anything?

Were there any errors during compilation?  Were the cgis definitely
installed (overwriting the old ones) when you upgraded?

hth and good luck,

Jim


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day 
trial. Simplify your report design, integration and deployment - and
focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Nagios Start-up Failure

2009-08-28 Thread VINCENT BOB-DMHG67
Thanks Jonathan,

I just verified that the rw/nagios.cmd file is indeed a pipe and thus
not the problem.

I hope that someone else on the list has an idea.

Bob 

-Original Message-
From: Wheeler, Jonathan (STFC,RAL,ESC)
[mailto:jonathan.whee...@stfc.ac.uk] 
Sent: Friday, August 28, 2009 12:15 AM
To: nagios-users@lists.sourceforge.net
Cc: VINCENT BOB-DMHG67; Terry
Subject: RE: [Nagios-users] Nagios Start-up Failure

> -Original Message-
> From: VINCENT BOB-DMHG67 [mailto:bob.vinc...@motorola.com]
> Sent: 27 August 2009 17:11
> To: Terry
> 
> Here is the beginning and the tail end of the debug output generated
by
> adding the settings below.
> It doesn't seem to indicate any reason why it stops.
> I'm hoping that someone more familiar with Nagios than I can help.

I have not been following this thread, but one reason that Nagios fails
at the very end of its start-up is if the command pipe file (ours is in
/var/log/nagios/rw/nagios.cmd - defined by parameter command_file in the
main Nagios configuration file) exists as a file rather than a pipe.  On
our installation this can occur during Nagios start-up as some of our
procedures, running from a cron job, write directly to the command pipe
and will create it as a standard file if it does not exist.  The
solution is to delete the file and restart the Nagios process.

Jonathan Wheeler
e-Science Centre
Rutherford Appleton Laboratory
--
Scanned by iCritical.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Nagios Start-up Failure

2009-08-28 Thread Wheeler, Jonathan (STFC,RAL,ESC)
> -Original Message-
> From: Kevin Keane [mailto:subscript...@kkeane.com]
> Sent: 28 August 2009 08:28
> Cc: Nagios User list
> Subject: Re: [Nagios-users] Nagios Start-up Failure
> 
> Wheeler, Jonathan (STFC,RAL,ESC) wrote:
(snip)
> >
> > I have not been following this thread, but one reason that Nagios
fails
> > at the very end of its start-up is if the command pipe file (ours is
in
> > /var/log/nagios/rw/nagios.cmd - defined by parameter command_file in
the
> > main Nagios configuration file) exists as a file rather than a pipe.
On
> > our installation this can occur during Nagios start-up as some of
our
> > procedures, running from a cron job, write directly to the command
pipe
> > and will create it as a standard file if it does not exist.  The
> > solution is to delete the file and restart the Nagios process.
> >
> Interesting observation! I haven't tried it, but one possible way to
> address this is by putting the command pipe file into a directory that
> is read-only to everybody but user Nagios. As long as the cron jobs
run
> as a different user (and not as user root, who can always write
> anywhere), they would not be able to create ordinary files in that
> directory, but they would still be able to access the pipe once Nagios
> creates it.

Not at straightforward as that.  The rw directory and the command pipe
are owned by nagios:HTTPUSER (where HTTPUSER might be http or apache)
because the command pipe is written by the nsca and nrpe daemons as well
as the web interface; therefore the cron job runs as userid nagios (not
root).

Jonathan Wheeler 
e-Science Centre 
Rutherford Appleton Laboratory
-- 
Scanned by iCritical.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] monitoring windows clusters

2009-08-28 Thread Terry
On Fri, Aug 28, 2009 at 1:51 AM, Jim Avery wrote:
> 2009/8/27 Terry :
>
>> The other thing we have tried with clusters is to monitor cluster
>> services and cluster resources on a specific cluster IP and only
>> monitor stock windows services and drives on the actual host.
>
>
> Absolutely this is what I do.  I monitor the clustered services
> associated with a 'host' on the clustered IP address.  This clustered
> 'host' has the actual servers as its parents.
>
> I only use the check_cluster plugin for clusters of the kind where all
> nodes in the cluster are live at the same time, for example a Citrix
> farm where I only want to be bothered out of hours if more than a
> couple of nodes are down at a time.
>
> --


That sounds good too.  I think both options are good.  The other thing
to consider is determining when a failover event has occurred.  I
imagine this can be done with eventlog monitoring but any other tricks
out there?  None of this is too hard, just want some alternative
ideas.  Thanks all!

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread David Dyer-Bennet
I don't really understand the purpose / utility of the "command" level of
abstraction in Nagios configuration.  (2.10; we're still on Centos 4.7).

To define a new service to check particular Windows web services we've
written, I define a service, and then it has to refer to a command, and
over in the command I have to hard-code the parameters needed to test this
specific service -- so in fact I need a separate command for each service.
 This seems, to me, to just introduce confusion, and separate bits of
information that belong together.

Is this just a historical artifact that in fact doesn't make much sense,
or are there lots of cases where it's useful and makes it easier or
clearer to do what you want?

(I'm fine with "that's the way it works, but it doesn't really make much
sense as it turns out", I've got plenty of that in my own code; I'm just
looking for more understanding, in case it makes more sense than I've so
far figured out.)

As a broader question, are there documents that give more of a logical
overview of Nagios, explaining how and why things are broken up and how
they work together?
-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread David Rosenstrauch
On 08/28/2009 01:18 PM, David Dyer-Bennet wrote:
> I don't really understand the purpose / utility of the "command" level of
> abstraction in Nagios configuration.  (2.10; we're still on Centos 4.7).
> 
> To define a new service to check particular Windows web services we've
> written, I define a service, and then it has to refer to a command, and
> over in the command I have to hard-code the parameters needed to test this
> specific service -- so in fact I need a separate command for each service.
>  This seems, to me, to just introduce confusion, and separate bits of
> information that belong together.
> 
> Is this just a historical artifact that in fact doesn't make much sense,
> or are there lots of cases where it's useful and makes it easier or
> clearer to do what you want?
> 
> (I'm fine with "that's the way it works, but it doesn't really make much
> sense as it turns out", I've got plenty of that in my own code; I'm just
> looking for more understanding, in case it makes more sense than I've so
> far figured out.)

I can't speak to Nagios v2.x, but at least on Nagios 3.x the command 
definitions have variable, not hard-coded, parameters.  So the command 
definition essentially winds up being the general definition of what you 
want to check (e.g., check that a web server is up, using the check_http 
plugin), while the service definition provides specific details of which 
machine(s) should be checked using the command and how.  (e.g., check 
that the web servers on boxes 1, 2, and 3 are up, that page /news.html 
doesn't return a 404, and that the page contains the text "News".)


> As a broader question, are there documents that give more of a logical
> overview of Nagios, explaining how and why things are broken up and how
> they work together?

Again, I'm responding for Nagios 3.x, but the docs are here:

http://nagios.sourceforge.net/docs/3_0/

Perhaps there's also docs on the site for v2.x.

HTH,

DR

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] monitoring windows clusters

2009-08-28 Thread Jim Avery
2009/8/28 Terry :
>The other thing
> to consider is determining when a failover event has occurred.  I
> imagine this can be done with eventlog monitoring but any other tricks
> out there?

For AIX HA/CMP failover, we edit the failover script so it sends a
check to Nagios using send_nsca whenever it does the failover.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread Mark Gius
It allows you to have a single "command" that may have variable results 
depending on which "service" uses it.

IE, you can have one command, check_disk which is defined with

command check_disk -w $ARG1$ -c $ARG2$ -H $HOSTADDRESS$

and then two services, "Check disk fileserver" and "check disk webserver"

In these, you'll define

check_command check_disk!80!90

or

check_command check_disk!85!95

So now your web servers and file servers are using the same command with 
different arguments depending on which service you choose to apply to a 
host.

It's true that you can have a 1-1 command/service relationship, but this 
method allows you to be more flexible.

This works for Nagios 2.x as well as 3.x

-Gius

David Dyer-Bennet wrote:
> I don't really understand the purpose / utility of the "command" level of
> abstraction in Nagios configuration.  (2.10; we're still on Centos 4.7).
>
> To define a new service to check particular Windows web services we've
> written, I define a service, and then it has to refer to a command, and
> over in the command I have to hard-code the parameters needed to test this
> specific service -- so in fact I need a separate command for each service.
>  This seems, to me, to just introduce confusion, and separate bits of
> information that belong together.
>
> Is this just a historical artifact that in fact doesn't make much sense,
> or are there lots of cases where it's useful and makes it easier or
> clearer to do what you want?
>
> (I'm fine with "that's the way it works, but it doesn't really make much
> sense as it turns out", I've got plenty of that in my own code; I'm just
> looking for more understanding, in case it makes more sense than I've so
> far figured out.)
>
> As a broader question, are there documents that give more of a logical
> overview of Nagios, explaining how and why things are broken up and how
> they work together?
>   


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread andrew2
Why not create more generic command definitions and pass the specific
arguments along to the commands in your service definitions?

http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#command

Andrew
 

-Original Message-
From: David Dyer-Bennet [mailto:d...@dd-b.net] 

I don't really understand the purpose / utility of the "command" level of
abstraction in Nagios configuration.  (2.10; we're still on Centos 4.7).

To define a new service to check particular Windows web services we've
written, I define a service, and then it has to refer to a command, and
over in the command I have to hard-code the parameters needed to test this
specific service -- so in fact I need a separate command for each service.
 This seems, to me, to just introduce confusion, and separate bits of
information that belong together.

Is this just a historical artifact that in fact doesn't make much sense,
or are there lots of cases where it's useful and makes it easier or
clearer to do what you want?



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread Marc Powell

On Aug 28, 2009, at 12:18 PM, David Dyer-Bennet wrote:

> I don't really understand the purpose / utility of the "command"  
> level of
> abstraction in Nagios configuration.  (2.10; we're still on Centos  
> 4.7).
>
> To define a new service to check particular Windows web services we've
> written, I define a service, and then it has to refer to a command,  
> and
> over in the command I have to hard-code the parameters needed to  
> test this
> specific service -- so in fact I need a separate command for each  
> service.

Can you give an example? I think you just don't know the flexibility  
that is available. You shouldn't need to hard code much except those  
things that are constant. Nagios has extensive macro capabilities and  
allows you to pass much data from service definitions and other parts  
of nagios to the commands being run. This allows you to re-use generic  
command definitions between many different services that check similar  
things. Have you read the Macro documentation, particularly passing  
arguments to commands?

> As a broader question, are there documents that give more of a logical
> overview of Nagios, explaining how and why things are broken up and  
> how
> they work together?

The published Documentation? Beyond that, ask specifics but be sure  
you've read the documentation first.

--
Marc


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread Jim Avery
2009/8/28 David Dyer-Bennet :
> I don't really understand the purpose / utility of the "command" level of
> abstraction in Nagios configuration.  (2.10; we're still on Centos 4.7).


If you use some of the plugins with quite complex arguments
(check_snmp_storage.pl from http://manubulon.com comes to mind) it can
be very useful to hide away some of them behind a layer of
abstraction, especially when you're using this same plugin sometimes
to check disks and other times to check swap or memory.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread David Dyer-Bennet


On Fri, August 28, 2009 12:57, andr...@one.net wrote:
> Why not create more generic command definitions and pass the specific
arguments along to the commands in your service definitions?
>
> http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#command

Aha!  That's precisely what I would prefer to do, but I had been unable to
find any indication that it was possible; hence my puzzlement about what
the intermediate level was good for.

-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info



-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Why are there "commands"?

2009-08-28 Thread David Dyer-Bennet

On Fri, August 28, 2009 13:26, Marc Powell wrote:
>
> On Aug 28, 2009, at 12:18 PM, David Dyer-Bennet wrote:
>
>> I don't really understand the purpose / utility of the "command"
>> level of
>> abstraction in Nagios configuration.  (2.10; we're still on Centos
>> 4.7).
>>
>> To define a new service to check particular Windows web services we've
>> written, I define a service, and then it has to refer to a command,
>> and
>> over in the command I have to hard-code the parameters needed to
>> test this
>> specific service -- so in fact I need a separate command for each
>> service.
>
> Can you give an example? I think you just don't know the flexibility
> that is available.

That seems to be the case.

> You shouldn't need to hard code much except those
> things that are constant. Nagios has extensive macro capabilities and
> allows you to pass much data from service definitions and other parts
> of nagios to the commands being run. This allows you to re-use generic
> command definitions between many different services that check similar
> things. Have you read the Macro documentation, particularly passing
> arguments to commands?

I had no idea that "macros" described something having to do with command
arguments, and the examples I saw looked very limited and were all
involved with user names and passwords.

>> As a broader question, are there documents that give more of a logical
>> overview of Nagios, explaining how and why things are broken up and
>> how they work together?
>
> The published Documentation? Beyond that, ask specifics but be sure
> you've read the documentation first.

I tried to find anything relevant on commands in the published
documentation, and didn't find anything suggesting the possibility of
command-line arguments, so I thought I'd checked and found it wasn't
possible.

-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] check_http and regular expressions

2009-08-28 Thread shadih rahman
Here is command line definition which works fine for what you are trying to
achieve.


define command{
command_namecheck_https_reverse
command_line$USER1$/check_http -H $HOSTADDRESS$ -S -u $ARG1$ -r
$ARG2$ -r $ARG3$ --invert-regex
}



On Thu, Aug 27, 2009 at 9:30 PM, Marc Powell  wrote:

>
> On Aug 27, 2009, at 5:27 PM, Masoud Tabrizi wrote:
>
> > I am running the command as you suggested but it seems like there is
> > something missing; what am I doing wrong?
>
> Nothing, you just don't know how nagios determines status. It's not
> the plugin text output, that's just for humans. Nagios determines OK,
> CRITICAL, etc from the exit code of the plugin.
>
> > All commans are run from /usr/lib/nagios/plugins directory;
> >
> > /usr/lib/nagios/plugins/check_http -H x -u /sample/test.html -p
> > 80 –a user:password -s TAPE
> > Response:
> > HTTP OK HTTP/1.1 200 OK - 0.018 second response time |
> > time=0.018116s;;;0.00 size=3648B;;;0
>
> echo $?  - should be 0
>
> > Now I run it with negate as you suggested:
> > ./negate /usr/lib/nagios/plugins/check_http -H x -u /sample/
> > test.html -p 80 –a user:password -s TAPE
> > HTTP OK HTTP/1.1 200 OK - 0.006 second response time |
> > time=0.006001s;;;0.00 size=3648B;;;0
>
> echo $? - should be 2
>
> --
> Marc
>
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ___
> 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
>



-- 
Cordially,
Shadhin Rahman
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] check_http confusion / problem

2009-08-28 Thread David Dyer-Bennet
Thanks to various list members for pointing me at various bits of
documentation that I hadn't been able to find, which explain that commands
can in fact take arguments, and that those and other useful things are
called "macros".  (I've been using macros since 1401 Autocoder, and mostly
think of them as compile time code-generating tools.)

So, what's with the check_http plugin?  The parameters it accepts don't
match the parameters its help says it accepts.  But beyond that, the -e
switch doesn't seem to do what it says it should.

I'm not getting invalid results because I'm running from the command line,
am I?  This seems much the easiest way to test things, and it rather
sounds like this is an intended use.  But thought I'd ask just to be sure.

In this case, the expected result of the test is a 400 Bad Request error
(because I'm hitting a web services port and requesting root; this test is
intended to do a minimal check and see that the service director is up,
but not test the individual services yet).  So the "400 Bad Request"
response is correct and valid.

Now, the -e switch seems to be intended to check just this status line,
and to nicely short-circuit later processing, and seems in all ways
optimized for exactly what I'm doing.  Except for the minor fact that it
doesn't seem to work.  See below, run in verbose mode.  I've tried a bunch
of variants on the value I pass to -e, including the whole line given, and
they all give the same result, an exit code of 2 and the "invalid HTTP
response code" message.   So what's up?  And is there more documentation
on the plugins hidden somewhere, particularly this one?

[...@prcapp00 dev]$ /usr/lib/nagios/plugins/check_http
--IP-address=192.168.5.3 -p 8075 --no-body -f critical -v -v -v -e="Bad
Request"
GET / HTTP/1.0
User-Agent: check_http/1.99 (nagios-plugins 1.4.6)


http://192.168.5.3:8075/ is 168 characters
STATUS: HTTP/1.1 400 Bad Request
 HEADER 
Content-Type: text/html
Date: Fri, 28 Aug 2009 18:33:44 GMT
Connection: close
Content-Length: 39
 CONTENT 
  [[ skipped ]]
Invalid HTTP response received from host on port 8075
[...@prcapp00 dev]$ echo $?
2



-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] check_http confusion / problem

2009-08-28 Thread jmoseley
No, it works - you have an '=' character after the '-e' argument.  Leave
that out or use "expect="

For more documentation:

check_http --help


James Moseley




"David Dyer-Bennet"   wrote:

[...@prcapp00 dev]$ /usr/lib/nagios/plugins/check_http
--IP-address=192.168.5.3 -p 8075 --no-body -f critical -v -v -v -e="Bad
Request"




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] monitoring windows clusters

2009-08-28 Thread Terry
On Fri, Aug 28, 2009 at 1:11 PM, Jim Avery wrote:
> 2009/8/28 Terry :
>>The other thing
>> to consider is determining when a failover event has occurred.  I
>> imagine this can be done with eventlog monitoring but any other tricks
>> out there?
>
> For AIX HA/CMP failover, we edit the failover script so it sends a
> check to Nagios using send_nsca whenever it does the failover.
>
> --


Another question.  Here's my check_cluster:
define service{
use service-active
host_name   omalindb02
service_description microsoft sql cluster
check_command
check_service_cluster!1:1!1:1!$SERVICESTATEID:omalindb02a:microsoft
sql server service$,$SERVICESTATEID:omalindb02b:microsoft sql server
service$
}
define command{
command_namecheck_service_cluster
command_line$USER1$/check_cluster --service -w $ARG1$ -c
$ARG2$ -d $ARG3$
}

Here's the current status:
CLUSTER OK: Service cluster: 1 ok, 0 warning, 0 unknown, 1 critical

As you can see, we have 1 up and 1 down.  This is what I consider
good.  So, why would my service above be returning OK?   Doesn't the
1:1 mean that nagios will generate a CRITICAL alert if 1 or more
services in the cluster are in a non-OK state?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Nagios Start-up Failure

2009-08-28 Thread Kevin Keane
When Nagios is stopped, it shouldn't exist at all. Maybe you can delete 
the nagios.cmd file before trying to start Nagios again?

VINCENT BOB-DMHG67 wrote:
> Thanks Jonathan,
>
> I just verified that the rw/nagios.cmd file is indeed a pipe and thus
> not the problem.
>
> I hope that someone else on the list has an idea.
>
> Bob 
>
> -Original Message-
> From: Wheeler, Jonathan (STFC,RAL,ESC)
> [mailto:jonathan.whee...@stfc.ac.uk] 
> Sent: Friday, August 28, 2009 12:15 AM
> To: nagios-users@lists.sourceforge.net
> Cc: VINCENT BOB-DMHG67; Terry
> Subject: RE: [Nagios-users] Nagios Start-up Failure
>
>   
>> -Original Message-
>> From: VINCENT BOB-DMHG67 [mailto:bob.vinc...@motorola.com]
>> Sent: 27 August 2009 17:11
>> To: Terry
>>
>> Here is the beginning and the tail end of the debug output generated
>> 
> by
>   
>> adding the settings below.
>> It doesn't seem to indicate any reason why it stops.
>> I'm hoping that someone more familiar with Nagios than I can help.
>> 
>
> I have not been following this thread, but one reason that Nagios fails
> at the very end of its start-up is if the command pipe file (ours is in
> /var/log/nagios/rw/nagios.cmd - defined by parameter command_file in the
> main Nagios configuration file) exists as a file rather than a pipe.  On
> our installation this can occur during Nagios start-up as some of our
> procedures, running from a cron job, write directly to the command pipe
> and will create it as a standard file if it does not exist.  The
> solution is to delete the file and restart the Nagios process.
>
> Jonathan Wheeler
> e-Science Centre
> Rutherford Appleton Laboratory
> --
> Scanned by iCritical.
>
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ___
> 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
>   


-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Nagios Start-up Failure

2009-08-28 Thread Kevin Keane
Wheeler, Jonathan (STFC,RAL,ESC) wrote:
>> -Original Message-
>> From: Kevin Keane [mailto:subscript...@kkeane.com]
>> Sent: 28 August 2009 08:28
>> Cc: Nagios User list
>> Subject: Re: [Nagios-users] Nagios Start-up Failure
>>
>> Wheeler, Jonathan (STFC,RAL,ESC) wrote:
>> 
> (snip)
>   
>>> I have not been following this thread, but one reason that Nagios
>>>   
> fails
>   
>>> at the very end of its start-up is if the command pipe file (ours is
>>>   
> in
>   
>>> /var/log/nagios/rw/nagios.cmd - defined by parameter command_file in
>>>   
> the
>   
>>> main Nagios configuration file) exists as a file rather than a pipe.
>>>   
> On
>   
>>> our installation this can occur during Nagios start-up as some of
>>>   
> our
>   
>>> procedures, running from a cron job, write directly to the command
>>>   
> pipe
>   
>>> and will create it as a standard file if it does not exist.  The
>>> solution is to delete the file and restart the Nagios process.
>>>
>>>   
>> Interesting observation! I haven't tried it, but one possible way to
>> address this is by putting the command pipe file into a directory that
>> is read-only to everybody but user Nagios. As long as the cron jobs
>> 
> run
>   
>> as a different user (and not as user root, who can always write
>> anywhere), they would not be able to create ordinary files in that
>> directory, but they would still be able to access the pipe once Nagios
>> creates it.
>> 
>
> Not at straightforward as that.  The rw directory and the command pipe
> are owned by nagios:HTTPUSER (where HTTPUSER might be http or apache)
> because the command pipe is written by the nsca and nrpe daemons as well
> as the web interface; therefore the cron job runs as userid nagios (not
> root).
>   
Maybe you could change the cron job to run as a different user that is 
member of HTTPUSER?

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] check_http confusion / problem

2009-08-28 Thread David Dyer-Bennet

On Fri, August 28, 2009 14:25, jmose...@corp.xanadoo.com wrote:
> No, it works - you have an '=' character after the '-e' argument.  Leave
> that out or use "expect="
>
> For more documentation:
>
> check_http --help

That's where I found --expect= in the first place.  All my tests showed it
not working as I "expected", and I started thrashing around as usual, and
eventually ended up with -e= which is of course wrong (incomplete
editing).

What is the argument?  A regexp?  The other match parameters are, but this
one doesn't say so.  A full-line match?  An initial segment match?  Will
it match anywhere within the line?
-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] check_http confusion / problem

2009-08-28 Thread jmoseley
Not sure if regular expressions will work, but here's an example:

[r...@plugins]# ./check_http -H www -e "HTT"
HTTP OK HTTP/1.1 200 OK - 318 bytes in 0.004 seconds
|time=0.004054s;;;0.00 size=318B;;;0

It finds the 'HTT' in the following status line:

STATUS: HTTP/1.1 200 OK

so it returns an 'OK' condition.

However:

[r...@plugins]# ./check_http -H www -e "HTP"
HTTP CRITICAL - Invalid HTTP response received from host

There is no 'HTP' string in the status line, so the plugin returns a
critical condition.



James Moseley




"David Dyer-Bennet"  wrote:

That's where I found --expect= in the first place.  All my tests showed it
not working as I "expected", and I started thrashing around as usual, and
eventually ended up with -e= which is of course wrong (incomplete
editing).

What is the argument?  A regexp?  The other match parameters are, but this
one doesn't say so.  A full-line match?  An initial segment match?  Will
it match anywhere within the line?




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] check_http confusion / problem

2009-08-28 Thread Jon Angliss
On Fri, 28 Aug 2009 14:01:44 -0500, "David Dyer-Bennet"
 wrote:

>Thanks to various list members for pointing me at various bits of
>documentation that I hadn't been able to find, which explain that commands
>can in fact take arguments, and that those and other useful things are
>called "macros".  (I've been using macros since 1401 Autocoder, and mostly
>think of them as compile time code-generating tools.)
>
>So, what's with the check_http plugin?  The parameters it accepts don't
>match the parameters its help says it accepts.  But beyond that, the -e
>switch doesn't seem to do what it says it should.
>
>I'm not getting invalid results because I'm running from the command line,
>am I?  This seems much the easiest way to test things, and it rather
>sounds like this is an intended use.  But thought I'd ask just to be sure.
>
>In this case, the expected result of the test is a 400 Bad Request error
>(because I'm hitting a web services port and requesting root; this test is
>intended to do a minimal check and see that the service director is up,
>but not test the individual services yet).  So the "400 Bad Request"
>response is correct and valid.
>
>Now, the -e switch seems to be intended to check just this status line,
>and to nicely short-circuit later processing, and seems in all ways
>optimized for exactly what I'm doing.  Except for the minor fact that it
>doesn't seem to work.  See below, run in verbose mode.  I've tried a bunch
>of variants on the value I pass to -e, including the whole line given, and
>they all give the same result, an exit code of 2 and the "invalid HTTP
>response code" message.   So what's up?  And is there more documentation
>on the plugins hidden somewhere, particularly this one?

--help usually gives a whole bunch of extra information...

>[...@prcapp00 dev]$ /usr/lib/nagios/plugins/check_http
>--IP-address=192.168.5.3 -p 8075 --no-body -f critical -v -v -v -e="Bad
>Request"
>GET / HTTP/1.0
>User-Agent: check_http/1.99 (nagios-plugins 1.4.6)
>
>
>http://192.168.5.3:8075/ is 168 characters
>STATUS: HTTP/1.1 400 Bad Request
> HEADER 
>Content-Type: text/html
>Date: Fri, 28 Aug 2009 18:33:44 GMT
>Connection: close
>Content-Length: 39
> CONTENT 
>  [[ skipped ]]
>Invalid HTTP response received from host on port 8075
>[...@prcapp00 dev]$ echo $?
>2

Command syntax is incorrect.

# ./check_http -I 192.168.5.3 -p 8075 --no-body -f critical -vvv -e \
 "Bad Request"

I tried against one of my servers without any issues.  Albeit I got a
critical failure because my server didn't return bad request.

I do notice you're using an old version of the plugins package. 1.4.13
is the current version, can you download and compile in a different
directory and see if you still end upw with the same issue?
-- 
Jonathan Angliss



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] hostgroup expansion and regex

2009-08-28 Thread Terry
I am overlooking something simple.
Nagios Core 3.2.0

use_regexp_matching=1
use_true_regexp_matching=0

define hostgroup {
hostgroup_name  allhosts
members *

Error: Could not expand members specified in hostgroup (config file
'/etc/nagios/objects/hostgroups.cfg', starting on line 89)

What in the world am I missing here?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] What kind of checks/minute numbers are you getting for single host / non-distributed setups?

2009-08-28 Thread Ryan Bowlby
--- On Fri, 8/28/09, Max  wrote:

> From: Max 
> Subject: [Nagios-users] What kind of checks/minute numbers are you getting 
> for single host / non-distributed setups?
> To: "Nagios Users mailinglist" 
> Date: Friday, August 28, 2009, 12:07 AM
> Just curious, we are starting to move
> to a distributed setup because
> we appear to be maxing out our current HW.
> 
> Nagios 3.0.3
> Dual quad-core Compaq server, 16 GB RAM, SCSI disks.
> 
> We have one server that does trap receiving and polling ..
> * Notification requests are sent off to a second machine
> * Trap MySQL records (SNMPTT) sent to a second host
> * PNP data sent to a second host using modpnpsender
> * All Nagios temp directories, config directories, the
> main
> nagios.log, retention.dat, objects.cache, and plugins
> reside on RAM
> disks.
> * 80% SNMP checks with ePN scripts, 15% NRPE checks, 5%
> other
> 
> We get about 2000 checks/minute avg (8500 active checks in
> 4 minutes).
> 
> Anyone who is willing to post their numbers I would really
> be
> interested in hearing your performance numbers for a
> non-distributed
> setup.
> 
> I am about to enter another week of attempts at tuning our
> configuration until we get our distributed setup set up :p
> as our
> latency is starting to rise to unacceptable limits every
> 12-16 hours
> or so after a restart.
> 
> Thanks,
> Max


Max,

Those are impressive numbers for a single Nagios instance. You may be able to 
tweak out some additional time but you leave the Nagios daemon little room for 
leeway. What I mean is if two dozen hosts start reporting critical and Nagios 
starts performing checks at the more aggressive retry_check_interval instead of 
the normal check_interval, then your check latency is going to go through the 
roof.

That being said here are some ideas that you may already be trying, but if not 
may by you some time.

- switch from check_ping to check_icmp as it's 9x faster in some instances. 

- If any of the client-side nrpe checks are perl, python, etc you may see a 
decrease in check-time by compiling them. Same for the Nagios server if you 
aren't already (built-in perl, etc).

- Often NRPE checks such as those monitoring hardware don't need to be 
performed as often as say a check_tcp, but since people use templates NRPE 
frequently gets configured with the same aggressive check_interval as other 
checks. Scaling back on these will greatly increase the amount of checks the 
server can do.

At my work we have 4 remote Nagios instances performing approximately 9400+ 
checks to our Central Nagios server via nsca. This leaves room for a 400% 
increase in checks as more departments begin utilizing the monitoring system. 
Our configs are built by a custom script from our custom dbase and pushed out 
to the servers via a custom script that keeps everything in cvs. It all works 
great but took forever to configure. If I had to do it again I would take a 
serious look at two other options:

http://dnx.sourceforge.net/ - Crap ton of checks ONE nagios instance!

http://www.opsview.org/ - Multiple Nagios instances without writing a slew of 
custom scripts to do it!

Hope something in there is helpful.

-Ryan


  

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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