nagios config for mirrorlist monitoring
Chuck Anderson
cra at WPI.EDU
Fri Feb 8 16:13:24 UTC 2008
I thought people here might be interested in my nagios config for
checking the output of the mirrorlist CGI.
----- Forwarded message from Chuck Anderson <cra at WPI.EDU> -----
From: Chuck Anderson <cra at WPI.EDU>
To: mirror-list-d at redhat.com
Date: Fri, 8 Feb 2008 01:43:44 -0500
Subject: netblock mirror not showing up for Fedora 8
On Thu, Feb 07, 2008 at 10:13:15PM -0600, Matt Domsch wrote:
> The MM hourly refresh had been taking >12 hours due to database
> slowness, which _hopefully_ now is resolved. Will watch it closely
> over the next few days.
>
> I'll have to regen the pages manually right now. The cronjobs seem to
> still be disabled even though they should have restarted by now...
My netblock mirror still isn't showing up for just the Fedora 8
updates and updates-testing repos, all archs. Everything else is
coming up fine (Fedora 7 updates, Fedora 7 updates-testing, Rawhide,
Fedora 7 and 8 base releases).
These are the "bad" queries that don't return my netblock mirror:
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=i386
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=x86_64
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=ppc
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=ppc64
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f8&arch=i386
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f8&arch=x86_64
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f8&arch=ppc
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f8&arch=ppc64
I wrote a bit of nagios configuration that checks the mirrorlist
results. Here are the checkcommands.cfg definitions:
# 'check_fedora_mirrorlist' command definition
#
# Checks Fedora Project's mirrorlist redirector for a specific mirror
# URL.
#
define command {
command_name check_fedora_mirrorlist
command_line $USER1$/check_http -H $HOSTADDRESS$ -u '/mirrorlist?repo=$ARG1$&arch=$ARG2$' -l -R '^$ARG3$'
}
# 'check_fedora_mirrorlist_netblock' command definition
#
# Checks Fedora Project's mirrorlist redirector for a specific mirror
# URL using a preferred netblock entry. Ideally, this would check for
# the URL as the immediate next line after "Using preferred netblock"
# but I couldn't figure out how to embed a newline in the regex in the
# nagios config file.
#
define command {
command_name check_fedora_mirrorlist_netblock
command_line $USER1$/check_http -H $HOSTADDRESS$ -u '/mirrorlist?repo=$ARG1$&arch=$ARG2$' -l -R 'Using preferred netblock.*$ARG3$'
}
And here is how you use it in the hosts.cfg file (netblock check):
#
# Fedora mirrorlist service
#
define host {
host_name mirrors.fedoraproject.org
parents internet
use generic-host
alias mirrors.fedoraproject.org
address mirrors.fedoraproject.org
}
#
# Fedora 8 updates-released
#
define service {
host_name mirrors.fedoraproject.org
use generic-service
service_description updates-released-f8 i386
check_command check_fedora_mirrorlist_netblock!updates-released-f8!i386!http://download.wpi.edu/pub/fedora/linux/updates/8/i386
}
--
----- End forwarded message -----
More information about the Fedora-infrastructure-list
mailing list