SystemMonitoring (Nagios integration): Could not find any CI

Moderator: crythias

Locked
inet
Znuny newbie
Posts: 11
Joined: 20 Feb 2012, 10:32
Znuny Version: OTRS31
Real Name: INTERNET AG
Company: INTERNET AG

SystemMonitoring (Nagios integration): Could not find any CI

Post by inet »

Hello,

we're using the SystemMonitoring plugin for integration of Nagios within OTRS. Every time a nagios mail arrives at OTRS, the following error is displayed in the system protocol, with XXXXX being the hostname of monitored host in question.

Code: Select all

error 	OTRS-otrs.PostMasterMailbox.pl-30 	Could not find any CI with the name 'XXXXX'.
I found out that CI ist 'Configured Item', but didn't find any further information regarding this error. Besides that error, SystemMonitoring seems to work well. Nagios mails are processed and grouped by problem as expected.

Below our SystemMonitoring configuration:

Code: Select all

$Self->{'Nagios::Acknowledge::HTTP::Password'} =  '*******';
$Self->{'Nagios::Acknowledge::HTTP::User'} =  '********';
$Self->{'Nagios::Acknowledge::HTTP::URL'} =  'http://********/nagios/cgi-bin/cmd.cgi?cmd_typ=<CMD_TYP>&cmd_mod=2&host=<HOST_NAME>&service=<SERVICE_NAME>&sticky_ack=on&send_notification=on&persistent=on&com_data=<TicketNumber>&btnSubmit=Commit';
$Self->{'SystemMonitoring::LinkTicketWithCI'} =  '1';
$Self->{'SystemMonitoring::SetIncidentState'} =  '1';
$Self->{'PostMaster::PreFilterModule'}->{'1-SystemMonitoring'} =  {
  'ArticleType' => 'note-report',
  'CloseActionState' => 'closed successful',
  'ClosePendingTime' => '172800',
  'CloseTicketRegExp' => 'OK|UP',
  'DefaultService' => 'Host',
  'FreeTextHost' => '1',
  'FreeTextService' => '2',
  'FreeTextState' => '1',
  'FromAddressRegExp' => 'nagios@inet.de',
  'HostRegExp' => '\\s*Host:\\s+(.*)\\s*',
  'Module' => 'Kernel::System::PostMaster::Filter::SystemMonitoring',
  'NewTicketRegExp' => 'CRITICAL|DOWN',
  'SenderType' => 'system',
  'ServiceRegExp' => '\\s*Service:\\s+(.*)\\s*',
  'StateRegExp' => '\\s*State:\\s+(\\S+)'
};
Thanks in advance for any hint about how to find the source of the error message.

Regards,
Jonas Meurer
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: SystemMonitoring (Nagios integration): Could not find an

Post by Wolfgangf »

... and you are sure your 'HostRegExp' => '\\s*Host:\\s+(.*)\\s*', meets the name of your CI?
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
inet
Znuny newbie
Posts: 11
Joined: 20 Feb 2012, 10:32
Znuny Version: OTRS31
Real Name: INTERNET AG
Company: INTERNET AG

Re: SystemMonitoring (Nagios integration): Could not find an

Post by inet »

Wolfgangf wrote:... and you are sure your 'HostRegExp' => '\\s*Host:\\s+(.*)\\s*', meets the name of your CI?
I guess so, yes. All tickets created by Nagios mails have the Host field set properly, and mails about problems with open tickets are assigned to the ticket in question.

Here's an example mail from Nagios:
Notification Type: SERVICE PROBLEM
Host: host1.inet.de
Address: *********
Date/Time: Tue Feb 14 16:16:19 CET 2012
Service: Platte-/
State: CRITICAL
Info: NRPE: Command check_sda2 not defined
Command: check_nrpe!check_sda2
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: SystemMonitoring (Nagios integration): Could not find an

Post by Wolfgangf »

... and you CI is named "host1.inet.de" in this example?
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
inet
Znuny newbie
Posts: 11
Joined: 20 Feb 2012, 10:32
Znuny Version: OTRS31
Real Name: INTERNET AG
Company: INTERNET AG

Re: SystemMonitoring (Nagios integration): Could not find an

Post by inet »

Wolfgangf wrote:... and you CI is named "host1.inet.de" in this example?
how do I get the name of a CI?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SystemMonitoring (Nagios integration): Could not find an

Post by jojo »

if you are not using the CMDB Module, switch of the automatic setting of the CI incident state
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
inet
Znuny newbie
Posts: 11
Joined: 20 Feb 2012, 10:32
Znuny Version: OTRS31
Real Name: INTERNET AG
Company: INTERNET AG

Re: SystemMonitoring (Nagios integration): Could not find an

Post by inet »

jojo wrote:if you are not using the CMDB Module, switch of the automatic setting of the CI incident state
Can you please elaborate on that? I fear that I don't fully understand yet. What's the CMDB for, and why are you confident that we're not using it?

Apart from that, we'd prefer to find the source of this problem instead of using a workaround.

Regards,
jonas
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SystemMonitoring (Nagios integration): Could not find an

Post by jojo »

Thats not a workaround.

If you use the CMDB -> you can set this setting
if you don't use it -> don't switch this setting to on
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
inet
Znuny newbie
Posts: 11
Joined: 20 Feb 2012, 10:32
Znuny Version: OTRS31
Real Name: INTERNET AG
Company: INTERNET AG

Re: SystemMonitoring (Nagios integration): Could not find an

Post by inet »

I don't know what CMDB is for. can you point me do some documentation? To be honest, I don't even know whether I use CMDB or not :-/
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: SystemMonitoring (Nagios integration): Could not find an

Post by Wolfgangf »

oops!

Did you install the ITSM package or pure OTRS
If the second: forget about the error you are reporting
If you have it installed: please answer my question from earlier
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SystemMonitoring (Nagios integration): Could not find an

Post by jojo »

CMDB is a configuration management database. It is used to store info an Hardware, Software, Contracts etc
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
inet
Znuny newbie
Posts: 11
Joined: 20 Feb 2012, 10:32
Znuny Version: OTRS31
Real Name: INTERNET AG
Company: INTERNET AG

Re: SystemMonitoring (Nagios integration): Could not find an

Post by inet »

hey,

I now checked, and indeed we have installed ITSM. The hostname in error messages above is correct and set as 'Host' by SystemMonitor.

We got additional errors in the meantime. Everytime OTRS tries to acknowledge a problem in nagios, we get the following:

Code: Select all

Tue Feb 28 14:00:02 2012 	error 	OTRS-otrs.PostMasterMailbox.pl-30 	Need HistoryTypeID!
Tue Feb 28 14:00:02 2012 	error 	OTRS-otrs.PostMasterMailbox.pl-30 	No TypeID for TicketDynamicFieldUpdate found!
Tue Feb 28 14:00:02 2012 	error 	OTRS-otrs.PostMasterMailbox.pl-30 	Need HistoryTypeID!
Tue Feb 28 14:00:02 2012 	error 	OTRS-otrs.PostMasterMailbox.pl-30 	No TypeID for TicketDynamicFieldUpdate found!
Locked