Skip to content

Commit

Permalink
reports: hide program messages from reports by default
Browse files Browse the repository at this point in the history
can be changed back by report_include_class2 = 2
  • Loading branch information
sni committed Feb 25, 2017
1 parent 3a5b207 commit 54b0913
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -17,6 +17,8 @@ next:
- honor acknowledgement and downtime status shape color calculation
- fix shape color for host problems in group/dashboard panels
- fix saving column width for grid panels
- Reports:
- hide program messages from reports by default, can be changed back by report_include_class2 = 2

2.12-3 Tue Dec 20 20:43:54 CET 2016
- fix js error on status page
Expand Down
4 changes: 4 additions & 0 deletions docs/documentation/configuration.asciidoc
Expand Up @@ -230,6 +230,10 @@ ex.:
Include messages with class = 2 (program messages) in reports.
Setting this to 0 allows the MySQL backend to use indexes efficiently

- 0 = off
- 1 = auto (default)
- 2 = on

ex.:

report_include_class2 = 1
Expand Down
9 changes: 7 additions & 2 deletions lib/Thruk/Utils/Avail.pm
Expand Up @@ -559,8 +559,13 @@ sub calculate_availability {
push @typefilter, { -or => [ @logservicefilter ] };
}
}
if ($c->config->{'report_include_class2'} == 1) {
push @typefilter, { class => 2 }; # programm messages
if($c->config->{'report_include_class2'} != 0) { # 0 means force - off
if($c->config->{'report_include_class2'} == 2 # 2 means force on
|| ($c->config->{'report_include_class2'} == 1 # 1 means default auto
&& ($full_log_entries || $assumestatesduringnotrunning eq 'no'))
) {
push @typefilter, { class => 2 }; # programm messages
}
}
if($rpttimeperiod) {
push @typefilter, { '-or' => [
Expand Down
3 changes: 3 additions & 0 deletions thruk.conf
Expand Up @@ -566,6 +566,9 @@ cron_post_edit_cmd = /usr/bin/crontab /tmp/thruk_cron.tmp && rm -f /tmp/thruk_cr

# Include messages with class = 2 (program messages) in reports.
# Setting this to 0 allows the MySQL backend to use indexes efficiently
# 0 = off
# 1 = auto (default)
# 2 = on
# report_include_class2 = 1

# Should thruk update the logcache databases before running reports?
Expand Down

0 comments on commit 54b0913

Please sign in to comment.