Merge branch 'ent-11414-bug-al-usar-mas-de-una-macro-de-modulegraph-con-el-mismo-numero-de-horas-en-alertado' into 'develop'
Add module to graph hash Closes pandora_enterprise#11414 See merge request artica/pandorafms!6333
This commit is contained in:
commit
9952fb64a0
|
@ -1231,7 +1231,7 @@ sub pandora_execute_action ($$$$$$$$$;$$) {
|
||||||
$field19 = defined($alert->{'field19'}) && $alert->{'field19'} ne "" ? $alert->{'field19'} : $action->{'field19'};
|
$field19 = defined($alert->{'field19'}) && $alert->{'field19'} ne "" ? $alert->{'field19'} : $action->{'field19'};
|
||||||
$field20 = defined($alert->{'field20'}) && $alert->{'field20'} ne "" ? $alert->{'field20'} : $action->{'field20'};
|
$field20 = defined($alert->{'field20'}) && $alert->{'field20'} ne "" ? $alert->{'field20'} : $action->{'field20'};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Recovery fields, thanks to Kato Atsushi
|
# Recovery fields, thanks to Kato Atsushi
|
||||||
if ($alert_mode == RECOVERED_ALERT) {
|
if ($alert_mode == RECOVERED_ALERT) {
|
||||||
# Field 1 is a special case where [RECOVER] prefix is not added even when it is defined
|
# Field 1 is a special case where [RECOVER] prefix is not added even when it is defined
|
||||||
|
@ -1587,11 +1587,11 @@ sub pandora_execute_action ($$$$$$$$$;$$) {
|
||||||
my $period = $hours * 3600; # Hours to seconds
|
my $period = $hours * 3600; # Hours to seconds
|
||||||
if($threshold == 0){
|
if($threshold == 0){
|
||||||
$params->{"other"} = $period . '%7C1%7C0%7C225%7C%7C14';
|
$params->{"other"} = $period . '%7C1%7C0%7C225%7C%7C14';
|
||||||
$cid = 'module_graph_' . $hours . 'h';
|
$cid = 'module_graph_' . (defined($module) && $module ne '' ? ($module . '_') : '') . $hours . 'h';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$params->{"other"} = $period . '%7C1%7C1%7C225%7C%7C14';
|
$params->{"other"} = $period . '%7C1%7C1%7C225%7C%7C14';
|
||||||
$cid = 'module_graphth_' . $hours . 'h';
|
$cid = 'module_graphth_' . (defined($module) && $module ne '' ? ($module . '_') : '') . $hours . 'h';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined($module)) {
|
if (defined($module)) {
|
||||||
|
@ -1689,7 +1689,7 @@ sub pandora_execute_action ($$$$$$$$$;$$) {
|
||||||
. "Content-Location: " . $dataname . "\n\n"
|
. "Content-Location: " . $dataname . "\n\n"
|
||||||
. $base64_data . "\n";
|
. $base64_data . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($pa_config->{"mail_in_separate"} != 0){
|
if ($pa_config->{"mail_in_separate"} != 0){
|
||||||
foreach my $address (split (',', $field1)) {
|
foreach my $address (split (',', $field1)) {
|
||||||
# Remove blanks
|
# Remove blanks
|
||||||
|
|
Loading…
Reference in New Issue