[Nagios-users] Tom Van Overbeke/AB Computers is out of the office.

2006-04-10 Thread tomvo
I will be out of the office starting  06/04/2006 and will not return until
18/04/2006.

I will respond to your message when I return. For urgent support issues,
you can either send a mail to [EMAIL PROTECTED], or contact the central
dispatch at (++32)/2 333 4000

Thank you.





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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] start a script automatically

2006-04-05 Thread tomvo
Hi,

I just did this a few days ago using eventhandlers, I'll post my config 
for your convenience, actually, it's dead easy:

this is the config of the service check:

define service{
use generic-service ; Name of 
service template to use
host_name   www..be
service_description HTTP_check_www.x.be_.5_interface
contact_groups  solaris-admins
retry_check_interval3
event_handler   restart_xxxweb
check_command check_webtest!xxx-5.scr!http://www.xxx.be interface 
.5 via internet
}


the key here is the event_handler line. This 'function' is executed 
whenever a state change occurs.

in checkcommands.cfg you must define this function:

define command{
command_namerestart_xxxweb
command_line 
/usr/lib/nagios/plugins/eventhandlers/restart_xweb $SERVICESTATE$ 
$SERVICESTATETYPE$ $SERVICEATTEMPT$
}


This provides the link to the script that will be executed each time a 
state change occurs.


below the contents of this script (I found it somewhere on a nagios 
support site) and modified it slightly for my environment. As you will 
see, I'm using the nagios client mechanism to restart the service on the 
remote host.



#!/bin/sh
#
# Event handler script for restarting the web server on the local machine
#
# Note: This script will only restart the web server if the service is
#   retried 3 times (in a soft state) or if the web service somehow
#   manages to fall into a hard error state.
#


# What state is the HTTP service in?
case $1 in
OK)
# The service just came back up, so don't do anything...
;;
WARNING)
# We don't really care about warning states, since the service is 
probably still running...
;;
UNKNOWN)
# We don't know what might be causing an unknown error, so don't 
do anything...
;;
CRITICAL)
# Aha!  The HTTP service appears to have a problem - perhaps we 
should restart the server...

# Is this a soft or a hard state?
case $2 in
# We're in a soft state, meaning that Nagios is in the middle of 
retrying the
# check before it turns into a hard state and contacts get 
notified...
SOFT)

# What check attempt are we on?  We don't want to restart 
the web server on the first
# check, because it may just be a fluke!
case $3 in

# Wait until the check has been tried 3 times before 
restarting the web server.
# If the check fails on the 4th time (after we restart the 
web server), the state
# type will turn to hard and contacts will be notified 
of the problem.
# Hopefully this will restart the web server successfully, 
so the 4th check will
# result in a soft recovery.  If that happens no one 
gets notified because we
# fixed the problem!
1)
echo $(date): Dit is de eerste soft state voor 
web, we herstarten de gateway  /tmp/eventhandler_test
/usr/lib/nagios/plugins/check_nrpe -H 
193.110.158.5  -c restart_xxxweb
;;

2)
echo $(date): Dit is de tweede soft state voor 
xxxweb, we herstarten de gateway voor de 2e keer  
/tmp/eventhandler_test
/usr/lib/nagios/plugins/check_nrpe -H 
193.110.158.5  -c restart_xxxweb
;;
3)
echo $(date): Dit is de derde soft state voor 
xxxweb, we herstarten de gateway voor de laatste maal, indien het nog niet 
werkt is er iets goed fout  /tmp/eventhandler_test
/usr/lib/nagios/plugins/check_nrpe -H 
193.110.158.5  -c restart_xxxweb
;;

esac
;;

# The HTTP service somehow managed to turn into a hard error 
without getting fixed.
# It should have been restarted by the code above, but for some 
reason it didn't.
# Let's give it one last try, shall we?
# Note: Contacts have already been notified of a problem with the 
service at this
# point (unless you disabled notifications for this service)

HARD)
echo $(date): na 3x proberen wil de xxxweb gateway nog 
altijd niet opstarte, misschien eens proberen met de server te rebooten ? 
 /tmp/eventhandler_test
;;
esac
esac
exit 0









---
Tom Van Overbeke - ABSI Service Delivery Coordinator
email: [EMAIL PROTECTED]
Tel: +32 2 333 40 00 - Fax: +32 2 332 34 69
website: http://www.absi.be
---





Marco Borsani [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
03/04/2006 13:57
 
   

[Nagios-users] integrating swatch with nagios

2006-04-04 Thread tomvo
Hi,

I'm trying to integrate swatch in nagios (via passive checks, I want 
swatch as a reaction to a 'hit' run the submit_check_result into a passive 
check).

But I'm having a lot of problems with the commandline parameters. for 
example, swatch offers the $_ parameter containing the entire line from 
e.g. a solaris message file. But these files then to contain characters 
that are interpreted by the shell such as [ and ' and whatever.

Basicly, I want to search a logfile for a regular expression, and if 
there's a match, I want the entire line to be sent to nagios (preferrably 
via a passive check).
I do not want to use the nagios plugin checklog because it's too kludgy 
for my taste.

How do you integrate logfile parsing in to nagios ? I've installed SEC 
also (http://simple-evcorr.sourceforge.net) but it appears to be far too 
complex for my needs.


Thanks for your input on this matter.


regards,
Tom.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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] Event Handlers

2006-03-31 Thread tomvo
Hi James,


I just came accross your message on the nagios mailing list, and i have 
exactly the same request.

I didn't see any answers on the list, so I was wondering if you have found 
a solution ?


regards,
Tom.

---
Tom Van Overbeke - ABSI Service Delivery Coordinator
email: [EMAIL PROTECTED]
Tel: +32 2 333 40 00 - Fax: +32 2 332 34 69
website: http://www.absi.be
---





Dehnert James Sr [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/03/2006 23:29
 
To: nagios-users@lists.sourceforge.net
cc: 
Subject:[Nagios-users] Event Handlers


Most of all of the processes and such I monitor are not on the Nagios 
server.  I do want to be able to use event handlers to try and 
resolve things before I get paged though, so I am wondering if there 
is a plug-in that can be used through NCSA or NRPE that will allow me 
to run an event handler script on a remote system.

  Thanks,
 Zeke

--
mailto:[EMAIL PROTECTED]   James Zeke Dehnert
Phone: 707 283 5042 Fax: 707 283 5001
 -= Eschew Obfuscation =-
Life is racing, everything else is just waiting
Arrested Development  ==  http://www.the-op.com









---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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