[Nagios-users] Event Handlers, start a java program, nohup issues.
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 nagios. This is what I see in the logs: [01-07-2009 18:45:36] SERVICE EVENT HANDLER: bj-mon-01;JMX_Server_Running;(null);(null);(null);start_jmx_server [01-07-2009 18:46:07] Warning: Service event handler command '/usr/local/nagios/libexec/eventhandlers/start_jmx_server CRITICAL SOFT 1' timed out after 30 seconds The event handler should start my JMXServer both in hard and soft states. I have run the command from the console as the nagios user and it works, so the problem has nothing to do with user rights for nagios. The problem is that the handler hangs when I run nohup followed by my command for starting the server (see the red text below). My event handler looks like this: ### # PROPERTIES ### PORT= ECHO_CMD=/bin/echo JAVA_CMD=/usr/bin/java CLASSPATH=MyClasspath JVM_OPTIONS=MyOptions ### # What state is the JMXServer in? case $1 in OK) ;; WARNING) ;; UNKNOWN) ;; CRITICAL) case $2 in SOFT) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD TRYING restart /tmp/test` ;; HARD) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD FINISHED trying /tmp/test` ;; esac ;; esac exit 0 Any help, hint or recommendation is deeply appreciated. //Marco -- ___ 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] monitoring load balanced url
All, I am trying to monitor an url which is load balanced behind csm. I want it go to warnning state if 50% of the servers are unavailable behind csm. Can someone please give me some suggestion how I can achieve this. Thanks -- Cordially, Shadhin Rahman -- ___ 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 load balanced url
All, I thought of this approach. I will create a service call 'check_public_url' on host1, host2, host3, host4, and etc. Then I would create another check which will use check_cluster plugin to check the service status like below ./check_cluster -s check_public_url -d -w 0:50 -c 50:75 Am I approaching the right solution? Please advise on this. thanks On Thu, Jul 2, 2009 at 9:20 AM, shadih rahman shadhi...@gmail.com wrote: All, I am trying to monitor an url which is load balanced behind csm. I want it go to warnning state if 50% of the servers are unavailable behind csm. Can someone please give me some suggestion how I can achieve this. Thanks -- Cordially, Shadhin Rahman -- Cordially, Shadhin Rahman -- ___ 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 load balanced url
On Jul 2, 2009, at 8:20 AM, shadih rahman wrote: All, I am trying to monitor an url which is load balanced behind csm. I want it go to warnning state if 50% of the servers are unavailable behind csm. Can someone please give me some suggestion how I can achieve this. Thanks Use the check_cluster plugin. -- Marc -- ___ 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, start a java program, nohup issues.
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? //Marco On Thu, Jul 2, 2009 at 10:50 AM, Andreas Ericsson a...@op5.se wrote: 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 nagios. This is what I see in the logs: [01-07-2009 18:45:36] SERVICE EVENT HANDLER: bj-mon-01;JMX_Server_Running;(null);(null);(null);start_jmx_server [01-07-2009 18:46:07] Warning: Service event handler command '/usr/local/nagios/libexec/eventhandlers/start_jmx_server CRITICAL SOFT 1' timed out after 30 seconds The event handler should start my JMXServer both in hard and soft states. I have run the command from the console as the nagios user and it works, so the problem has nothing to do with user rights for nagios. The problem is that the handler hangs when I run nohup followed by my command for starting the server (see the red text below). My event handler looks like this: ### # PROPERTIES ### PORT= ECHO_CMD=/bin/echo JAVA_CMD=/usr/bin/java CLASSPATH=MyClasspath JVM_OPTIONS=MyOptions ### # What state is the JMXServer in? case $1 in OK) ;; WARNING) ;; UNKNOWN) ;; CRITICAL) case $2 in SOFT) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD TRYING restart /tmp/test` ;; HARD) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD FINISHED trying /tmp/test` ;; esac ;; esac exit 0 Any help, hint or recommendation is deeply appreciated. You need to make the java daemon run in the background. That will make Nagios ignore it after it has moved from the foreground. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- ___ 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, start a java program, nohup issues.
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 code (neither of the previous 2 authors wanted to maintain it) and setting up a proper home for it on sourceforge (http://sourceforge.net/projects/nagioscheckjmx/). (Don't download it yet until I get the 1.0 release uploaded.) HTH, DR 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 nagios. This is what I see in the logs: [01-07-2009 18:45:36] SERVICE EVENT HANDLER: bj-mon-01;JMX_Server_Running;(null);(null);(null);start_jmx_server [01-07-2009 18:46:07] Warning: Service event handler command '/usr/local/nagios/libexec/eventhandlers/start_jmx_server CRITICAL SOFT 1' timed out after 30 seconds The event handler should start my JMXServer both in hard and soft states. I have run the command from the console as the nagios user and it works, so the problem has nothing to do with user rights for nagios. The problem is that the handler hangs when I run nohup followed by my command for starting the server (see the red text below). My event handler looks like this: ### # PROPERTIES ### PORT= ECHO_CMD=/bin/echo JAVA_CMD=/usr/bin/java CLASSPATH=MyClasspath JVM_OPTIONS=MyOptions ### # What state is the JMXServer in? case $1 in OK) ;; WARNING) ;; UNKNOWN) ;; CRITICAL) case $2 in SOFT) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD TRYING restart /tmp/test` ;; HARD) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD FINISHED trying /tmp/test` ;; esac ;; esac exit 0 Any help, hint or recommendation is deeply appreciated. //Marco -- ___ 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, start a java program, nohup issues.
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 stdin to the log file. I always get this wrong, though - it might be exactly opposite of what I'm thinking. But if I'm right, because stderr is still attached to the console, nagios would still consider it to be in the foreground. 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 $LOG_FILE Any suggestions? Am I missing something else? //Marco On Thu, Jul 2, 2009 at 10:50 AM, Andreas Ericsson a...@op5.se mailto:a...@op5.se wrote: 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 nagios. This is what I see in the logs: [01-07-2009 18:45:36] SERVICE EVENT HANDLER: bj-mon-01;JMX_Server_Running;(null);(null);(null);start_jmx_server [01-07-2009 18:46:07] Warning: Service event handler command '/usr/local/nagios/libexec/eventhandlers/start_jmx_server CRITICAL SOFT 1' timed out after 30 seconds The event handler should start my JMXServer both in hard and soft states. I have run the command from the console as the nagios user and it works, so the problem has nothing to do with user rights for nagios. The problem is that the handler hangs when I run nohup followed by my command for starting the server (see the red text below). My event handler looks like this: ### # PROPERTIES ### PORT= ECHO_CMD=/bin/echo JAVA_CMD=/usr/bin/java CLASSPATH=MyClasspath JVM_OPTIONS=MyOptions ### # What state is the JMXServer in? case $1 in OK) ;; WARNING) ;; UNKNOWN) ;; CRITICAL) case $2 in SOFT) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD TRYING restart /tmp/test` ;; HARD) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD FINISHED trying /tmp/test` ;; esac ;; esac exit 0 Any help, hint or recommendation is deeply appreciated. You need to make the java daemon run in the background. That will make Nagios ignore it after it has moved from the foreground. -- Andreas Ericsson andreas.erics...@op5.se mailto:andreas.erics...@op5.se OP5 AB www.op5.se http://www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- ___ 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
Re: [Nagios-users] Event Handlers, start a java program, nohup issues.
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 nagios. This is what I see in the logs: [01-07-2009 18:45:36] SERVICE EVENT HANDLER: bj-mon-01;JMX_Server_Running;(null);(null);(null);start_jmx_server [01-07-2009 18:46:07] Warning: Service event handler command '/usr/local/nagios/libexec/eventhandlers/start_jmx_server CRITICAL SOFT 1' timed out after 30 seconds The event handler should start my JMXServer both in hard and soft states. I have run the command from the console as the nagios user and it works, so the problem has nothing to do with user rights for nagios. The problem is that the handler hangs when I run nohup followed by my command for starting the server (see the red text below). My event handler looks like this: ### # PROPERTIES ### PORT= ECHO_CMD=/bin/echo JAVA_CMD=/usr/bin/java CLASSPATH=MyClasspath JVM_OPTIONS=MyOptions ### # What state is the JMXServer in? case $1 in OK) ;; WARNING) ;; UNKNOWN) ;; CRITICAL) case $2 in SOFT) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD TRYING restart /tmp/test` ;; HARD) `$ECHO_CMD TRYING restart /tmp/test` nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21 $LOG_FILE `$ECHO_CMD FINISHED trying /tmp/test` ;; esac ;; esac exit 0 Any help, hint or recommendation is deeply appreciated. You need to make the java daemon run in the background. That will make Nagios ignore it after it has moved from the foreground. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- ___ 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, start a java program, nohup issues.
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 $LOG_FILE Do you really intend to set the output of /dev/null as the STDIN for nohup? I expect you meant to use '/dev/null'. -- Marc -- ___ 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] Send SMS via Serial
Hi all, I'm trying to set a solution to send sms via serial port (RS-232). On the server (running nagios), I've connected a mobile interface, which is a router for mobile calls and with a simple test using minicom and with some AT commands could send a message. Therefore, I'm very lost on how to integrate it with nagios command line? Does anyone have any script or a clue to set it? Thanks in advance Eduardo Barreto -- ___ 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] Send SMS via Serial
What protocol does the mobile interface use? If it's TAP / IXO, then something like QuickPage should work. http://www.qpage.org/ Alex Eduardo Barreto wrote: I'm trying to set a solution to send sms via serial port (RS-232). On the server (running nagios), I've connected a mobile interface, which is a router for mobile calls and with a simple test using minicom and with some AT commands could send a message. Therefore, I'm very lost on how to integrate it with nagios command line? Does anyone have any script or a clue to set it? -- ___ 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] Send SMS via Serial
Hello Eduardo Didn't you send the exact same message yesterday? anyway, here is the answer I sent you in case you did not receive it I would recommend using smstools, http://smstools.meinemullemaus.de/ have been using it for years now and it's rock solid cheers Johannes Eduardo Barreto wrote: Hi all, I'm trying to set a solution to send sms via serial port (RS-232). On the server (running nagios), I've connected a mobile interface, which is a router for mobile calls and with a simple test using minicom and with some AT commands could send a message. Therefore, I'm very lost on how to integrate it with nagios command line? Does anyone have any script or a clue to set it? Thanks in advance Eduardo Barreto -- ___ 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 -- Johannes Dagemark CTO / VP Engineering op5 AB Första Långgatan 19 SE-413 27 Gothenburg cell: +46 733-70 90 24 fax: +46 31-774 04 32 Email: j...@op5.com http://www.op5.com/ -- ___ 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] Send SMS via Serial
LS, Hi all, I'm trying to set a solution to send sms via serial port (RS-232). On the server (running nagios), If it looks like a modem, I would opt for sms_client. Is in service at our location for many years... HTH, cu l8r, Edgar. -- ___ 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 surpess notifications if ping fails.
For some reason notifications are not being sent from nagios when i unplug the network cable from one of the hosts being monitored. Nagios recognizes that the hose is down but no notification... [1246567497] HOST ALERT: psefilesrv;DOWN;SOFT;1;(No Information Returned From Host Check) [1246567528] Warning: Host check command '/usr/lib/nagios/plugins/check_ping -H 10.139.68.39 -w 3000.0,80% -c 5000.0,100% -p 5' for host 'psefilesrv' timed out after 30 seconds [1246567528] HOST ALERT: psefilesrv;DOWN;SOFT;2;(No Information Returned From Host Check) [1246567559] Warning: Host check command '/usr/lib/nagios/plugins/check_ping -H 10.139.68.39 -w 3000.0,80% -c 5000.0,100% -p 5' for host 'psefilesrv' timed out after 30 seconds [1246567559] HOST ALERT: psefilesrv;DOWN;HARD;3;(No Information Returned From Host Check) [1246567559] HOST NOTIFICATION: root;psefilesrv;DOWN;host-notify-by-email;(No Information Returned From Host Check) Here is the host config... define host{ host_name psefilesrv alias misc address10.139.68.39 usegeneric-host check_command check_alive notification_optionsd,r max_check_attempts 3 check_interval 1 notification_interval 1 notification_period 24x7 notifications_enabled 1 parentsswitch-office } And the command... define command { command_namecheck_alive command_line/usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 } Any thoughts to why this isn't working? Email notifications for other services is working fine. Maybe i need to add check_alive as a service? Thanks, JJ On Wed, Jul 1, 2009 at 3:17 PM, Jeremiah Jester jeremiahjes...@gmail.comwrote: I removed it and notifications are still being sent for all services associated with this host. Thoughts? JJ On Wed, Jul 1, 2009 at 3:15 PM, Jon Angliss j...@netdork.net wrote: Jeremiah Jester wrote: Hmmm, tryied this...but not working. Also, i get an error when i specify 'retry_interval'. maybe n agios3 only? define host{ host_name psedev2 alias dev check_command check-host-alive notification_optionsd,r max_check_attempts 3 check_interval 1 retry_interval 1 address 10.139.10.42 use generic-host parents switch-office } Error log: [1246481763] Error: Invalid host object directive 'retry_interval'. [1246481763] Error: Could not add object property in file '/etc/nagios2/conf.d/generic-host_nagios2.cfg' on line 143. [1246481763] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=27490) Yep, that'd be a nagios 3 option. I'd not realized (or maybe missed) you were using v2. Just remove that option. -- Jon Angliss j...@netdork.net Thanks, JJ On Tue, Jun 30, 2009 at 9:08 PM, Jon Angliss j...@netdork.net mailto:j...@netdork.net wrote: Jeremiah Jester wrote: Jon, Thanks for the reply. I've been struggling with this for some days. Can you give me an example of what how to define this and in what file? I would appreciate your help. Files don't really matter. Nagios loads them all, and processes. Its up to you how you want to format. Sometimes it's easier to group by type (hosts, services, commands, etc), and others by location (server room, etc). How you format is up to you. If you want, you can even bundle it all in a single file. Lines ending in \ are wrapped and should appear on a single line in your config. define command { command_namecheck-host-alive command_line$USER1$/check_ping -H $HOSTADDRESS$ \ -w 3000.0,80% -c 5000.0,100% \ -p 5 } define command { command_namecheck_http command_line$USER1$/check_http -H $HOSTNAME$ } define host { host_name myhost address 1.1.1.1 check_command check-host-alive notification_optionsd,r check_periodAll max_check_attempts 3 check_interval 1 retry_interval 1 contact_groups mycontacts } define service { host_name myhost check_command check_http {.. other stuff here .. } } This will execute check_http against the myhost. check-host-alive will be executed every 1 minute. If check-host-alive fails 3 times, host is considered down, and alerts for
[Nagios-users] Nagios Alerts to SMS using SMSTools help?
Hello, I plan to use smstools for my Nagios box to send out alerts to our cells if per say, our email gateway was down and Nagios alerts would not be delivered to the blackberries. In order to do this, I see a lot of users are using smstools, when I checked their site it seems that the development has been passed to another author and is now called smstools 3. Has anyone got smstools 3 working with nagios alerts? I live in Canada, will a cell-phone such as MOTO KRZR or RAZR work? Thanks. -- ___ 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 surpess notifications if ping fails.
On Jul 2, 2009, at 3:54 PM, Jeremiah Jester wrote: For some reason notifications are not being sent from nagios when i unplug the network cable from one of the hosts being monitored. Nagios recognizes that the hose is down but no notification... [1246567559] HOST NOTIFICATION: root;psefilesrv;DOWN;host-notify-by- email;(No Information Returned From Host Check) Here, nagios is running the 'host-notify-by-email' command for the contact named 'root'. It's trying to send a notification. Does that command_line work as the nagios user from the command line? Do you see any indication of the attempt in your mail server log files on the nagios machine? If it's not obvious what the problem is, please post that command{} definition, the contact{} definition for root and your test from the command line as well as any errors seen. -- Marc -- ___ 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] how does nagios locate config path?
Hi I want to build and install Nagios under a certain path (eg /opt/local) but tell it to find it's configuration (nagios.cfg, cgi.cfg) elsewhere (eg /export/nagios). There is useful configure directive for the lockfile (--with-lockfile), is there something similar for configuration path? Ideally I don't want to install anything under /export/nagios as part of the installation procedure, another process will deploy the correct configuration there, I just want to set Nagios to look there when it runs. Cheers -- ___ 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 does nagios locate config path?
The main nagios configuration file is configurable in the init script. All other files are read based on the cfg_file and cfg_dir directives in that main nagios configuration file. So you can either use the default nagios.cfg, which then points to things in /export/nagios, or edit the init script to also use a nagios.cfg in /export/nagios -Gius mega...@gmail.com wrote: Hi I want to build and install Nagios under a certain path (eg /opt/local) but tell it to find it's configuration (nagios.cfg, cgi.cfg) elsewhere (eg /export/nagios). There is useful configure directive for the lockfile (--with-lockfile), is there something similar for configuration path? Ideally I don't want to install anything under /export/nagios as part of the installation procedure, another process will deploy the correct configuration there, I just want to set Nagios to look there when it runs. Cheers -- ___ 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 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 does nagios locate config path?
Thanks for that reply. So the init.d script tell the nagios daemon where to find the config files and other things...what about the CGI scripts...how do they know where to look? On Jul 3, 2009 8:56am, Mark Gius mg...@createspace.com wrote: The main nagios configuration file is configurable in the init script. All other files are read based on the cfg_file and cfg_dir directives in that main nagios configuration file. So you can either use the default nagios.cfg, which then points to things in /export/nagios, or edit the init script to also use a nagios.cfg in /export/nagios -Gius mega...@gmail.com wrote: Hi I want to build and install Nagios under a certain path (eg /opt/local) but tell it to find it's configuration (nagios.cfg, cgi.cfg) elsewhere (eg /export/nagios). There is useful configure directive for the lockfile (--with-lockfile), is there something similar for configuration path? Ideally I don't want to install anything under /export/nagios as part of the installation procedure, another process will deploy the correct configuration there, I just want to set Nagios to look there when it runs. Cheers -- ___ 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 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