I think we're losing something in translation of me trying to tell you what i'm doing. Here is what i've been doing.<br><br>define service{<br> use basic-service<br> name check-site4
<br> notification_options w,u,c,r<br> check_command check_http!site.com!20!"Home" <br> register 0<br> }<br><br>and then later on in the config file
<br><br><br>define service{<br> use check-site4<br> service_description HTTP<br> contact_groups mis<br> host_name <a href="http://site.com">site.com</a><br>}<br><br>
<br><div><span class="gmail_quote">On 11/2/07, <b class="gmail_sendername">Hari Sekhon</b> <<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you had read the docs like I said, I can't see how you could miss the<br>fact that you have a service definition without a host_name or<br>hostgroup_name!<br><br>Where is this service check going to run against if you haven't told it
<br>which host you want to test?<br><br>I even gave you the anchored link to the exact place where it shows you<br>the definitions that are needed for that block...<br><br>-h<br><br>Hari Sekhon<br><br><br><br>Jerad Riggin wrote:
<br>> Ok, so for example<br>><br>> define service{<br>> use basic-service<br>> notification_options w,u,c,r<br>> check_command check_http!site.com!20!"Home"
<br>> Service description CheckString<br>> }<br>><br>> Sorry if this seems like a newbie question. I'm just trying to<br>> backtrack and optimize the config before I get too far down the road.
<br>><br>><br>> On 11/2/07, *Hari Sekhon* <<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a><br>> <mailto:<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a>>> wrote:
<br>><br>> also, you are making it more trouble than it needs to be, instead of<br>> trying to do register 0 and making the last block a template<br>> block, just<br>> put the host name in there and the service description as I hinted and
<br>> that is all you need, you will then have the first 2 blocks plus<br>> one for<br>> each service on each host with different string checks...<br>><br>> -h<br>><br>> Hari Sekhon
<br>><br>><br>><br>> Jerad Riggin wrote:<br>> > I've read the help docs, like I said I have a working installation<br>> > checking about 15 servers. I have a PING service that pings a host
<br>> > group. I can't do that with this because I'm checking a different<br>> > string on each site, so i'm guessing it has to be separated<br>> out. Does<br>> > this make sense?
<br>> ><br>> > On 11/2/07, *Hari Sekhon* <<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a><br>> <mailto:<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com
</a>><br>> > <mailto:<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a><br>> <mailto:<a href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a>>>> wrote:<br>> >
<br>> > You need to reread the docs, this is the most basic of<br>> questions.<br>> ><br>> ><br>> <a href="http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#service">http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#service
</a><br>> <<a href="http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#service">http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#service</a>><br>> ><br>> > Hint: You are missing a service_description in the last
<br>> block for one.<br>> > You should not have name in that last block either, you need<br>> > host_name.<br>> ><br>> > Read docs pls.<br>> ><br>> > -h
<br>> ><br>> > Hari Sekhon<br>> ><br>> ><br>> ><br>> > Jerad Riggin wrote:<br>> > > I have a functioning nagios setup but I have a quick
<br>> question. I am<br>> > > going through and adding website string checks so we can keep<br>> > track of<br>> > > availability on one of our webservers.<br>> > >
<br>> > > So in services.cfg I have<br>> > ><br>> > > define service{<br>> > > name generic-service ;<br>> Generic
<br>> > > service name<br>> > > active_checks_enabled 1 ;<br>> Active<br>> > > service checks are enabled<br>> > > passive_checks_enabled 1 ;
<br>> Passive<br>> > > service checks are enabled/accepted<br>> > > parallelize_check 1 ;<br>> Active<br>> > > service checks should be parallelized (Don't disable)
<br>> > > obsess_over_service 1 ;<br>> We should<br>> > > obsess over this service (if necessary)<br>> > > check_freshness 0 ;
<br>> > Default is<br>> > > to NOT check service 'freshness'<br>> > > notifications_enabled 1 ;<br>> Service<br>> > > notifications are enabled
<br>> > > event_handler_enabled 1 ;<br>> Service<br>> > > event handler is enabled<br>> > > flap_detection_enabled 1 ;
<br>> Flap<br>> > > detection is enabled<br>> > > process_perf_data 1 ;<br>> Process<br>> > > performance data<br>> > > retain_status_information 1  
; ;
<br>> Retain<br>> > > status information across program restarts<br>> > > retain_nonstatus_information 1 ;<br>> Retain<br>> > > non-status information across program restarts
<br>> > > register 0 ;<br>> DONT<br>> > > REGISTER THIS DEFINITION - NOT A REAL SERVICE, JUST A<br>> TEMPLATE!<br>> > > }
<br>> > ><br>> > > define service{<br>> > > use generic-service<br>> > > name basic-service
<br>> > > is_volatile 0<br>> > > check_period 24x7<br>> > > max_check_attempts 5<br>> > >  
; normal_check_interval 3
<br>> > > retry_check_interval 1<br>> > > notification_interval 15<br>> > > notification_period 24x7<br>> > > register  
; 0
<br>> > > }<br>> > ><br>> > > I then have as just one example:<br>> > ><br>> > > define service{<br>> > > use basic-service
<br>> > > name check-site4<br>> > > notification_options w,u,c,r<br>> > > check_command<br>> > check_http!site.com!20!"Home"
<br>> > > register 0<br>> > > }<br>> > ><br>> > ><br>> > > My question is, you notice that I have the name as
<br>> check-site4, and<br>> > > then later on in the services.cfg I call up that<br>> > checksite-4. Is this<br>> > > the correct way? Do I need to define a service for each host
<br>> > and then<br>> > > later on call it by name to execute the service check? Is<br>> this<br>> > a bad<br>> > > way of going about it?<br>> > >
<br>> > > Thanks,<br>> > ><br>> > > Jerad<br>> > ><br>> ><br>> ------------------------------------------------------------------------<br>
><br>> > ><br>> > ><br>> ><br>> -------------------------------------------------------------------------<br>> ><br>> > > This SF.net email is sponsored by: Splunk Inc.
<br>> > > Still grepping through log files to find problems? Stop.<br>> > > Now Search log events and configuration files using AJAX and a<br>> > browser.<br>> > > Download your FREE copy of Splunk now >>
<br>> <a href="http://get.splunk.com/">http://get.splunk.com/</a> <<a href="http://get.splunk.com/">http://get.splunk.com/</a>><br>> > ><br>> ><br>> ------------------------------------------------------------------------
<br>> > ><br>> > > _______________________________________________<br>> > > Nagios-users mailing list<br>> > > <a href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br>> <mailto:<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>><br>> > <mailto:<a href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br>> <mailto:<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>> ><br>> > > <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">
https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>> > < <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>>
<br>> > > ::: Please include Nagios version, plugin version (-v) and OS<br>> > when reporting any issue.<br>> > > ::: Messages without supporting info will risk being sent to
<br>> > /dev/null<br>> ><br>> ><br>><br>><br></blockquote></div><br>