|
Programming HowTo's -
Perl HowTo's
|
|
Written by ikenticus
|
|
Thursday, 01 May 2008 19:54 |
|
In order to graph the traffic from Akamai, I used to use MRTG calling a PERL/SOAP script which retrieved and combined the data from multiple cpcodes. This proved to be quite inefficient as each combination meant a separate SOAP call. I had thought about injecting the data into Zenoss, but the nature of that project dealt more with SNMP and simple commands and was not the ideal recipient of a multi-faceted SOAP retrieval mechanism.
I finally got a chance to rewrite it this year as a perl script which connects to Akamai, acquires ALL the cpcodes for a particular login and, based on the cpcode name prefix, organizes the data by creating/updating RRD files and graphing them as PNG images (as well as creating MRTG-like HTML files).
|
|
Last Updated on Tuesday, 07 October 2008 13:46 |
|
Read more...
|
|
|
Programming HowTo's -
Perl HowTo's
|
|
Written by Christopher Hahn
|
|
Monday, 28 April 2008 12:31 |
|
#!/usr/bin/perl
# Author: Christopher Hahn, 2006
sub usage {
print STDERR <<EOT;
usage:
$0 <match> [<path> [...]]
Find and edit Apache virtual hosts matching <match>
<path> Path to an Apache conf to edit.
If a directory, equivalent to all files in <path>/
If omitted, "./" is assumed
<match> is a PERL regular expression to match against ServerName or
ServerAlias for the virtual host entry you want to edit.
If <match> is not found and <path> evaluates to a single file (extant or not)
a template is provided to append a VirtualHost to the file.
EOT
die "\n";
}
|
|
Last Updated on Wednesday, 14 May 2008 21:41 |
|
Read more...
|
|
|
|
|
|