Re: [Nagios-users] Q: Need to use a default user, but still allow changing to another user
On Tue, 2008-03-18 at 09:25 -0600, Cary Petterborg wrote: We are trying to make things easy for managers who want to look at statuses without logging in (it is a request by the managers, not something WE thought up on our own to help them). This can be done by setting a default user, right? So you set the default user, but then you can't log in as a different user to get different views, etc. Does anyone have a solution that they are using for this type of case? I know I can get around this doing some programming, but if someone already cracked this nut, it would save me a lot of time for other work. Here is one idea that might work for you: Configure Apache so that connections to port 80 (HTTP) do not require authentication. (They could still be restricted to internal subnets.) Nagios cgis should then use the default user for access. Then configure apache so that connections to port 443 (HTTPS) always require authentication. Below is a rough idea of what that might look like (although it is incomplete so it won't work as is): Listen 10.0.0.1:80 VirtualHost 10.0.0.1:80 ServerName www.foo.com Location /nagios Deny from all Allow from 10.0.0.0 /Location /VirtualHost Listen 10.0.0.1:443 VirtualHost 10.0.0.1:443 ServerName www.foo.com SSLEngine on Location /nagios SSLRequireSSL AuthName Nagios AuthType Basic AuthUserFile /path/to/htpasswd/file Require valid-user /Location /VirtualHost Then just tell your managers to bookmark two URLs: http://www.foo.com/nagios (for unauthenticated access) and https://www.foo.com/nagios (for restricted login access). That might satisfy them. -- Rick Mohr Systems Developer Ohio Supercomputer Center - 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] notify contact only once
On Thu, 2007-10-11 at 10:50 -0500, Terry wrote: I got this working with a very ugly notification script. It is a 5 minute script and I suck at scripting so be gentle. But it works. The way I see it, a working script trumps a pretty one every time. :-) In a nutshell, it checks to see if the notification is the first notification. If it is, go ahead and send the email. However, if it is NOT the first notification, and the contact email address is our ticket system email address, exit 0. I didn't realize that the person who was only supposed to receive one contact was the same for all notifications. In that case, your custom notification script approach is definitely faster/cleaner than my suggestion of using escalations. Good job! -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] notify contact only once
On Mon, 2007-10-08 at 16:13 -0500, Terry wrote: On 10/5/07, Aidan Anderson [EMAIL PROTECTED] wrote: Terry wrote: I have regular contacts set up, me for example. I want to get notified every 30 minutes indefinitely if a service is in a hard state of warning or critical. However, I want another contact to only get notified one time when that hard state is achieved.That's it. [...] I've just posted you another message before seeing this one. You want to use host or service escalations to achieve this. I've briefly explained in the previous post but if you need more help, just shout. Aidan Thanks for your reply. It looks like for me to achieve this, I will need to create 2 escalations for every service. One for the single notification and the other for standard notifications. That seems like a lot of configuration. I think you can get by with one escalation. Configure the service's contactgroup to include you and the other person. Then create a service escalation that kicks in on the second notification and continues indefinitely. Use the escalation to change the contactgroup to include only you, and set the notification interval to 30 minutes. Does that fit your needs? -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] escalation
On Mon, 2007-10-08 at 12:29 -0700, Siwei Zhang wrote: I am trying to configure the escalation but never received the escalation email. ... define service{ ... max_check_attempts 1 contact_groups g1,g2 normal_check_interval 5 retry_check_interval5 process_perf_data 1 notification_interval 0 ... } You have notification_interval set to 0. According to the documentation, this means that Nagios will never re-notify contacts about a problem, so your escalation never goes into effect. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] notify contact only once
On Fri, 2007-10-05 at 14:01 -0500, Terry wrote: I want to get notified every 30 minutes indefinitely if a service is in a hard state of warning or critical. However, I want another contact to only get notified one time when that hard state is achieved.That's it. Have you looked at service escalations? With those, you can change the list of contacts based on how many notifications have been sent. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] Some Observations on Installation
On Sat, 2007-09-22 at 13:27 +1200, Jim Pye wrote: 1. The --with-htmlurl option on the ./configure command did not seem to work for either install. It seems you have a typo. The option name is '-with-htmurl'. 2. The filename for the rc.d script was just nagios which meant that one would override the other. That's pretty much standard behavior for most software that installs an init script, and is usually what is needed 90% of the time. (I too have done side-by-side installs of Nagios, so I just make sure to avoid running make install-init.) -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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] notifications 3.0b3 not working.
On Fri, 2007-09-28 at 04:54 +0200, Ken Lee wrote: Mate, there are no lines similar to this in the messages file, in fact no mention of smtp at all in the latest one. I have also looked in the mail log and the only nagios entries are the tests that I have done. You said you didn't see any SERVICE ALERT lines in /var/log/messages, but did you also check /usr/local/nagios/var/nagios.log? From the configs you posted, that should be where those types of messages go. (You'll have to excuse me if you already checked that file. I just wasn't sure based on your response if you have looked there as well.) -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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] service/host escallations with additional groups
On Thu, 2007-09-27 at 11:29 -0700, Scott Brynen wrote: I'm trying to define some service/host escallations that add an additional user to the first notification, however, the additive operator doesn't seem to work define hostescalation{ hostgroup_name * first_notification 1 last_notification 1 contact_groups +servicedesk } (on the first notification, send a note to the servicedesk IN ADDITION to the normal.) The contact_groups value in a host escalation replaces the contact_groups value from the host definition. To accomplish what you want, you need to set contact_groups to be original_group,servicedesk. Of course, you are using a wildcard for the hostgroup_name, so you would probably need a separate escalation for each hostgroup since they may have different original contact groups. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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] Ideas for service dependencies on SSH?
On Tue, 2007-10-02 at 12:55 -0600, Ivan Fetch wrote: Unfortunately, what this appears to do, is to define all combinations of service dependencies - E.G. Disksuite on host2 depends on SSH on host1, Disksuite on host1 depends on SSH on host2, and so on... How are others accomplishing this? Waiting for the final Nagios 3.0 release :-) Assuming that you are using Nagios 2.x, what you want to do is not possible unless you define a dependency separately for every host. That is the biggest issue keeping me from using proper service dependencies in my setup. However, Nagios 3.0 addresses that. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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] check_procs xend
On Sat, 2007-09-08 at 00:57 -0500, Terry L. Inzauro wrote: [EMAIL PROTECTED]:/etc/xen# ps -ef | grep xend root 2392 1 0 Sep07 ?00:00:00 python /usr/lib/xen-3.0.3-1/bin/xend start root 2394 2392 0 Sep07 ?00:00:11 python /usr/lib/xen-3.0.3-1/bin/xend start i've tried the following with no success: '/opt/nagios/libexec/check_procs -w 2:2 -c 2:2 -C python -a '/usr/lib/xen-3.0.3-1/bin/xend start'' '/opt/nagios/libexec/check_procs -w 2:2 -c 2:2 -C python -a '/usr/lib/xen-3.0.3-1/bin/xend'' '/opt/nagios/libexec/check_procs -w 2:2 -c 2:2 -C python -a 'start'' '/opt/nagios/libexec/check_procs -w 2:2 -c 2:2 -C python' Matching the command can sometimes be tricky. (Running ps -ef on one of my systems shows the command /usr/sbin/gmond, but check_procs will only see it if I use -C gmond and not -C /usr/sbin/gmond.) Since you are more interested in finding the xend portion of the command, I suggest dropping the -C option and just use -a xend to locate the xend instances. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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] notification_interval from the serviceescalation is ignored?
(Ilya: I have added the nagios-users mailing list back into the CC list. Always make sure to include the mailing list so that others can follow the discussion and possibly learn from it.) On Sat, 2007-09-01 at 09:35 +0200, [EMAIL PROTECTED] wrote: On Fri, 2007-08-31 at 09:56 +0200, Ilya Ruprecht wrote: Ok, i understand. But netherless, something is wrong - look at my posting: the notification_interval of SSH is set to 60, but i became ALL notifications in 10 minute interval. In your original post, you said you defined this escalation: define serviceescalation{ hostgroup_name vpn-server service_description SSH first_notification 1 last_notification 5 notification_interval 3 contact_groups linux-admins } That escalation takes effect on the first notification, and thus notification_interval gets changed to 3. With the two escalations you defined, the notification_interval 60 line from your service definition never takes effect. Exactly! That's what i mean! Neither the notification_interval from the service-definition, nor the notification_interval from the serviceescalation-definition was considered. Yes, they are both considered. It's just that the notification_interval from your escalation overrides the value from the service definition. But where then the 10-minutes interval came from? from the check_interval from service-definition? Yes. That is what happens when you have a check_interval that is greater than the notification_interval. A notification_interval of 3 does not guarantee that notifications will be sent every 3 minutes. It only guarantees that consecutive notifications will be 3 or more minutes apart. If the check_interval is 10, then you will get notifications every 10 minutes. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] notification_interval from the serviceescalation is ignored?
On Thu, 2007-08-30 at 14:12 +0200, Ilya Ruprecht wrote: Furthermore, the notification_interval in the service-part is described as Re-notify about service problems every XXX. Note: about service problems. Now, if i set the notification_interval to a lower value then a normal_check_interval, i.e. 9, i get following warning-message at nagios pre-flight-check: [snip] But, hell, what the normal_check_interval have to do with notification_interval?! These two are completely different things! Or have i misunderstood something? Perhaps this will help clear things up. The notification_interval option sets an upper limit on how often notifications are sent. The normal_check_interval options controls how often the check is run. If notification_interval=10 and normal_check_interval=5, you can get a situation like this one (I'll use t=XX to try and convey the timeline when events occur). [t=0] Check runs. [t=0] Check fails. [t=0] Nagios sends notification. [t=5] Check runs [t=5] Check fails [t=5] Time since last notifications is 5 which is less than notification_interval=10. Nagios prevents notification. [t=10] Check runs. [t=10] Check fails. [t=10] Time since last notification is 10 which is greater than or equal to notification_interval=10. Nagios sends notification. However if notification_interval=5 and normal_check_interval=10, you get this. [t=0] Check runs. [t=0] Check fails. [t=0] Nagios sends notification. [t=10] Check runs. [t=10] Check fails. [t=10] Time since last notification is 10 which is greater than or equal to notification_interval=10. Nagios sends notification. Nagios only sends notifications immediately after a check (it won't resend an old value). So if normal_check_interval = notification_interval, you effectively have notification_interval = normal_check_interval. That is why Nagios prints the warning message: Warning: Service 'SSH' on host 'vpn-gw1-local' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval. That seems to be what is happening in your case. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] Detecting partial outages
David Barrett wrote: Specifically, I have multiple datacenters for my production service, and then two separate locations from which I do monitoring. It's very rare that any of the production datacenters goes down, but it does happen on occasion where one of the datacenters becomes inaccessible from only *one* of the monitoring stations. (In other words, the datacenter is up and running fine, and appears accessible by real users, but looks down to one of my monitoring stations.) Is there any way to configure Nagios to detect this sort of partial outage condition and ignore it? I only want to be notified if it's reported down by *both* monitoring stations. Maybe this could be handled by service dependencies. Here is my rough idea, and you can decide if it adequately meets your needs. (I'll call the two Nagios installations Nag_A and Nag_B.) 1) Nag_B monitors the datacenter. The service check on Nag_B never sends notifications, it just submits passive check results to Nag_A. 2) Nag_A also monitors the datacenter. We'll call this service DC_A. It also has a service called DC_B which never performs active checks (it just gets the passive check results from Nag_B). 3) A service dependency is defined so DC_A depends on DC_B, with the notification_failure_criteria option set to o. If I understand service dependencies correctly, when DC_B is OK there will never be a notification (regardless of the state of DC_A). Only if DC_B is non-OK and DC_A is non-OK will a notification get sent. -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] Error in configuration file in hosts.cfg
On Thu, 2007-08-16 at 08:32 -0300, Rodrigo Tavares wrote: When I run the command : ./bin/nagios -v /usr/local/nagios/etc/hosts.cfg Come this merror messenger: Error in configuration file '/usr/local/nagios/etc/hosts.cfg' - Line 3 (NULL value) I believe the problem is that you are trying to verify just the hosts.cfg file. When using the -v option, you need to pass it the name of the main nagios config file (typically nagios.cfg). -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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] Error in configuration file in hosts.cfg
On Thu, 2007-08-16 at 11:43 -0300, Rodrigo Tavares wrote: Error: Could not open config directory '/usr/local/nagios/etc/servers' for reading. It sounds like you created this file, but Nagios thinks it is a directory. Are you using cfg_file or cfg_dir in nagios.cfg? -- Rick Mohr Systems Developer Ohio Supercomputer Center - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.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