Re: [Nagios-users] Event Handlers

2010-02-03 Thread Marc Powell
On Feb 3, 2010, at 8:16 AM, Jeff wrote: I have a service that needs to be monitored every minute. I need some help understanding how services go from soft to a hard state When a service check results in a non-OK state, services go from a Soft to a Hard state when they reach

Re: [Nagios-users] Event Handlers

2010-02-03 Thread Mike Lindsey
Marc Powell wrote: On Feb 3, 2010, at 8:16 AM, Jeff wrote: I have a service that needs to be monitored every minute. I need some help understanding how services go from soft to a hard state When a service check results in a non-OK state, services go from a Soft to a Hard state when

Re: [Nagios-users] event handlers and Schedule Downtime

2010-01-29 Thread Martin Melin
On Fri, Jan 29, 2010 at 3:01 PM, Menard, Chris chris.men...@aspect.comwrote: I have a scheduled host downtime setup for Sunday. When I start to take services down, will event handlers still trigger and still try to restart what I want down? Yes, if your event handlers are not written to

Re: [Nagios-users] event handlers and Schedule Downtime

2010-01-29 Thread Menard, Chris
Perfect, thanks. I think I may for, for this weekend 'Disable Active Checks' on the service group. Then get to updating my event handlers. From: Martin Melin [mailto:mart...@op5.org] Sent: Friday, January 29, 2010 9:34 AM To: Menard, Chris Cc: Nagios Mailinglist Subject: Re: [Nagios-users

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-03 Thread Marco Tirado
Hello users: Thank you for all the answers. I have made some changes to my command: I added a space before the character and I explicitly piped the stdout and stderr to my log file to avoid missunderstandings. The command looks like this now: nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-03 Thread Edgar Matzinger
LS, Marco scribbled on 2009-07-03: Hello users: nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer.JMXServerDispatcher $PORT /dev/null $LOG_FILE 2$LOG_FILE Change this in $PORT - $LOGFILE 21 - closes STDIN Any thoughts? other suggestions? can't you use the init.d

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-02 Thread Marco Tirado
That is exactly what I am doing (or trying to do with) the character at the end of my command. But it does not appear to be working, the command looks like this: nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE Any suggestions? Am I missing something else?

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-02 Thread David Rosenstrauch
Perhaps instead of using a java daemon to do JMX queries, you could use the check_jmx nagios plugin. (Available at the monitoring exchange site.) I've been using it in our Nagios system, and it's been working nicely (after some enhancements). I'm in the process of adopting and enhancing the

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-02 Thread Kevin Keane
First, put a space in front of that . Otherwise, it may be treated as part of the variable name. Second, I believe that the 21 needs to come AFTER the redirection to $LOG_FILE. Otherwise, what you are doing is redirecting stderr to stdin - which is still the console - and THEN redirecting

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-02 Thread Andreas Ericsson
Marco Tirado wrote: Hello Users: I have a problem with an event handler of mine. The handler starts a java daemon-like program which loops forever waiting for connections and performs JMX queries against our java applications. The problem is that the handler times out when it is run by

Re: [Nagios-users] Event Handlers, start a java program, nohup issues.

2009-07-02 Thread Marc Powell
On Jul 2, 2009, at 9:16 AM, Marco Tirado wrote: That is exactly what I am doing (or trying to do with) the character at the end of my command. But it does not appear to be working, the command looks like this: nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/ null 21

Re: [Nagios-users] event handlers - remounting smb shares

2009-03-06 Thread Kyle O'Donnell
How do you check your systems remotely? search the nagiosexchange for something called 'rexec' it is an event handler that I wrote that executes commands remotely using ssh or NRPE. If using NRPE a script to run your mount should be written and added to your nrpe.cfg command list. if this is

Re: [Nagios-users] event handlers - remounting smb shares

2009-03-06 Thread Assaf Flatto
Hello Kyle You missed my point - i think . Doing checks on the remote machine is not a problem , i am doing so via NRPE and with no problems . My issue is - how do i make it dynamic - and not a different script for each mount point . I want it to be a single script that when i pass the

Re: [Nagios-users] event handlers - remounting smb shares

2009-03-06 Thread Kyle O'Donnell
write the logic into the event handler script. pass the $SERVICEOUTPUT$ to the event handler have the event handler check if the appropriate moutpoint has returned the desired (or undesired) error if condition mount else echo wrong mount failure dont do anything. On 3/6/09, Assaf Flatto

Re: [Nagios-users] Event Handlers

2009-01-15 Thread Morris, Patrick
Is there a way to run the an event handler from the web interface? Example: When our internet goes down I have an event handler to restart a service on one of our Linux servers. This works great if the internet is down for a minute or less. Once I know the internet is back up if it has

Re: [Nagios-users] Event Handlers

2008-10-15 Thread Francis Dube
Gürkan Aslan a écrit : Hi, I'm trying to define an event handler for nagios. Actually it will work same as event handler example (http://nagios.sourceforge.net/docs/3_0/eventhandlers.html#example) but it doesn't work... i'm trying to create a file in /tmp folder to test, but nothing in

Re: [Nagios-users] Event Handlers

2008-10-15 Thread Gürkan Aslan
Hi Francis, Thanks for your answer but i solved the problem. My Mistakes: * I must use full path in my bash script. * Event Handler is triggering the event only for the first state change. Best regards Çrş, 2008-10-15 tarihinde 10:51 -0400 saatinde, Francis Dube yazdı: Gürkan

Re: [Nagios-users] Event Handlers on the External Commands

2007-12-11 Thread Andreas Ericsson
[EMAIL PROTECTED] wrote: I am trying to get the performance data from the remote machines passively and want to control the starting and the stopping of the monitoring probes from the Nagios Server machine. For this, I want to write Event Handlers on the External Commands, but I am not sure

Re: [Nagios-users] Event Handlers on the External Commands

2007-12-11 Thread mark redding
Hi, On 11/12/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For this, I want to write Event Handlers on the External Commands, but I am not sure How to go about it ? Does somebody has any idea about it ? any sample code will be of great help. These snippet of shell script may be of use

Re: [Nagios-users] event handlers for Windows systems?

2007-08-28 Thread Furnish, Trever G
I'd think that if you can run NRPE on the remote system or can configure the snmp service on the remote system to allow you to execute the code you want to run on the remote system, then you are set. An event handler is code that runs on the same host as the nagios daemon, so nagios doesn't

Re: [Nagios-users] event handlers for Windows systems?

2007-08-28 Thread moshe sharon
Hello if you are using NRPE_NT or nsclient++ which support plugins it is pretty easy to write an batch file event handler such as: @echo off net start dhcp this will start the dhcp client service. and of course delete files, reboot server etc... you just add entry in the nrpe.cfg to run the

Re: [Nagios-users] event handlers for Windows systems?

2007-08-28 Thread Anthony Montibello
hi Rogelio, As others have mentioned, use a eventhandler in nagios and have the event handler script call a checkplugin that can run a script on windows. for running your script on windows you have several options, basically it should boil down to a few choices, NRPE or NC_Net bolth can run

Re: [Nagios-users] Event Handlers

2007-01-24 Thread edalB
Thanks for all the help people I got it working the script was working the problem was the accepting of the ssh key to known-hostes. Regards On 1/23/07, edalB [EMAIL PROTECTED] wrote: Ok I have followed the white rabbit. I have followed the docs and I have modified the the script to work the

Re: [Nagios-users] Event Handlers

2007-01-23 Thread edalB
Ok I have followed the white rabbit. I have followed the docs and I have modified the the script to work the way I need it to work for me. But still no luck. After trying allot of stuff I have now changed my config in the .cfg file and it looks like folloes. define service{ use

Re: [Nagios-users] Event Handlers

2007-01-19 Thread Andy Shellam (Mailing Lists)
Please please please don't forgot to copy your responses to the list! Yep Nagios is executing your service handler (or at least trying to.) Try executing your command from an SSH console as the Nagios user. Andy. edalB wrote: This is what I see in the log file Jan 19 15:21:18 nagios-0

Re: [Nagios-users] Event Handlers

2007-01-19 Thread edalB
I have done that and it does work. nagios-0 libexec # su nagios [EMAIL PROTECTED] /usr/local/nagios/libexec $ /usr/bin/ssh -p 222 -i /home/nagios/.ssh/id_dsa [EMAIL PROTECTED] sudo /etc/init.d/apache2 restart * Service apache2 stopping apache2: Could not determine the server's fully qualified

Re: [Nagios-users] Event Handlers

2007-01-19 Thread Marc Powell
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of edalB Sent: Friday, January 19, 2007 7:46 AM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] Event Handlers Hi all. I have created a event handler as a test to see

Re: [Nagios-users] Event Handlers

2007-01-19 Thread Hari Sekhon
I was think that, I've done event handlers and the way you have tried to do that is just wrong. Look at the docs, there is a template bash script to get you started. That is what I based my event handlers on and it makes much more sense. You can choose when to do certain actions, not every

Re: [Nagios-users] Event Handlers and service check timeouts

2006-11-01 Thread Marc Powell
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of Hari Sekhon Sent: Wednesday, November 01, 2006 7:16 AM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] Event Handlers and service check timeouts Hi, I would like

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