Automatically create bugs in Jira with a Nagios eventhandler

The most important part about this is ….dont use it too often, but it CAN make sense on really critical events, like warnings/criticals on partitionspace. For instance, if your mysql server is running out of space on /var/lib/mysql and your operationsteam didnt see the WARNING/CRITICAL notification from Nagios, it might be a good idea to have the bug created in Jira to make it even more visible.

Here’s how you do it.
First of all, be sure to have eventhandlers enabled in Nagios.

Configure your commands.cfg file to have something similar to this :

define command{
command_name jira_eventhandler
command_line $USER1$/jira_eventhandler -a morten -s $SERVICESTATE$ -t $SERVICESTATETYPE$ -A $SERVICEATTEMPT$ -H $HOSTNAME$ -S $SERVICEDESC$
}

Configure your services.cfg to have something similar to this :
define service{
use generic-service
host_name myhost
service_description CHECK_DISK_ROOT
is_volatile 0
max_check_attempts 3
normal_check_interval 10
retry_check_interval 1
contact_groups linux-admins
notification_period 24x7
notification_options c,w,r
check_command check_remote_disk_nagios!10%!5%!/
process_perf_data 1
event_handler jira_eventhandler
flap_detection_enabled 0
}

And be sure to have the jira_eventhandler script in place. You can download mine here : jira_eventhandler

Be Sociable, Share!

Tags: , , ,

4 Responses to “Automatically create bugs in Jira with a Nagios eventhandler”

  1. Charles Says:

    Hi,

    I am wondering, where did you obtain the JIRA::Client module from? I could really use this for a number of other projects (this included)

  2. morten Says:

    Hi Charles.

    The JIRA::Client module is available on cpan.org

    Morten

  3. VanitaExugei Says:

    I see your blog needs some fresh articles. Writing manually is time consuming, but there is solution for
    this hard task. Just search for; Miftolo’s tools rewriter

  4. FirstZelda Says:

    I see you don’t monetize your website, don’t waste
    your traffic, you can earn extra bucks every
    month because you’ve got high quality content. If you
    want to know how to make extra bucks, search for: Boorfe’s
    tips best adsense alternative

Leave a Reply