HI folks and firstly thanks for the replies! OK so I should say we have
implemented some changes which have resolved this issue in our install. I
am not entirely sure anymore if this is a bug or a problem with OTRS,
rather I am starting to think that the regex needs to be adjusted to suit
each environment. Anyway by way of explanation here is what we did. Our
systems are all placed in our nagios instance using the FQDN for the host
name. These host names involve using characters such as - and . as well as
numbers and letters.

>From looking at the httpd logs on the sever I knew that there was a
carriage return being inserted into the URL string and this is why the
acknowledgement command wasn't working, so I figured I needed a way to
strip out the carriage return from the URL string. So I started to look at
the regex in the sysconfig (SystemMonitoring -> Core::PostMaster). Since
posting to the list initially I had come across the following site
http://www.dippelschisser.de/2011/12/24/otrs-systemmonitoring-modul-zur-anbindung-von-nagios/
which seemed to have the same issue. Running it through google translate
gave me a rough solution to amend the regex expression. This pointed me in
the right direction, the change recommended on the site didn't work for me
thanks to the characters we use in fqdns. So I used http://www.regexpal.com/
to come up with a regex which would be able to pull the hostname from the
nagios alert ticket without the trailing characters.

The result is a working acknowledgement in the nagios tickets, I am not
sure if you would put this down as a fix, a hack or something else but
whatever you want to call it we have it working for our environment. We
ended up with a regex of \s*Host:\s+([\w-\. \* \\\. \* \\]*)\s* - Please
keep in mind when looking at the regex I am no programmer! As a bonus we
also got the CI status updateworking in the CMDB, turns out it was also
having the trailing space issue.

Thanks again for the replies


On 20 November 2015 at 20:29, LQ Marshall <qmarsh...@inetspace.net> wrote:

> John - Welcome back. Haven't seen anyone respond to this one so thought is
> share my half cent . The %0F is encoded carriage return  (ran into this
> with a client a while back). Id guess that it's it in the script my
> mistake. Rewrite the line from scratch and save the file. Don't remember
> exactly where/which but should be under the etc folder, somewhere.
>
> L. Marshall
>
>
> -------- Original message --------
> From: John O'Neill <john.oneill...@gmail.com>
> Date: 11/20/2015 07:19 (GMT-05:00)
> To: otrs@otrs.org
> Subject: [otrs] System Monitoring Acknowledgement Characters - %0D
>
>
> Hi All,
>
>
> Firstly forgive me if this has been asked already, I have looked around
> but cant seem to find a conclusive answer to the question, I am coming back
> to OTRS after some years out so I may as well be a noob. We have OTRS up
> and running and Nagios is sending in alerts and clearing them down when
> they issue resolves in Nagios so all is well on that front. The problem we
> have is that when we lock the ticket it is supposed to send an
> acknowledgement to Nagios, - I can see this in the Nagios logs but the
> problem is that we are seeing some characters inserted after the hostname
> which is stoping the command executing, it looks like the following
>
>
> /nagios/cgi-bin/cmd.cgi?cmd_typ=33&cmd_mod=2&host=rimdub-dummy-03.rim.local%0D
>
> I cannot for the life of me figure out where the %0D is coming from, if
> anyone out there has seen this before I would really appreciate a pointer
> on how to get around this issue
>
>
> Many thanks,
> John
>
> ---------------------------------------------------------------------
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to