First, I know that's a bad title. I couldn't think of anything short enough. ...
I wrote the following script to let me know when various parts of the network are down. It used to look like this before last weekend when I got over 500 emails about 1 host being down all weekend:
this is in the cron to run every 5 minutes
today I tried to add some smartness to it so that if it already emailed me 5 times to stop sending them every 5 minutes and instead send every hour. I added some bogus hosts into my definition file to test everything out and so far it has not worked as expected. What have I done wrong?
Not a bad idea, but if you're going to do much of this thing, and it means a lot to your business, you should get something like ganglia, nagios, or zenoss. I have the most experience with nagios. Emails like this act as expected. After a while, certain events will become "Escalated" and reach you by pager, etc.
As far as the script above, it's okay, but it doesn't take into account the fact that at 12:56 the server stops, and at 13:00, you get an "hourly" reminder when you didn't get the first one. Better to create files and use the file's timestamp to determine if it's time to remind again.
Hi,
I need a script to assign variables the below paths
/appl/user_projects/domains/<xxx>/servers/<yyy>/logs
Where <xxx> can be any number and name of directories.
<yyy> can be another set of any number of names and directories.
I want to neglect all the <xxx> and <yyy>... (3 Replies)
Hello
Im pretty new to scripting in linux but am keen to learn.
I'm trying to create a backup script similar to a batch script I developed for windows (dos) where the backup is to a usb drive. no problems with the backup process but what I would like to do is automatically remove old files if... (2 Replies)