mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2013-06-14 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/Core.pm: Fixed comments addition in the events with the internal action Create Pandora FMS event git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8328 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
237902d689
commit
c8c5ed5199
@ -1,3 +1,8 @@
|
|||||||
|
2013-06-14 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Core.pm: Fixed comments addition in the
|
||||||
|
events with the internal action Create Pandora FMS event
|
||||||
|
|
||||||
2013-06-13 SAncho Lerena <alerena@artica.es>
|
2013-06-13 SAncho Lerena <alerena@artica.es>
|
||||||
|
|
||||||
* pandora_server.redhat.spec: Fixed some path permissions.
|
* pandora_server.redhat.spec: Fixed some path permissions.
|
||||||
|
@ -893,6 +893,14 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||||||
# Field 8 (comments);
|
# Field 8 (comments);
|
||||||
my $comment = $field8;
|
my $comment = $field8;
|
||||||
|
|
||||||
|
if($comment ne '') {
|
||||||
|
# Get datetime for the comment of the event
|
||||||
|
my $datetime = strftime( "%F, %H:%M:%S %p", localtime(time));
|
||||||
|
|
||||||
|
# This format is necessary for the ugly parser of event comments. Will be changed in the future to json
|
||||||
|
$comment = "<b>-- Added comment by an alert [" . $datetime . "] --</b><br><div>" . $comment . "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
pandora_event ($pa_config, $event_text, (defined ($agent) ? $agent->{'id_grupo'} : 0), (defined ($fullagent) ? $fullagent->{'id_agente'} : 0), $priority, 0, 0, $event_type, 0, $dbh, $source, '', $comment, $id_extra, $tags);
|
pandora_event ($pa_config, $event_text, (defined ($agent) ? $agent->{'id_grupo'} : 0), (defined ($fullagent) ? $fullagent->{'id_agente'} : 0), $priority, 0, 0, $event_type, 0, $dbh, $source, '', $comment, $id_extra, $tags);
|
||||||
# Validate event (field1: agent name; field2: module name)
|
# Validate event (field1: agent name; field2: module name)
|
||||||
} elsif ($clean_name eq "Validate Event") {
|
} elsif ($clean_name eq "Validate Event") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user