I'm trying to configure the systemmonitoring extension to process different sources of nagios in parallel.
Step 1 (OK)
i can receive email from nagios source1, and tickets are correctly opened and closed.
FromAddressRegExp: source1@email.com
HostRegExp: \s*Host:\s+(.*)\s*
CloseTicketRegExp: OK|UP
NewTicketRegExp: CRITICAL|DOWN
ServiceRegExp: \s*Service:\s+(.*)\s*
StateRegExp: \s*Stat[eo]:\s+(\S+)
incoing email content is
###########
Host: TIM-DIR-SAME(10.1.2.
![Cool 8)](./images/smilies/icon_cool.gif)
Service:
State: DOWN
###########
Step 2 (NOT OK)
I insert another source, which requires a different set of regexp:
FromAddressRegExp: source1@email.com| source2@email.com
HostRegExp: \s*Host:\s+(.*)\s*|id_unico:\s*(.+)\s*
CloseTicketRegExp: OK|UP|risolto
NewTicketRegExp: CRITICAL|DOWN|aperto
ServiceRegExp: \s*Service:\s+(.*)\s*|tipocaso:\s*(.+)\s*
StateRegExp: \s*Stat[eo]:\s+(\S+)|status:\s*(.+)\s*
Content is like:
##################
EMAIL_AUTO
id_unico: 7972047871
rifcliente1: Npo Sistemi (xxx) Tel. email
rifcliente2: SS SP11, 20067 Non definito (ND)
categoria: Allarme
sottocategoria: Mancata Comunicazione
descrizione: - (SG21R0104B) 15.156.153.85 XXXXXX
priorita: basso
impatto: basso
livello: basso
urgenza: basso
tipocaso: incident
originecaso: allarme
status: aperto
##################
I already tested teh regexp with http://regexpal.com/ and they are working.
Apparently the SystemMonitoring recognizes only the first match for stateregexp and serviceregexp, and not the alternatives.
The system is working fine for closeticketregexp and openticketregexp.
Every time the system down not recognize this as a "nagios" integration, responding with
"Jul 18 17:24:28 npohd02 OTRS-otrs.PostMaster.pl-10[17179]: [Notice][Kernel::System::PostMaster::Filter::SystemMonitoring::Run] SystemMonitoring Mail: SystemMonitoring: Could not find host address and/or state in mail => Ignoring"
To get it to work I have to force the input to Host/Service/State as a valid label.
Any ideas ?
Thanks,
Massimo