Downtime for ALL hosts and services on system?

Nathan Oyler noyler at khimetrics.com
Fri Jul 15 23:09:09 CEST 2005


I wrote this myself, and considering I've been learning perl over the
last few months writing scripts to make nagios a much easier tool to
use, I feel a little worried about submitting anything considering how
new I am at it. :-)

 

I have written scripts to add hosts, remove hosts, schedule downtime, a
few plugins, a script to turn off blocks of checks quickly, make new
services that I commonly add quickly.

 

The nfs mounts script, I ended up using check_by_ssh to call it, I
wanted to verify that all nfs mounts in fstab were mounted, considering
if I put something in fstab, I want it to be up at all times. That's how
I determine if something is important enough to check.

 

So it checks for what's an nfs mount in fstab, then verify's that there
is at least 1 file inside of the mount. 

 

I did this because I wanted to pick up stale instances, and other
messages easily. I had tried a few other methods, but they didn't end up
giving me what I wanted.

 

I'll attach the script, but this was the first perl script I wrote, and
I haven't updated it since then with anything additionally I may know.
It's always worked for me, but if anyone has any suggestions or
pointers, please send them my way.

 

 

________________________________

From: Ben Polson [mailto:ben.polson at ehealth.com] 
Sent: Friday, July 15, 2005 1:53 PM
To: Nathan Oyler; Ginther, Demian M; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Downtime for ALL hosts and services on
system?

 

Excellent points.  I generally don't do maintenance on every single
monitored server so I've set up simple group disabling scripts for
blocks of servers based on our various environments.

 

You mentioned your nfs mount scripts and I am wondering what kind of
tests you run to verify these mounts.  I'm in the process of writing my
own nfs mount check currently, but would prefer to not have to go
through this if there's already one available out there.  Did you write
this yourself, or have I missed something in my Googleing?  Thanks!

 

-Ben.

	-----Original Message-----
	From: Nathan Oyler [mailto:noyler at khimetrics.com]
	Sent: Friday, July 15, 2005 1:46 PM
	To: Ben Polson; Ginther, Demian M;
nagios-users at lists.sourceforge.net
	Subject: RE: [Nagios-users] Downtime for ALL hosts and services
on system?

	Because it's sloppy, and if you schedule downtime you can
actually watch what's happening through nagios as things go up and down,
and verify everything is up during the window.

	 

	I have nfs mount scripts that it's always nice to verify are
actually up before having messages start flying off again. Especially
when people outside of IT get messages.

	 

	I wrote a perl script to schedule downtime. I used a bash script
on nagiosexchange.org to base the idea on, and it's been extremely
helpful for every downtime since.

	 

	 

	
________________________________


	From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Ben
Polson
	Sent: Friday, July 15, 2005 1:36 PM
	To: Ginther, Demian M; nagios-users at lists.sourceforge.net
	Subject: RE: [Nagios-users] Downtime for ALL hosts and services
on system?

	 

	Why not just stop nagios if you want to stop monitoring/alerting
everything during the window?

	 

	-Ben.

		-----Original Message-----
		From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Ginther,
Demian M
		Sent: Friday, July 15, 2005 1:23 PM
		To: nagios-users at lists.sourceforge.net
		Subject: [Nagios-users] Downtime for ALL hosts and
services on system?

		We sometimes do a weekend maintenance of all systems
being monitored.  Instead of having to add a downtime for each and every
host and service, does anyone know of a good way or has written a good
plugin to schedule downtime for all hosts and services?

		 

		Maybe a list of all hosts and services with checkboxes
and a time input widget?

		 

		I may try to write something to do this, but I don't
want to duplicate effort.

		 

		Thanks

		 

		Demian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050715/385303b9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_mount
Type: application/octet-stream
Size: 2367 bytes
Desc: check_mount
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050715/385303b9/attachment.obj>


More information about the Users mailing list