Nagios integration

Moderator: crythias

Locked
fuhdan
Znuny newbie
Posts: 4
Joined: 11 Jun 2010, 14:43
Znuny Version: 3.0.8
Real Name: Daniel

Nagios integration

Post by fuhdan »

Hi all
The acknowledge is not working. I configured to use the URL. I can't find an error in the log. In the log is anything about the acknowledge.

Here the ZZZAuto.pm

Code: Select all

# OTRS config file (automatically generated)
# VERSION:1.1
package Kernel::Config::Files::ZZZAuto;
use utf8;
sub Load {
    my ($File, $Self) = @_;
$Self->{'Nagios::Acknowledge::HTTP::Password'} =  '***';
$Self->{'Nagios::Acknowledge::HTTP::User'} =  '***';
$Self->{'Nagios::Acknowledge::HTTP::URL'} =  'https://***/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->{'Nagios::Acknowledge::Type'} =  'http';
$Self->{'Nagios::Acknowledge::FreeField::Service'} =  'We are working on it';
$Self->{'Nagios::Acknowledge::FreeField::Host'} =  'We are working on it';
$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' => '***',
  '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+)'
};
delete $Self->{'PreferencesGroups'}->{'SpellDict'};
$Self->{'NotificationSenderEmail'} =  '***';
$Self->{'SendmailModule::Port'} =  '25';
$Self->{'SendmailModule::Host'} =  '***';
$Self->{'SendmailModule'} =  'Kernel::System::Email::SMTP';
$Self->{'LogModule::LogFile'} =  '/var/log/otrs.log';
$Self->{'LogModule'} =  'Kernel::System::Log::File';
$Self->{'DefaultLanguage'} =  'de';
$Self->{'Organization'} =  '';
$Self->{'AdminEmail'} =  '***';
$Self->{'FQDN'} =  '***';
$Self->{'SecureMode'} =  1;
}
1;

Here the Log:

Code: Select all

[Thu Jun 23 10:34:01 2011][Notice][Kernel::System::MailAccount::POP3S::_Fetch] POP3S: Fetched 1 email(s) from otrs/***.
, State: CRITICAL, Service: Test OTRSrnel::System::PostMaster::Filter::SystemMonitoring::Run] SystemMonitoring Mail: New Ticket - Host: Ticket System
[Thu Jun 23 10:36:01 2011][Notice][Kernel::System::Ticket::TicketCreate] New Ticket [2011062310000166/** PROBLEM Serv] created (TicketID=17,Queue=Raw,Priority=3 normal,State=new)
[Thu Jun 23 10:36:01 2011][Notice][Kernel::System::MailAccount::POP3S::_Fetch] POP3S: Fetched 1 email(s) from otrs/***.
, State: CRITICAL, Service: Test OTRSrnel::System::PostMaster::Filter::SystemMonitoring::Run] SystemMonitoring Mail: New Notice - Host: Ticket System
[Thu Jun 23 10:46:00 2011][Notice][Kernel::System::PostMaster::FollowUp::Run] FollowUp Article to Ticket [2011062310000166] created (TicketID=17, ArticleID=35). ,
[Thu Jun 23 10:46:00 2011][Notice][Kernel::System::MailAccount::POP3S::_Fetch] POP3S: Fetched 1 email(s) from otrs/***.
, State: OK, Service: Test OTRSce][Kernel::System::PostMaster::Filter::SystemMonitoring::Run] SystemMonitoring Mail: Recovered - Host: Ticket System
[Thu Jun 23 10:48:01 2011][Notice][Kernel::System::PostMaster::FollowUp::Run] FollowUp Article to Ticket [2011062310000166] created (TicketID=17, ArticleID=36). ,
[Thu Jun 23 10:48:01 2011][Notice][Kernel::System::MailAccount::POP3S::_Fetch] POP3S: Fetched 1 email(s) from otrs/***.
System Details:
Nagios® Core Version 3.2.3 on FreeBSD 8.2 with Apache/2.2.19, sendmail 8.14.4
OTRS 3.0.8 on FreeBSD 8.2 with Apache/2.2.19, sendmail 8.14.4, iPhoneHandle V1.0.2, SystemMonitoring V2.2.1
Both systems are using sendmail as the MTA. OTRS gets the mails from an Exchange 2010 Server.

Any Ideas?
The opening and closing of the Tickets is working fine as you can see in the logs.

Thanks for your answers
OTRS: OTRS 3.0.8
OTRS Modules: iPhoneHandle V1.0.2, SystemMonitoring V2.2.1
OS: FreeBSD 8.2
Webserver: Apache/2.2.19
MTA: sendmail 8.14.4
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: Nagios integration

Post by Wolfgangf »

you are surely aware, the ack tackes place once you lock the ticket in OTRS because this is bound to an event?!
Have you tried this?
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
fuhdan
Znuny newbie
Posts: 4
Joined: 11 Jun 2010, 14:43
Znuny Version: 3.0.8
Real Name: Daniel

Re: Nagios integration

Post by fuhdan »

So if I understand you right, I have to lock the Ticket first, bevore a acknoelede ist set?
I tried it. But I get nothing in the log. Also the Ack is not set ...
Is there somwhere a setting, when the ack is sent?
OTRS: OTRS 3.0.8
OTRS Modules: iPhoneHandle V1.0.2, SystemMonitoring V2.2.1
OS: FreeBSD 8.2
Webserver: Apache/2.2.19
MTA: sendmail 8.14.4
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: Nagios integration

Post by Wolfgangf »

yes - ticket needs to go from new to open, acknowledging is fired as event

no entry on otrs and nagios log?
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
fuhdan
Znuny newbie
Posts: 4
Joined: 11 Jun 2010, 14:43
Znuny Version: 3.0.8
Real Name: Daniel

Re: Nagios integration

Post by fuhdan »

Yes it looks like.
I moved the Ticket to an other que and set the status to open. But nothing happens (At least no log entry in OTRS or Nagios).

How do I have to set the status to open?
OTRS: OTRS 3.0.8
OTRS Modules: iPhoneHandle V1.0.2, SystemMonitoring V2.2.1
OS: FreeBSD 8.2
Webserver: Apache/2.2.19
MTA: sendmail 8.14.4
marcopgordillo
Znuny newbie
Posts: 1
Joined: 26 Apr 2013, 13:11
Znuny Version: 3.2.6-01
Real Name: Marco Gordillo
Company: Tuxnet

Re: Nagios integration

Post by marcopgordillo »

Please i have the same problem, i test this change from new to open state and the acknowlege never is sent.

In the file /opt/otrs/Kernel/System/Ticket/Event/NagiosAcknowledge.pm v1.13

The following lines escape from the rest of lines, i think that the dinamic fields TicketFreeText don't exists when the event new to open occurs:

my %Ticket = $Self->{TicketObject}->TicketGet(
TicketID => $Param{Data}->{TicketID},
DynamicFields => 1,
);
if ( !$Ticket{ $Self->{Fhost} } ) {
$Self->{LogObject}->Log( Priority => 'error', Message => "No Nagios Ticket!" );
return 1;
}

Helpme please i have a lot messages of nagios without a acknowledge.

Thanks

Best Regards,

Marco
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Nagios integration

Post by reneeb »

Go to SysConfig and prepend "DynamicField_" to the config options that belong to NagiosIntegration...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
santoshsaripelli1
Znuny newbie
Posts: 17
Joined: 11 Aug 2015, 13:44
Znuny Version: 3.x.x
Real Name: Santosh
Company: L&T Infotech

Re: Nagios integration

Post by santoshsaripelli1 »

Hello All,

I need to create an Incident in OTRS via email, when the Nagios sent the critical alert. Nagios integration has been complete. Please suggest what configuration i need to do.

Waiting for reply.

Regards,
Santosh
Locked