On Tue, Feb 22, 2011 at 07:36, Michael Friedrich
<[email protected]> wrote:
> sound is creepy. either way - i don't know. but you may get your hands
> on the sources and checkout what 'hoheader' exactly does. it's one of
> those things i never looked into.

Haha, yes, I don't like the sound all that much, but unfortunately our
situation requires audible alerts when there's a problem to ensure
prompt response time.

Looking at the source, I think I've identified the problem

In status.c, from line 342:

 342         if(display_header==TRUE){
...
 356                 /* middle column of top row */
 357                 printf("<td align=center valign=top width=33%%>\n");
 358                 show_host_status_totals();
 359                 printf("</td>\n");
 360
 361                 /* right hand column of top row */
 362                 printf("<td align=center valign=top width=33%%>\n");
 363                 show_service_status_totals();
 364                 printf("</td>\n");
..
 530                 }
...
 533         /* embed sound tag if necessary... */
 534         if(problem_hosts_unreachable>0 && host_unreachable_sound!=NULL)
 535                 sound=host_unreachable_sound;

show_host_status_totals() increments problem_hosts_unreachable as part
of it's loop, which produces the table used in the header to show the
total problems. same thing is occurring with service problems, which
results in the sound checks not matching and not being added.

i'm open to suggestions as to how to go about changing this.

the easiest approach i can see is to break down the
if(display_header==TRUE){ into multiple blocks, and pass
display_header to show_host_status_totals(display_header) and
show_service_status_totals(display_header), thus making sure it's
always called and only printf's if display_header==TRUE, but on the
flip side, that's a bit ugly and would result in more work being done
where no work is necessarily needed.

considerred adding a new param to pass the cgi (totals/nototals), but
i'm not sure how to work the logic so that if the param is omitted,
the current behaviour is still observed.

any thoughts?

cheers,
deeps.

------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to