While network monitoring systems are great, it's also a pain to have a monitoring system and a separate ticketing system, so I've decided to integrate my monitoring system with ticketing.
At the moment, I'm using Eventum for ticketing and Nagios for monitoring, though I'm currently doing a Comparison of Network Monitoring Systems in the hopes of trying something that's easier to update and has more features.
The general idea is to have tickets opened or updated based on actions in the network monitoring system. The "glue" that I'm writing will probably be written in PHP, the native language of Eventum, to make use of the Eventum classes. The basic idea is that when an action happens in Nagios (problem alert, recovery alert, acknowledgment, etc.) a ticket will be updated or created in Eventum. I'd like to write this in a highly-customizable fashion so that other sites can make use of it. My "glue" script will be triggered by a Nagios notification script (which will pass it some information), and will then use the Eventum classes (hopefully) to act on its' data.
The basic idea is that Nagios will pass the script some information on the host, service, status, plugin output, etc. (as well as the user if the action is an acknowledgment). The script will maintain a database of open issues generated by Nagios, as well as a mapping of hostnames/servicenames to projects, users, groups, categories, etc. It should all be customizable, but for my use, it will work something like:
- For a problem, it will consult its' own database to see if it already has opened a ticket for that host/service. If so, it will check the Eventum DB to see if that ticket is still open. If so, it will append a note to the text of the ticket, and perhaps update the category and/or priority. If not, it will open a new one.
- For a resolved/UP notification, it will update the text of the ticket, and possibly lower the priority.
- For an acknowledgment, it will change the category to appropriately reflect this, as well as possibly assigning the issue to the user that acknowledged it.
Also, for my own purposes, Eventum won't send out any notifications for this, since Nagios is already sending out voluminous emails.
The script will maintain a database that will map hosts and services to specific projects, priorities, initial categories, initial users/groups, etc.
Thanks to the Xdebug extension for PHP, which prints full debugging information including stack and function call traces, I've been able to get something working using the existing, unmodified Eventum classes. The only modification that I made was including a separate copy of my original
init.php file, with a few lines commented out.
Current Project Status
At the moment, I'm working on a standalone CLI-based PHP script.
At this point, I can:
- Query information on issues and other Eventum objects
- Create new issues (but it's emailing an address for the system user, which I should get rid of).
- Assign issues to users
- Update custom fields
- Update description of issue
Still to go:
- Fix duplicate emails - figure out how to not send email at all?
- Add to issue history
- Update categories
- Update priority
- Add a group
- Update status?
You can follow my progress on my Blog.
You can access the current (development, possibly broken) code through ViewVC.