JIRA monitoring with Nagios

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

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.

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

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?

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

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;




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;

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

444 views 7 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you