JIRA monitoring with Nagios

Stéphane Genin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2012

Hello,

Our IT wants to integrate JIRA in their Nagios monitoring system.

Does anyone have some experience in this?

Thanks

Stéphane

4 answers

1 accepted

5 votes
Answer accepted
pdeaudney-atlassian May 25, 2012

Hi Stéphane,

We use a few Nagios checks:

  1. check_http against our Tomcat HTTP connector or reverse proxy (status code returned, short time out etc).
  2. check_load of the sytem (significant load can indicate that GC is starting to become a problem).
  3. If you only have one Java process running on your system you can use check_procs to ensure the java process is running.

Don't forget to monitor your database and ensure it can service connections too.

We also use http://newrelic.com/ with their javaagent loaded into our Tomcat containers to report on application specific performance & JVM GC status. This can also give us information regarding time spent fetching external resources or waiting on database queries.

If you are not willing or can not use newrelic, you might want to consider using JMX & custom scripts from the nagios exchange that can report on various JVM health metric into nagios.

Alertnatively you could configure your JVM to expose a SNMP service and use nagios & check_snmp to monitor various details from the JVM (we used to do this before we started using newrelic).

This guide details how to configure the JVM to expose the snmp service. This blog has some more details that should be useful, it covers some OIDs for various JVM health stats.

I hope this helps.

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2012

Thanks for the SNMP part! Still the guide is so long that it made me postpone it's implementation.

0 votes
Russell Howe August 23, 2012

I am adding Nagios checks to our Atlassian toolset installation.

Starting with Crowd, I added a "Generic Application" to "Applications" called nagios_<hostname> where <hostname> was the hostname of my Nagios server and set a password.

Then the following Nagios configuration:

define service {
 use generic-service
 host_name my-crowd-server
 service_description Crowd login page
 check_command check_http_vhost_url_want_200!crowd.example.com!/crowd/console/login.action
}

define service {
 use generic-service
 host_name my-crowd-server
 service_description Crowd 'username' user
 check_command check_crowd_user!crowd.example.com!username!username@example.com
}

define servicedependency {
 host_name my-crowd-server
 service_description Crowd login page
 dependent_service_description Crowd 'username' user
 execution_failure_criteria c,w
 notification_failure_criteria c,w,u
}

define command {
        command_name    check_http_vhost_url_want_200
        command_line    $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -e 200
}

# check_crowd_user

# Checks that a user can be found by crowd
# Arguments:
# 1 Crowd vhost
# 2 Username
# 3 Text to match in the result (e.g. email address)

define command {
 command_name check_crowd_user
 command_line $USER1$/check_http -H $ARG1$ -I $HOSTADDRESS$ -a $USER25$:$USER26$ -u "/crowd/rest/usermanagement/1/user?username=$ARG2$" -s $ARG3$
}


private/resource.cfg
# Credentials for Crowd
$USER25$=&lt;nagios_application_name_in_crowd&gt;
$USER26$=&lt;password&gt;

0 votes
Russell Howe August 23, 2012

I am adding Nagios checks to our Atlassian toolset installation.

Starting with Crowd, I added a "Generic Application" to "Applications" called nagios_<hostname> where <hostname> was the hostname of my Nagios server and set a password.

Then the following Nagios configuration:

define service {
 use generic-service
 host_name my-crowd-server
 service_description Crowd login page
 check_command check_http_vhost_url_want_200!crowd.example.com!/crowd/console/login.action
}

define service {
 use generic-service
 host_name my-crowd-server
 service_description Crowd 'username' user
 check_command check_crowd_user!crowd.example.com!username!username@example.com
}

define servicedependency {
 host_name my-crowd-server
 service_description Crowd login page
 dependent_service_description Crowd 'username' user
 execution_failure_criteria c,w
 notification_failure_criteria c,w,u
}

define command {
        command_name    check_http_vhost_url_want_200
        command_line    $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -e 200
}

# check_crowd_user

# Checks that a user can be found by crowd
# Arguments:
# 1 Crowd vhost
# 2 Username
# 3 Text to match in the result (e.g. email address)

define command {
 command_name check_crowd_user
 command_line $USER1$/check_http -H $ARG1$ -I $HOSTADDRESS$ -a $USER25$:$USER26$ -u "/crowd/rest/usermanagement/1/user?username=$ARG2$" -s $ARG3$
}


private/resource.cfg
# Credentials for Crowd
$USER25$=&lt;nagios_application_name_in_crowd&gt;
$USER26$=&lt;password&gt;




0 votes
pdeaudney-atlassian May 24, 2012

Hi Stéphane,

Can you elaborate on exactly what type of integration you're after?

Do you want alert emails delivered to jira to create issues for faults or problems reported by Nagios?

Or do you want to monitor jira with Nagios?

Stéphane Genin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2012

Hi Paul,

Sorry, I was not very clear.

We want to monitor JIRA with Nagios. The IT department has no experience in monitoring Java/J2EE applications.

I think the most important would be to monitor the CPU usage, and the memory (mainly the heap memory usage). It would also be cool to be able to send an http request on the login page just to see if it is displayed properly.

Thanks

Stéphane

Suggest an answer

Log in or Sign up to answer