Register
It is currently Sat Apr 19, 2014 7:16 am

Script to check a variable date each month


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Wed Jun 13, 2012 4:41 am   

Joined: Wed Jun 13, 2012 4:30 am
Posts: 1
Hello all,

I run a Nagios box that monitors all sorts and use scripts that are available on Nagios Exchange as well as some of the built in plugins.

However now i have hit a scenario where i need Nagios to send out an alert and no script is available.

Unfortunately i am no programmer!

So i was wondering if it was asimple enough script to do if anybody could produce a script for my needs?

Here goes:

I need Nagios to produce an alert on a variable day of each month.

I need Nagios to send out an alert generally speaking every 30 days from a said date.

But i need the script the do all the date work, as i need just 1 command in Nagios that i dont have to alter each month in the Nagios config file.

eg:

Alert to go out on June 25, then again on Jul 24, then Aug 25, Sep 26 and so on, so on.

I already use this script for some date checks, but they are set dates for software expiry so i only have to change the dates once in Nagios each year. It doesnt allow me to do variable days of a month. But its the same idea of what i want.
http://exchange.nagios.org/directory/Pl ... ck/details

I would owe a massive amount of gratitude if this can be written - and would be happy to share it on the Nagios Exchange crediting the author.

Kind Regards


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP