Re: [Nagios-users] Too stupid? Services are available, but nagios reports host to be down!
Dnia 08-04-2008 o 14:21:08 Heiko Schlittermann <[EMAIL PROTECTED]> napisał(a): > Hello, > > Valdinger, Stephen (DOV, MSX) <[EMAIL PROTECTED]> (Di 08 Apr 2008 > 13:58:36 CEST): >> Just rewrite the check-host-alive plugin for the unpingable hosts to >> something bogus like check_null for some bogus output. Or use a >> different check command other than a ping for the check-host alive. > > Thank you for your response. > > But - a bogus check returning "OK" would be wrong too, because the host > *can* be down. > > The host should assumed to be UP if *any* service check on this host was > successful. The host should assumed to be DOWN, if all service checks > failed. > > Any suggestion anybody? That one would be non-trivial, but perhaps the check command could read current status for the host and only do test if there are no services currently in OK state? Otherwise it would return the host is UP. -- Wojciech Kocjan - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 in different time periods
On Thu, 03 Apr 2008 21:12:21 +0200, Seth Simmons <[EMAIL PROTECTED]> wrote: > I understand the first part about adding all to the same contact groups. > The second part I can't see how they would have their own hours, unless > I have a separate service defined? For example if I have this (below) > what line(s) would I need to add/modify? I'm thinking I would have to > have a different service defined for each check/notification period? No, I assume what you actually want is to: 1/ Monitor the service 24x7 2/ For India working hours, notify India 3/ For remaining hours, notify someone else So, define single service, two contact groups and for India group members configure them for Indiaworkinghours time period and for "someone else" configure them for a timeperiod defining remaining hours. Then if a problem comes in during Indiaworkinghours, India staff will get the message. On remaining hours "someone else" will get the message. -- Wojciech Kocjan - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ 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 in different time periods
On Thu, 03 Apr 2008 20:34:32 +0200, Seth Simmons <[EMAIL PROTECTED]> wrote: > Currently I'm using the default 24x7 time for monitoring. We have a > support group in India where we want to shift monitoring there during > off hours. Since service definition is currently using 24x7, would I > have to create separate services for each time period since the > notifications would go to two different groups? What is the best way to > accomplish this? Hi, You can simply add both India and non-India users to the same contact groups you're currently using. India team will have their notification timeperiod set to their working hours whereas the other team would have the remaining hours as their notification timeperiod. -- Wojciech Kocjan - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ 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] IM notification
Assuming you'll use pager field in contact: define command{ command_namenotify-host-by-jabber command_line$USER1$/notify_via_jabber $CONTACTPAGER$ "Host notification: $NOTIFICATIONTYPE$ Host: $HOSTNAME$ State: $HOSTSTATE$ Address: $HOSTADDRESS$ Info: $HOSTOUTPUT$" } define command{ command_namenotify-service-by-jabber command_line$USER1$/notify_via_jabber $CONTACTPAGER$ "Service notification: $NOTIFICATIONTYPE$ Service: $SERVICEDESC$ Host: $HOSTALIAS$ State: $SERVICESTATE$" } On Thu, 20 Mar 2008 09:43:26 +0100, Alex Dehaini <[EMAIL PROTECTED]> wrote: > Please furnish me with your settings in command.cfg for this script. > Regards, > Alex > > > On Wed, Mar 19, 2008 at 10:18 PM, Wojciech Kocjan <[EMAIL PROTECTED]> > wrote: > >> On Wed, 19 Mar 2008 17:57:36 +0100, Alex Dehaini <[EMAIL PROTECTED]> >> wrote: >> >> > This is what I got >> > [EMAIL PROTECTED] bin]# /usr/local/bin/notify_via_jabber2 email >> > [EMAIL PROTECTED]"Host is Down" >> > You requested that XML::Stream turn the socket into an SSL socket, but >> > you >> > don't have the correct version of IO::Socket::SSL v0.81. at >> > /usr/lib/perl5/site_perl/5.8.8/XML/Stream/Node.pm line 547 >> > >> > How can I fix this >> > >> > Alex >> >> Hi, >> >> I guess this requires a Perl expert, which I'm not. >> >> I simply installed a few packages on my machine and things worked fine. >> I'm not sure what's the exact problem here. >> >> -- >> Wojciech Kocjan >> > > > -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] IM notification
Dnia 19-03-2008 o 15:00:06 Alex Dehaini <[EMAIL PROTECTED]> napisał(a): > Excellent, it worked. How can I get this to work using googletalk. I > passed > the same parameters but this is the error I got. > /usr/local/bin/notify_via_jabber [EMAIL PROTECTED] "I am alive" > Cannot connect (Invalid argument). > > These were the settings in my notify_via_jabber file > > use constant RECIPIENT => $ARGV[0]; > use constant SERVER=> 'talk.gmail.com'; > use constant PORT => 5222; > use constant USER => emailaddress'; > use constant PASSWORD => 'password'; > use constant RESOURCE => 'resource'; > use constant MESSAGE => $ARGV[1]; > use constant MAXWAIT => 2 ; > > Am I doing anything wrong? my $username = "wojciech.kocjan"; my $password = "x"; my $resource = "APUD"; The only thing I got confused is that the script I gave you as a link adds @gmail.com to the address. I modified it to be: # Send messages sleep(2); foreach ( @field ) { $Connection->MessageSend( to => "$_", resource => $resource, subject => "Notification", type => "chat", body => $ARGV[1]); } sleep(2); $Connection->Disconnect(); exit; And run notify_via_jabber [EMAIL PROTECTED] "Test message" Worked like a charm. -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] how to get passive checks to work
Dnia 19-03-2008 o 15:36:11 Folkert van Heusden <[EMAIL PROTECTED]> napisał(a): > Hi, > > In my services.cfg I have: > define service { > use generic-service > host_name p630 > service_description manual call > contact_groups aix-admins > active_checks_enabled 0 > passive_checks_enabled 1 > check_command check_dummy > } > > Now in my php script I send the following string (tried both with and > without terminating \n) to the pipe /var/lib/nagios2/rw/nagios.cmd ; > [1205935241] PROCESS_SERVICE_CHECK_RESULT;p630;manual call;2;test That looks correct. What I'd recommend is to write to /tmp/nagios.cmd, check that file. Then perform this as the same user as your PHP is run (www-data/apache probably): cat /tmp/nagios.cmd >>/var/lib/nagios2/rw/nagios.cmd You should see if it works. Also, are you writing or appending to the nagios.cmd pipe? I think appending is TheRightWay(tm) to do it. -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] IM notification
Dnia 19-03-2008 o 11:31:28 Alex Dehaini <[EMAIL PROTECTED]> napisał(a): > How can I test it using the commandline and see the debugging output? Hi, You need to: 1/ Change username and password in the script (you'll need a separate account for your Nagios notifications) 2/ Make sure you have authorized your normal and nagios notifications account - in other words run 2 copies of your favorite Jabber client, add and authorize yourself both ways and make sure that you can send messages both ways. 2/ Run; ./notify_via_jabber [EMAIL PROTECTED] "I am alive!" This should be a good test. You probably noticed the script doesn't have much debugging options ;) -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] IM notification
On Tue, 18 Mar 2008 18:39:52 +0100, Alex Dehaini <[EMAIL PROTECTED]> wrote: > Hi Guys, > I will like to implement IM notification. Can I get any detailed help > from > the house. I will like to use jabber and some script. How can I get this > to > work? Does http://www.gridpp.ac.uk/wiki/Nagios_jabber_notification help? -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] Remote monitoring
On Tue, 12 Feb 2008 08:36:32 +0100, Michael Medin <[EMAIL PROTECTED]> wrote: > Hello, > > Humm, this was quite interesting, is there a way to (from the plink) to > detect the status of the connection or does plink "die" when the > connection dies even? > Would be quite simple to add a "plugin" to run this from within > nsclient++, but for it to be useful you would need to be able to detect > the status of the link (and I have never used the command myself). Hi, Well, I once wrote a script that basically runs 'cat' command and uses it to "ping" the server - it writes some garbage every few minutes and checks if it gets back. I'll play with doing it as a service on Windows and if this is trivial enough, I'll make it opensource. I don't think that putting ssh client in NSClient as a plugin is a good way, though. I'm wondering if it can't report directly to NCSA as a long term solution? -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] Remote monitoring
On Tue, 12 Feb 2008 05:06:38 +0100, Paul Aviles <[EMAIL PROTECTED]> wrote: > I am looking for a way to remotely monitor Windows servers. The servers > are on a remote network and using network address translation so they > are not directly accessible. I saw that Pandora uses an agent on the > remote servers to connect via ssh to the main monitoring server and I > like that idea, but I have not been able to see any documentation on how > to do it with Nagios. In our configuration we cannot alter or open ports > on the clients firewalls, but outgoing ssh traffic should not be an > issue and I guess the monitoring server should not contact the remote > servers. Hi Paul, I think it should be quite easy to use putty's plink to connect and tunnel nsclient++ using remote tunneling (-R option). For example assuming NSClient is running on port 12489 you could run plink -R 20001:127.0.0.1:12489 [EMAIL PROTECTED] And then as long as the SSH connection stays open your nagiosserver will be able to access NSClient++ by connecting to 127.0.0.1 port 20001. You'd need to modify check_nt command a bit to always use 127.0.0.1 as an IP. If it's Nagios 3 you can also use custom variable (like _NSCLIENTPORT) in host definitions and reuse that in your version of check_nt command (using $_HOSTNSCLIENTPORT$). The solution might not be robust enough if your network is not stable - in that case you might need a wrapper that will restart plink if a connection is down... I'm not sure if any working solutions for this exist. I'm curious myself as I wrote a small wrapper that checks for connection timeouts - and I'm wondering if there's any better solution on Windows. -- Wojciech Kocjan - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] PluginSource Code
On Mon, 11 Feb 2008 07:32:07 +0100, Tatyaso Babar <[EMAIL PROTECTED]> wrote: > Hi All, > > > Is there any way to get the source code/script of the nagios plugins > (like check_ping,Check_by_ssh etc) which are getting installed in binary > file mode? Hi Tatyaso! What you are looking for is nagiosplug SourceForge project: http://sourceforge.net/projects/nagiosplug/ This is where Nagios plugins are kept and developed. -- WK - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] Docs at leats partially wrong
On Thu, 07 Feb 2008 14:22:02 +0100, Marc Powell <[EMAIL PROTECTED]> wrote: > On Feb 7, 2008, at 5:43 AM, Tobias Klausmann wrote: > >> Hi! >> >> We've been using the $ADDRESSN$ macro in our notification >> commands while we were using 2.x. Since we upgraded, some >> notifications fail - since said macro does not seem to be >> expanded anymore. > I'm unable to test this. Hi. I had the same problem - it seemed that defining address2 and using $CONTACTADDRESS1$ (or the other way around) worked. Not sure why, I'll do some more testing tomorrow. -- WK - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] Docs at leats partially wrong
Dnia 07-02-2008 o 12:43:09 Tobias Klausmann <[EMAIL PROTECTED]> napisał(a): > Hi! > > We've been using the $ADDRESSN$ macro in our notification > commands while we were using 2.x. Since we upgraded, some > notifications fail - since said macro does not seem to be > expanded anymore. Hello, I had a similar problem with 3.0rc2. I set address1 and used $CONTACTADDRESS1$ and it did not work for me. However, when I set address2 and used $CONTACTADDRESS1$ it seemed to work fine - so perhaps there's a bug in there somewhere. Try setting all 6 of them and send all six to your command and see what happens... -- WK - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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