Re: monthly uptime email?
"Tom DE BLENDE" <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Organization | DHL GCC |
| Message-ID | <[email protected]> |
Hi, I just finished my script yesterday. As I am a Linux user, it's written for Bash (yes, I know that every *nix box comes with Bourne, but I like Bash so much better). I don't read the netsaint.log file, but use the cgi's instead. Why reinvent the wheel, when the cgi does the job just fine? Basicly this script is cronned every first day of the month. It will calculate the uptime of all hosts and the availability of all services and put it in a MySQL database. Unlike you, I don't have to send emails. The data is available in a database, and management or whoever is interested can just make an ODBC connection to the MySQL database and run queries or make some graphs. As I said the script was finished yesterday, so I did not have the time to clean it up. You might have to add some full paths to binaries, change some hardcoded stuff, remove the 'set -x' if you're done testing. Then instead of dumping the data to MySQL, you'd just pipe it to mutt or whatever. This will however just be an ugly ASCII email. Another option for you would be to create a Netsaint account for each user and assign them the right to view cgi info and add them only to the services that are of interest to them. You could then just add the correct link to the cgi in the email, so they can view the info in their browser. So if you want to send them the results for October, this link would be: http://netsaint.yourdomain.com/cgi-bin/netsaint/avail.cgi?show_log_entries=&host=all&service=all&smon=10&sday=1&syear=2002&shour=0&smin=0&ssec=0&emon=10&eday=31&eyear=2002&ehour=24&emin=0&esec=0 Hope this helps, Tom Jake S wrote: > > ML, > One quick question for the list but first: thank you to all the mailing > list members! I have not had to send a email yet because I have been able > to find everything, so far, through the mailing list archives. > > With that out of the way on to the question at hand. We currently are > watching roughly 200 production websites using Netsaint and it has been > suburb. The problem is that almost every site has a unique business owner > and they now want monthly (or weekly) uptime statistics. > > My question is: Has anyone wrote or is willing to help write a script that > can (via cron) parse the logs and send out a very generic monthly email with > uptime numbers from "service state statistics" or equivalent? > > Thanks in advance, > Jake S > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Netsaint-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/netsaint-users
report.tgz
(application/x-unknown-content-type-winrar, 1 KB) - not displayed