2013-05-22 Hirofumi Kosaka <kosaka@rworks.jp>

* pandoradb.sql: (workaround to avoid mysql's warning
	'Specified key was too long; max key length is 767 bytes'
	(warning code=1071).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8350 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
hkosaka 2013-06-19 09:53:28 +00:00
parent 5650007350
commit 59ddf0fb07
5 changed files with 33 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2013-06-19 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/Config.pm,
lib/PandoraFMS/Core.pm,
conf/pandora_server.conf.new,
FreeBSD/pandora_server.conf: added eMail option that make
alerts shared by all destinations (delivering in separate
mail is default as in the prior versions).
2013-06-19 Miguel de Dios <miguel.dedios@artica.es> 2013-06-19 Miguel de Dios <miguel.dedios@artica.es>
* util/pandora_xml_stress.pl: fixed the send across tentacle, now * util/pandora_xml_stress.pl: fixed the send across tentacle, now

View File

@ -218,6 +218,11 @@ mta_address localhost
#mta_from Pandora FMS <pandora@mydomain.com> #mta_from Pandora FMS <pandora@mydomain.com>
# Set 1 if want eMail deliver alert in separate mail (default).
# Set 0 if want eMail deliver shared mail by all destination.
mail_in_separate 1
# xprobe2: Optional package to detect OS types using advanced TCP/IP # xprobe2: Optional package to detect OS types using advanced TCP/IP
# fingerprinting tecniques, much more accurates than stadard nmap. # fingerprinting tecniques, much more accurates than stadard nmap.
# If not provided, nmap is used insted xprobe2 # If not provided, nmap is used insted xprobe2

View File

@ -214,6 +214,11 @@ mta_address localhost
#mta_from Pandora FMS <pandora@mydomain.com> #mta_from Pandora FMS <pandora@mydomain.com>
# Set 1 if want eMail deliver alert in separate mail (default).
# Set 0 if want eMail deliver shared mail by all destination.
mail_in_separate 1
# xprobe2: Optional package to detect OS types using advanced TCP/IP # xprobe2: Optional package to detect OS types using advanced TCP/IP
# fingerprinting tecniques, much more accurates than stadard nmap. # fingerprinting tecniques, much more accurates than stadard nmap.
# If not provided, nmap is used insted xprobe2 # If not provided, nmap is used insted xprobe2

View File

@ -249,6 +249,8 @@ sub pandora_load_config {
$pa_config->{"mta_pass"} = ''; # Introduced on 2.0 $pa_config->{"mta_pass"} = ''; # Introduced on 2.0
$pa_config->{"mta_auth"} = 'none'; # Introduced on 2.0 (Support LOGIN PLAIN CRAM-MD5 DIGEST-MD) $pa_config->{"mta_auth"} = 'none'; # Introduced on 2.0 (Support LOGIN PLAIN CRAM-MD5 DIGEST-MD)
$pa_config->{"mta_from"} = 'pandora@localhost'; # Introduced on 2.0 $pa_config->{"mta_from"} = 'pandora@localhost'; # Introduced on 2.0
$pa_config->{"mail_in_separate"} = 1; # 1: eMail deliver alert mail in separate mails.
# 0: eMail deliver 1 mail with all destination.
# nmap for recon OS fingerprinting and tcpscan (optional) # nmap for recon OS fingerprinting and tcpscan (optional)
$pa_config->{"nmap"} = "/usr/bin/nmap"; $pa_config->{"nmap"} = "/usr/bin/nmap";
@ -405,6 +407,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^mta_from\s(.*)/i) { elsif ($parametro =~ m/^mta_from\s(.*)/i) {
$pa_config->{'mta_from'}= clean_blank($1); $pa_config->{'mta_from'}= clean_blank($1);
} }
elsif ($parametro =~ m/^mail_in_separate\s([0-9]*)/i) {
$pa_config->{'mail_in_separate'}= clean_blank($1);
}
elsif ($parametro =~ m/^snmp_logfile\s(.*)/i) { elsif ($parametro =~ m/^snmp_logfile\s(.*)/i) {
$pa_config->{'snmp_logfile'}= clean_blank($1); $pa_config->{'snmp_logfile'}= clean_blank($1);
} }

View File

@ -843,11 +843,16 @@ sub pandora_execute_action ($$$$$$$$$;$) {
$field1 = subst_alert_macros ($field1, \%macros); $field1 = subst_alert_macros ($field1, \%macros);
$field2 = subst_alert_macros ($field2, \%macros); $field2 = subst_alert_macros ($field2, \%macros);
$field3 = subst_alert_macros ($field3, \%macros); $field3 = subst_alert_macros ($field3, \%macros);
if ($pa_config->{"mail_in_separate"} != 0){
foreach my $address (split (',', $field1)) { foreach my $address (split (',', $field1)) {
# Remove blanks # Remove blanks
$address =~ s/ +//g; $address =~ s/ +//g;
pandora_sendmail ($pa_config, $address, $field2, $field3); pandora_sendmail ($pa_config, $address, $field2, $field3);
} }
}
else {
pandora_sendmail ($pa_config, $field1, $field2, $field3);
}
# Pandora FMS Event # Pandora FMS Event
} elsif ($clean_name eq "Pandora FMS Event") { } elsif ($clean_name eq "Pandora FMS Event") {