Page 1 of 4
System Monitoring OTRS/NAGIOS
Posted: Thu Jan 14, 2016 10:13 am
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.
Re: System Monitoring OTRS/NAGIOS
Posted: Thu Jan 14, 2016 10:52 am
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 -
Re: System Monitoring OTRS/NAGIOS
Posted: Thu Jan 14, 2016 11:13 am
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
Re: System Monitoring OTRS/NAGIOS
Posted: Thu Jan 14, 2016 4:23 pm
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.
Re: System Monitoring OTRS/NAGIOS
Posted: Fri Jan 15, 2016 8:27 am
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?
Re: System Monitoring OTRS/NAGIOS
Posted: Fri Jan 15, 2016 10:16 am
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?
Re: System Monitoring OTRS/NAGIOS
Posted: Fri Jan 15, 2016 1:11 pm
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?
Re: System Monitoring OTRS/NAGIOS
Posted: Fri Jan 15, 2016 1:30 pm
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 -
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?
Re: System Monitoring OTRS/NAGIOS
Posted: Fri Jan 15, 2016 2:04 pm
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
Re: System Monitoring OTRS/NAGIOS
Posted: Fri Jan 15, 2016 2:31 pm
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!