
Hello, we are using nagios for system monitoring in our company. As we also use OTRS, I thought it would be a nice thing to make the tools work together. Two perl-scripts and a bit of configuration was all that was needed. The integration works as follows: When NAGIOS notices a host or service problem it starts a perl-script that sends an Email to OTRS. A Tickets is created by OTRS after recieving the message. When the problem still exists after some time, NAGIOS calls the script again. This time the script does not send an email to OTRS, but calls a modified copy of GenericAgent (over SSH) to add a note to the existing Ticket. When the problem has vanished NAGIOS calls the script again, which then closes the ticket the same way. I tried to make the scripts as independent of the OTRS-version as possible, but as I use a modified copy of the GenericAgent.pl there is problably the need to do some minor adjustments to this perl-script when using a different version of OTRS than 1.2.2. Is there a way to create dynamic jobs (created from commandline parameters) for GenericAgent? Then i could make it completely independend from the OTRS Version. Is anyone interested in the scripts (incl. installation-howto)? Is there a place on the otrs-page where people can make there code available to others? I saw that the wiki was closed... -- Volker Maibaum Tel: 0711-939-0972 Fax: 0711-939-160972 volker.maibaum@eberspaecher.com

Hi Volker, Volker Maibaum wrote:
we are using nagios for system monitoring in our company. As we also use OTRS, I thought it would be a nice thing to make the tools work together. Two perl-scripts and a bit of configuration was all that was needed. [...]
I saw your scripts. Excelent! :)
I tried to make the scripts as independent of the OTRS-version as possible, but as I use a modified copy of the GenericAgent.pl there is problably the need to do some minor adjustments to this perl-script when using a different version of OTRS than 1.2.2.
Is there a way to create dynamic jobs (created from commandline parameters) for GenericAgent? Then i could make it completely independend from the OTRS Version.
No, this is not possible. But I do have a other idea. IMO it would be better to create a postmaster filter module to do also monitoring followup actions. This means no ssh is used, just email. So Nagios send also followup messages and the postmaster filter will do the e. g. close action. I started to write the filter. Can you send me examples how to execute otrs_ticket_handler.pl to send ne problems and solved emails? So I can test the postmaster filter if it's working. Thanks for your help! :)
Is there a place on the otrs-page where people can make there code available to others? I saw that the wiki was closed...
Yes. http://faq.otrs.org/. But you need to send the infos to us and we will add it. Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

Good Morning Martin, If it would be possible to use postmaster-filter, that would be great! How do you want to do that? How can the postmaster find the corresponding ticket to a "follow-up notification" of nagios? I thought postmaster filter can only be used for sorting Emails into Queues, setting priority, etc... otrs_ticket_handler.pl is executed as follows: 1) Nagios notices a service problem: ./otrs_ticket_handler.pl -H testhost -S testservice -s CRITICAL -T s -N PROBLEM -n 1 -C nagios-queue -o "this is the output of the check" --> email is send to the otrs-system 2) Nagios notices that the problem still exists (n=2) ./otrs_ticket_handler.pl -H testhost -S testservice -s CRITICAL -T s -N PROBLEM -n 2 -C nagios-queue -o "this is the output of the check" --> NagiosGenericAgent is executed over ssh (with similar comandline args and -c 0 for adding a note) 3) Nagios notices that the problem has been solved (N=RECOVERY) ./otrs_ticket_handler.pl -H testhost -S testservice -s CRITICAL -T s -N RECOVERY -n 2 -C nagios-queue -o "this is the output of the check" --> NagiosGenericAgent is executed over ssh (with similar comandline args and -c 1 for closing the ticket) As there were some errors in the scripts I posted yesterday, I attach the corrected versions in this post (but it might still be buggy). Volker Am Freitag, den 14.01.2005, 06:53 +0100 schrieb Martin Edenhofer:
Hi Volker,
Volker Maibaum wrote:
we are using nagios for system monitoring in our company. As we also use OTRS, I thought it would be a nice thing to make the tools work together. Two perl-scripts and a bit of configuration was all that was needed. [...]
I saw your scripts. Excelent! :)
I tried to make the scripts as independent of the OTRS-version as possible, but as I use a modified copy of the GenericAgent.pl there is problably the need to do some minor adjustments to this perl-script when using a different version of OTRS than 1.2.2.
Is there a way to create dynamic jobs (created from commandline parameters) for GenericAgent? Then i could make it completely independend from the OTRS Version.
No, this is not possible. But I do have a other idea.
IMO it would be better to create a postmaster filter module to do also monitoring followup actions. This means no ssh is used, just email.
So Nagios send also followup messages and the postmaster filter will do the e. g. close action.
I started to write the filter. Can you send me examples how to execute otrs_ticket_handler.pl to send ne problems and solved emails?
So I can test the postmaster filter if it's working.
Thanks for your help! :)
Is there a place on the otrs-page where people can make there code available to others? I saw that the wiki was closed...
Yes. http://faq.otrs.org/. But you need to send the infos to us and we will add it.
Martin Edenhofer
-- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
-- mit freundlichen Grüßen Volker Maibaum Tel: 0711-939-0972 Fax: 0711-939-160972 volker.maibaum@eberspaecher.com
participants (2)
-
Martin Edenhofer
-
Volker Maibaum