Nagios Acknowledge Intergeration

Moderator: crythias

Post Reply
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Nagios Acknowledge Intergeration

Post by pradeepspa »

Folks,

I have installed OTRS 5.0.18 and getting tickets from Nagios with no issues. Now I am trying to integrate Acknowledgement feature using system monitoring.I have attached my config.

When I try to ack from OTRS (adding note) I get his below,

Could someone shed light on where I am missing please?
You do not have the required permissions to view the files attached to this post.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Nagios Acknowledge Intergeration

Post by jojo »

The acknowledge is triggered by locking the Ticket Not adding a note. Please also Check the nagios logs
"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
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Nagios Acknowledge Intergeration

Post by pradeepspa »

Thanks for responding. The reason why I use note to acknowledge is, we have otrs 3.0.5 which acknowledge the ticket when I add any text to the note. Also I see these field in OTRS 3.0.5 when adding note which I dont see in OTRS5. I think I got confused with two different plugin?
You do not have the required permissions to view the files attached to this post.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Nagios Acknowledge Intergeration

Post by jojo »

Soory, 3.0.x is way to old to give you any support. Please migrate (including the sysconfig) to OTRS 5
"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
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Nagios Acknowledge Intergeration

Post by pradeepspa »

Thats what I am trying. I have installed OTRS5 and migrated necessary config. This acknowledgement feature is left on OTRS 5.I have already attached my sysconfig from OTRS5. Adding it here as well.
You do not have the required permissions to view the files attached to this post.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Nagios Acknowledge Intergeration

Post by jojo »

What happens if you lock the ticket?
Is there anything in the OTRS log (switch to debug level first)
is there anything in the Nagios log
Can you reach the Nagios server from the OTRS server
"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
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Nagios Acknowledge Intergeration

Post by pradeepspa »

When I try locking the ticket, i get this error,
May 30 14:29:07 test-otrs OTRS-CGI-06[39226]: [Error][Kernel::System::Ticket::Event::NagiosAcknowledge::_HTTP][Line:263]: Can't request http://nms.bxi.lan/nagios/cgi-bin/cmd.c ... mit=Commit: 500 read timeout
I could reach nagios server from OTRS (tried ping and telnet to port 80)
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Nagios Acknowledge Intergeration

Post by root »

Hi,

I woud try to open the url from the otrs server's shell with curl, maybe additional information is shown.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Nagios Acknowledge Intergeration

Post by pradeepspa »

Thanks for your response. When I did curl call from otrs, it looks like credentials issue. I am not sure where it is getting credentials from.
[root@test-otrs ~]# curl -v http://xxxxxx/nagios/cgi-bin/cmd.cgi?cm ... mit=Commit
[1] 5939
[2] 5940
[3] 5941
[4] 5942
[5] 5943
[6] 5944
[7] 5945
[8] 5946
[2] Done cmd_mod=2
[3] Done host=Zabbix
[4] Done service=SysConntracker
[5] Done sticky_ack=on
[6] Done send_notification=on
[7]- Done persistent=on
[root@test-otrs ~]# * About to connect() to nms.bxi.lan port 80 (#0)
* Trying xxxxxx...
* Connected to hostname (xxxxxxx) port 80 (#0)
> GET /nagios/cgi-bin/cmd.cgi?cmd_typ=34 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: hostname
> Accept: */*
>
< HTTP/1.1 401 Authorization Required
< Date: Tue, 30 May 2017 17:00:29 GMT
< Server: Apache/2.2.15 (CentOS)
< WWW-Authenticate: Basic realm="Nagios Access - Use domain login"
< Content-Length: 478
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at hostnamePort 80</address>
</body></html>
* Closing connection 0

[1]- Done curl -v http://hostanme/nagios/cgi-bin/cmd.cgi?cmd_typ=34
[8]+ Done com_data=2017053006000562
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Nagios Acknowledge Intergeration

Post by root »

pass the credentials like curl -u username:password http://example.com and enclose your URL with '
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Nagios Acknowledge Intergeration

Post by pradeepspa »

Giving credential in curl call, it passes through.
[root@test-otrs ~]# curl -u Ack_By_OTRS:superguys -v http://hostname/nagios/cgi-bin/cmd.cgi? ... mit=Commit
[1] 8058
[2] 8059
[3] 8060
[4] 8061
[5] 8062
[6] 8063
[7] 8064
[8] 8065
[2] Done cmd_mod=2
[3] Done host=Zabbix
[4] Done service=SysConntracker
[5] Done sticky_ack=on
[6] Done send_notification=on
[7]- Done persistent=on
[root@test-otrs ~]# * About to connect() to hostname port 80 (#0)
* Trying IP...
* Connected to hostname (IP) port 80 (#0)
* Server auth using Basic with user 'Ack_By_OTRS'
> GET /nagios/cgi-bin/cmd.cgi?cmd_typ=34 HTTP/1.1
> Authorization: Basic QWNrX0J5X09UUlM6c3VwZXJndXlz
> User-Agent: curl/7.29.0
> Host: hostname
> Accept: */*
>

I was using the same credentials on sysconfig and not working there.
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Nagios Acknowledge Intergeration

Post by pradeepspa »

I found it's not acknowledging for a specific host. Checked with other and it works. At this point, could someone tell will acknowledge expects any specific parameters from host/service configuration?
Post Reply