Seite wählen

NETWAYS Blog

Weekly Snap: AwStats Reporting, Perl for Programming & CSS Frameworks

26 – 30 December bid 2011 farewell with handy tools for reporting and programming.
Ronny took a look at report generation with AwStats. The well known tool can generate static PDF reports when combined with htmldoc. From classic log files such as web, ftp or mail servers to network traffic. All that AwStats needs is a log file like source from which it can process according to parameters given in its configuration. Corporate branding of reports with images, styles and HTML links is of course also possible.
Following on, Christoph glorified Perl as his language of choice in writing monitoring plugins. Nagios and Icinga offer complete freedom in this regard, so operating system portability plays a more important role. Java, Python and Perl win points here, especially when interpreters are available. Nonetheless Christoph’s preference is Perl thanks to the flexibility CPAN provides. Language aside, the Nagios development guidelines are important to abide by, and modules for Perl such as Nagios::Plugin::Threshold or Nagios::Plugin::Range are particularly useful. For database interfaces, he recommended DBD::Sybase, DBD::mysql and Win32::OLE.
Continuing with the programming thread, Marius signed off by sharing the Swiss Army knives of CSS. In creating web designs what work with all browsers, he recommended various CSS frameworks. Reset CSS from both Eric Meyer or YUI allow developers to “reset” the pre-defined formatting of a browser for a fresh start, and BluePrint goes a step further to offer help in structural design, typography and columns. From there, he picked out  960 Grid System for tables, sketchbooks and templates for use with Inkscape, Gimp, Illustrator or even Photoshop. Finally, for a complete all-in-one solution Marius recommended HTML5 Boilerplate.

Reportgenerierung mittels AwStats

AwStats wird ja den meisten Leuten ein Begriff sein, daher werde ich im einzelnen nicht direkt auf das Tool eingehen, sondern nur die Funktion beschreiben, mit der sich statische PDF-Reports generieren lassen. Diese Möglichkeit gibt es ja nun schon seit einigen Versionen und ist mit der Zeit gereift. Damit sie umgesetzt werden kann, benötigt man neben dem AwStats nur noch das Tool htmldoc, um die Statistik-Seiten auszuwerten und als PDF exportieren zu können.
Ist beides gegeben, kann man hiermit recht schlicht und einfach Reports für interne oder externe Zwecke erstellen. Die Nutzung der Auswertung ist hier sehr vielseitig, sie geht von den klassischen Logfiles wie Web-,FTP- oder Mailserver bis hin zu reinem Netzwerktraffic wie z.B. Nameserveranfragen. Man benötigt nur ein Art ‚Logfile‘ welche das AwStats nach gewissen Vorgaben auswerten kann. Für die Verarbeitung kann die Dokumentation in der AwStats Konfiguration selbst hergenommen werden oder man erkundigt sich nach evtl. schon fertigen Parsern im Internet.
Der nötige Feinschliff für externe Repots (z.B. an Kunden) kann mittels Optionen für Corporate Identity geschaffen werden. Damit lassen sich die Bilder und Styles bearbeiten und man kann auch zus. HTML Inhalte vor der PDF Generierung in die Seiten einpflegen.