I've just tried this, using the standard check_http plugin you are using. It appears not.
As soon as one string is not found it goes critical. You could always write a custom plugin to test your websites, or much more easily a shell wrapper plugin to call the first, if it fails, call the second, and only if that fails go critical... not perfect though, a better/custom plugin would serve you better. -h Hari Sekhon Jerad Riggin wrote: > In that case, is there a way to specify more than one possible string, > so that for example if it can't find "Home", but it can find > "Checkout", it considers the host up? > > On 11/2/07, *Hari Sekhon* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > yes you have to use a separate one for each site, how else would > you be > able to use a separate check? Unless you expect the word "Home" on > each > site and that is your string check. Another option is using Macros > but I > suspect this may not do what you want... > > -h > > Hari Sekhon > > > > Jerad Riggin wrote: > > I've read the help docs, like I said I have a working installation > > checking about 15 servers. I have a PING service that pings a host > > group. I can't do that with this because I'm checking a different > > string on each site, so i'm guessing it has to be separated > out. Does > > this make sense? > > > > On 11/2/07, *Hari Sekhon* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>> wrote: > > > > You need to reread the docs, this is the most basic of > questions. > > > > http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#service > > > > Hint: You are missing a service_description in the last > block for one. > > You should not have name in that last block either, you need > > host_name. > > > > Read docs pls. > > > > -h > > > > Hari Sekhon > > > > > > > > Jerad Riggin wrote: > > > I have a functioning nagios setup but I have a quick > question. I am > > > going through and adding website string checks so we can keep > > track of > > > availability on one of our webservers. > > > > > > So in services.cfg I have > > > > > > define service{ > > > name generic-service ; > Generic > > > service name > > > active_checks_enabled 1 ; > Active > > > service checks are enabled > > > passive_checks_enabled 1 ; > Passive > > > service checks are enabled/accepted > > > parallelize_check 1 ; > Active > > > service checks should be parallelized (Don't disable) > > > obsess_over_service 1 ; > We should > > > obsess over this service (if necessary) > > > check_freshness 0 ; > > Default is > > > to NOT check service 'freshness' > > > notifications_enabled 1 ; > Service > > > notifications are enabled > > > event_handler_enabled 1 ; > Service > > > event handler is enabled > > > flap_detection_enabled 1 ; > Flap > > > detection is enabled > > > process_perf_data 1 ; > Process > > > performance data > > > retain_status_information 1 ; > Retain > > > status information across program restarts > > > retain_nonstatus_information 1 ; > Retain > > > non-status information across program restarts > > > register 0 ; > DONT > > > REGISTER THIS DEFINITION - NOT A REAL SERVICE, JUST A > TEMPLATE! > > > } > > > > > > define service{ > > > use generic-service > > > name basic-service > > > is_volatile 0 > > > check_period 24x7 > > > max_check_attempts 5 > > > normal_check_interval 3 > > > retry_check_interval 1 > > > notification_interval 15 > > > notification_period 24x7 > > > register 0 > > > } > > > > > > I then have as just one example: > > > > > > define service{ > > > use basic-service > > > name check-site4 > > > notification_options w,u,c,r > > > check_command > > check_http!site.com!20!"Home" > > > register 0 > > > } > > > > > > > > > My question is, you notice that I have the name as > check-site4, and > > > then later on in the services.cfg I call up that > > checksite-4. Is this > > > the correct way? Do I need to define a service for each host > > and then > > > later on call it by name to execute the service check? Is > this > > a bad > > > way of going about it? > > > > > > Thanks, > > > > > > Jerad > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > ------------------------------------------------------------------------- > > > > > 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/ <http://get.splunk.com/> > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > Nagios-users mailing list > > > [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]> > > > > https://lists.sourceforge.net/lists/listinfo/nagios-users > > < 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 > > > > > > ------------------------------------------------------------------------- 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 [email protected] 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
