# Compute the total list of services running on the various hosts, and
# sort them alphabetically (except always put ping first).
- if( grep( /^ping$/, keys %main::SERVICES ) ) { push( @names, "ping" ); }
- foreach $service ( sort keys %main::SERVICES ) {
+ # If group has a compress attribute, only print services in use
+#&main::debug("self->name = " . $self->{'name'} .
+# "compress = " . $main::GROUPS{$self->{'name'}}->{'compress'} );
+ if ( $main::GROUPS{$self->{'name'}}->{'compress'} ) {
+ foreach $host ( $self->hosts() ) {
+ foreach $service ( $host->service_names() ) {
+ $services{$service}++; }}
+ @s = (keys %services);
+ } else {
+ @s = (keys %main::SERVICES);
+ }
+
+ if( grep( /^ping$/, (@s) ) ) { push( @names, "ping" ); }
+ foreach $service ( sort (@s) ) {
push( @names, $service ) unless $service eq "ping"; }
# Print the horizontal axis of the table (names of the services)