System Monitoring OTRS/NAGIOS

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

System Monitoring OTRS/NAGIOS

Post by nathanplatt »

Hi Guys,

I've been trying to integrate Nagios and OTRS for a while now, the forums over at OTRS aren't as good as this one. Does anyone know how to do this? I have system monitor installed and OTRS is receiving the alerts from Nagios.

OTRS 5.0.5
NAGIOS 4.1.1

Thanks for any help you can give.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: System Monitoring OTRS/NAGIOS

Post by bwallace »

Hi,

There are a few options pertaining to Nagios and OTRS here:
https://exchange.nagios.org/index.php?o ... hword=OTRS

Hopefully these will get you on track but if not, please clarify what exact checks/action(s) you are hoping to accomplish, as you say "OTRS is receiving the alerts from Nagios" - thanks -
Be sure to check out the Knowledgebase for helpful articles and solutions!
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: System Monitoring OTRS/NAGIOS

Post by nathanplatt »

Hi,

Basically OTRS advertises an ability with one of its Packages called System Monitoring that allows for Nagios and OTRS to work as a Team. When Nagios creates an alert and emails us (itsupport) i've configured it to send to OTRS as well. If the system works correctly, OTRS should automatically acknowledge the issue and then when Nagios finds the issue resolved, OTRS should close it.

Currently OTRS logs the job but nothing else happens.

Any ideas?

Nathan
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: System Monitoring OTRS/NAGIOS

Post by rkennedy »

When you say that OTRS logs the job, is that from the email firing with Nagios? Just trying to figure out how far in the setup you are.

The plugin here - https://exchange.nagios.org/directory/A ... on/details - looks like it is meant to integrate with OTRS System Monitoring. You will need to setup notifications and event handlers with your checks that correspond to the bash scripts.
Former Nagios Employee
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: System Monitoring OTRS/NAGIOS

Post by nathanplatt »

Right so much more complicated than I thought! Currently otrs is a contact for nagios, so it sends emails to otrs and it logs them, warnings/critical or solution mails. So those cfg files, should i just copy them to relevant places in Nagios?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: System Monitoring OTRS/NAGIOS

Post by rkennedy »

Yeah, it doesn't look like there are very good instructions with this.
- The commands directory contains all of the commands that will be passed.
- The eventhandler directory contains the bash scripts, as you can see here from one of the definitions -

Code: Select all

define command{
   command_name	host-notify-otrs
   command_line	$USER1$/eventhandlers/host_notify_otrs.sh
}
- The objects folder has two .cfg files, one is the contact for OTRS, and the second is for a check_dummy service check which I would use as reference when setting your check up.

This plugin should help finish what you're trying to accomplish. Does your contact definition look similar to the one included?
Former Nagios Employee
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: System Monitoring OTRS/NAGIOS

Post by nathanplatt »

Yeah, i've put all the files in the right place, i've modified one of my services to include the event handler.

Code: Select all

#Monitoring Section#

define service{
        use                     generic-service
        host_name               DR1,DR2,DR3,DR Mail,SQL_DR,AD1,AD3,AD4,TS1,TS1-V,TS2,TS2-V,TS3,TS3-V,TS4,TS4-V,TS5,TS5-V,TS6,TS6-V,TS7,TS7-V,TS8,TS8-V,TS9,TS9-V,TS10,TS10-V,APP1$
        service_description     Check Uptime
        check_command           check_nt!UPTIME
        event_handler           host-notify-otrs
}
If this notifies otrs of a problem what about the Ok, do i have to do anyother server to say its okay?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: System Monitoring OTRS/NAGIOS

Post by rkennedy »

It actually looks like that part is handled by the contact definition -

Code: Select all

define contact{
        contact_name                    otrs
		contactgroups					admins
		use								generic-contact
        alias                           OTRS Ticket System
        email                           otrs@localhost
        service_notification_options    a
        host_notification_options       a
        service_notification_commands   notify-otrs
        host_notification_commands      host-notify-otrs
}
The part in the service definition that I think you may need, is going to be -

Code: Select all

	event_handler	otrs-event-ok
As this is a community plugin - I don't have specific answers on how to get it working exactly. You will still need to setup your host definition accordingly as well.

After trying what I mentioned above, can you catch us up to speed on what's working at this point?
Former Nagios Employee
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: System Monitoring OTRS/NAGIOS

Post by nathanplatt »

Okay i've done this, am off for a week now, but as OTRS is still a test system I should see some interesting results by the end of the week. I'll let you know what happens!

Code: Select all

define service{
        use                     generic-service
        host_name               DR1,DR2,DR3,DR Mail,SQL_DR,AD1,AD3,AD4,TS1,TS1-V,TS2,TS2-V,TS3,TS3-V,TS4,TS4-V,TS5,TS5-V,TS6,TS6-V,TS7,TS7-V,TS8,TS8-V,TS9,TS9-V,TS10,TS10-V,APP$
        service_description     Check Uptime
        check_command           check_nt!UPTIME
        event_handler           otrs-event-ok
}

define contact{
        contact_name                    otrs
        alias                           OTRS
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,r
        service_notification_commands   notify-otrs
        host_notification_commands      host-notify-otrs
        email                           otrs@domain
        }
Eventhandler folder is in the nagios/etc folder, so i can only wait and see what happens
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: System Monitoring OTRS/NAGIOS

Post by rkennedy »

Do you have a contact defined somewhere in your host / service groups? Just to make sure.

I'll leave this post open, let us know your results!
Former Nagios Employee
Locked