[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-security] RE: traffic question reply by steve



"ICDservers.com" <info@xxxxxxxxxxxxxx> wrote:
> Almost steve but not quite. IN the Cobalt boxes it's fairly easy to
> review how much storage space is consumed by a website and if this space
> gets too filled up the box starts sending out messages about it.

Agreed.

> This is what I am looking for in regards to traffic used.
> I think ( but I'm no programmer, that it shouldn't bee too much trouble
> to be able to set a amount of allowed traffic on a site and then have
> the cobalt review this every night. When the site goes near the agreed
> amount of traffic ( say within 200 MB ) then a message is sent to both
> the admin ( me ) and the siteadmin. When the final amount of traffic is
> used then there should be a option to set if the site can or cannot be
> viewed further for that month. This way I can give my hosters a choice,
> to either pay extra in advance and buy additional traffic upfront or to
> not buy additional traffic and risk unavailability of their website.

I agree that this would be a feature that some Cobalt admins would want, but
it's not something that can be done by adding a line or two of code.  From a
user standpoint, it wouldn't be too much trouble to administer and on a
relative basis building a tool to do what you propose isn't very difficult,
but it's far from trivial.  To illustrate one solution, I'm going to assume
Cobalt captured stats data will be used and the functionality will be
incorporated into the existing GUI's site admin section.  The GUI currently
reports bytes transferred via web, email and ftp daily.  If you wanted to
use that data as your source, a script would need to be written which cycles
through each site, grabs the web, email and ftp traffic for the site and
adds the total to the previous day's total which would need to be stored in
a file or database table.  The script would then need to compare the total
for each site to its quota and a threshold value and take the appropriate
action.  Using your example, if the threshold value is reached an email is
sent to the server admin and the site admin and if the quota is reached the
site is suspended.  Of course, the server admin would need a way to set the
quota and threshold site by site, set the flag for suspending the site.  The
GUI's code would need to be modified to allow this info. to be set and the
script would have to be setup to run from a cron job nightly.  Since changes
to the GUI's code can be overwritten by installing Cobalt PKG files, the
edited files may need to be checked and possibly re-edited after a PKG file
installation.  A lot of headaches could be prevented by building a separate
admin control outside of the existing GUI to achieve the same functionality.
I hope this gives you some idea of what's involved from a programming
standpoint.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/