[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Handle-info] nagios or other check to test resolvability of handles?



Hi,

This is exactly what we would like to do. We thought ourselves about following test:
  • retrieve ip addresses and ports of 0.NA/<prefix> for one handle
  • loop over all ip addresses and ports and try to resolve: <prefix>/<predefined_handle>
Can we have the jar file so we could use it ourselves?
Do we need to run the java jar on a system which has the handle software installed? Or is it independent of some handle library functions?

We use icinga2, but the basics for nagios and icinga2 are the same. So implementing the check should not be a problem for us once we have the jar file.

Greetings,

Robert Verkerk





On 12 Dec 2014, at 17:19, Robert R Tupelo-Schneck <schneck@cnri.reston.va.us> wrote:

We wrote our own Nagios check to do this.  The way we use Nagios is a little unusual... we are letting one Nagios "service" correspond to all sites in a handle service.

The Nagios configuration looks like this:

define service {
       name                            handle-service
       use                             local-service
       host_name                       HandleSystem
       retry_interval                  2
       max_check_attempts               5
       contact_groups                  handle
       check_command                   check_service_handle
       register                        0
}

define service{
       use                             handle-service
       service_description             0.NA/0.NA
}

define command {
   command_name check_service_handle
   command_line $USER1$/check_service_handle $SERVICEDESC$
}

And check_service_handle is just a shell script that calls a Java program which does the check:
#!/bin/bash
/usr/bin/java -jar /usr/local/nagios/libexec/nagios-test-service-plugin.jar "$@"

We use the "service_description" to hold a handle.  The check-command resolves that handle, finds each site, and calls each port of each server and each site.

It is possible that CNRI could share our Java monitoring code.  Let me know if you are interested.  Meanwhile, the above should get you started if you just want to write your own.

Robert

On 2014-12-12, at 03:06 , Robert Verkerk <robert.verkerk@surfsara.nl> wrote:

Hi,

We have a master handle system with 2 mirrors (1 internal and 1 external). So we have 3 handle instances with TCP and/or UDP and/or http ports.
We have a standard handle, say: <prefix>/HEALTHCHECK

Is there a nagios or other check to test the resolvability of the specified handle via all handle instances and all ports for each instance?
Testing it by hand is very cumbersome and not do-able if you want to test it each day. We have about 20+ prefixes running in 3 master handle instances.

Greetings,

Robert Verkerk




-- 
Met vriendelijke groet,

Robert Verkerk
systeem programmeur
Data Services

SURFsara heeft een nieuw algemeen telefoonnummer: 020 800 1300

Robert Verkerk
| Dataservices | SURFsara | Science Park 140 | 1098 XG Amsterdam | T +31 (0)20 8001318 | robert.verkerk@surfsara.nl | www.surfsara.nl



Attachment: smime.p7s
Description: S/MIME cryptographic signature