From 0b714540e60f2ec14e1774757563d3e3d5d5cb67 Mon Sep 17 00:00:00 2001 From: Florian Asche Date: Fri, 9 May 2014 11:27:18 +0200 Subject: [PATCH] Refs #5529: Bugfix - Added Port to Cache File to avoid problems with multiple tomcat instances on one server. --- centreon-plugins/apps/tomcat/web/mode/requestinfo.pm | 2 +- centreon-plugins/apps/tomcat/web/mode/traffic.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm b/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm index ab0a9f815..1c888cf01 100644 --- a/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm +++ b/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm @@ -238,7 +238,7 @@ sub run { $self->manage_selection(); my $new_datas = {}; - $self->{statefile_value}->read(statefile => "cache_apps_tomcat_web_" . $self->{hostname} . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all'))); + $self->{statefile_value}->read(statefile => 'cache_apps_tomcat_web_' . $self->{option_results}->{hostname} . '_' . $self->{option_results}->{port} . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all'))); $new_datas->{last_timestamp} = time(); my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp'); diff --git a/centreon-plugins/apps/tomcat/web/mode/traffic.pm b/centreon-plugins/apps/tomcat/web/mode/traffic.pm index a8f02933e..0b0d7a117 100644 --- a/centreon-plugins/apps/tomcat/web/mode/traffic.pm +++ b/centreon-plugins/apps/tomcat/web/mode/traffic.pm @@ -223,7 +223,7 @@ sub run { $self->manage_selection(); my $new_datas = {}; - $self->{statefile_value}->read(statefile => "cache_apps_tomcat_web_" . $self->{hostname} . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all'))); + $self->{statefile_value}->read(statefile => 'cache_apps_tomcat_web_' . $self->{option_results}->{hostname} . '_' . $self->{option_results}->{port} . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all'))); $new_datas->{last_timestamp} = time(); my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');