![]() ![]() |
hotsanic |
Subversion Repositories: |
Compare with Previous - Blame - Download
HotSaNICHTML overview to System and Network Information Centerby Bernd Pissny ( hotsanic@bernisys.prima.de / http://www.bernisys.prima.de )----------------------------------------------------------------------HotSaNIC documentationCONTENTS-------------------------------------------------------------------1. description2. requirements3. configuration4. starting & stopping5. web output6. troubleshooting7. upgrading8. tools9. contacting me10. credits11. future plansDESCRIPTION-------------------------------------------------------------------HotSaNIC (the acronym stands for "html overview to system and networkinformation center") consists of a set of perl-scripts built on TobiasOetiker's "rrdtool" to generate graphical system-statistics, currentlysupported platforms are linux (main development) and *BSD.I started to build this tool in december 2000, because none of theexisting stats-tools gave me the flexibility and resolution i expected.Most tools had a minimum query-time of one minute, while i use a 10sec.timebase, which shows a lot more dynamics in the graphs.The whole project is built in a modular way to make it quite easy toexpand, unused modules may be switched off easily.Another advantage over most existing tools are the very complex graphswhich show a lot more details. Most graphs are underlayed with an areathat covers the min/max range of samples taken at each time.Quite all important system-stats are supported, more modules are tocome on users' requests and ideas.The smallest time span that will be displayed covers the last hour, thelongest span diagram covers the last year though all data will be keptfor about two years (to have the chance to look further back in timeand compare).Additionally there are some tools for debugging and to generatealarm-reports (for example if a given threshold is exceeded) which maybe mailed to the system's admins.REQUIREMENTS-------------------------------------------------------------------Tobias Oetiker's "rrdtool" is needed to run this set of scripts. It isused to manage the databases and generate the graphics. Make sure thatthe "rrdtool" perl-libraries are installed on your system!At this point i would like to congratulate Tobi, he did a very good jobwriting this magnificent tool!Since I mainly use Perl5 to sample the data and update the databases,of course this has to be installed on your system, too. But this shouldnot be an issue since most systems already come with full Perl5support."convert" from the "ImageMagick" package has to be installed to getfull functionality.Some modules require further tools or kernel features to be present.Please refer to the module documentations for more information.CONFIGURATION-------------------------------------------------------------------All you should need to do for configuring is running setup.pl togenerate the start/stop script (called rrdgraph) and the main"settings" file. The setup-script also calls each module's setup scriptto generate all module-specific settings within the module'ssubdirectory. After that you should check if the "settings" file in themain directory contains the correct configuration to fit your system.After that you should check the ""settings" files in each configuredmodule's directory and edit it to fit your system.There are plenty of comments into the "settings" files, so they shouldbe quite self-explaining.STARTING AND STOPPING THE DAEMON-------------------------------------------------------------------Since there are some datasources only the "root" user has access to,best would be to run it as "root". This is simply dome by gettingyourself root-permissions and typing:./rrdgraph startrrdgraph will then begin to initialize itself and to sample data voreach configured module every 10 seconds.To stop the daemon enter./rrdgraph stopGENERATING WEB-STATISTICS-------------------------------------------------------------------The images on the statistics pages will be built automatically byHotSaNIC every 15 minutes. If you like to build the graphs more oreless often, you are welcome to decrease or increas the time-base as youlike by editing the main settings file. But be careful with too lowtimespans, because it will use more CPU time (which may be needed formore important tasks ... ).Usually you should not have to worry about anything except theoutput-directory, which has to be configured correctly (you will haveto enter the full path!) in the main settings file.If not yet done, run makeindex.pl to generate all html files. Thescript will gather every module and build the necessary index-files foryour webpage. In case you install a new module, just let HotSaNIC run acouple of minutes to inititalize the plugin's databases. Then you justcall makeindex.pl again and it will rebuild all html files. New pluginscan be installed quite "on the fly". Just copy it to the "modules"directory and add it to the RUN and SHOW entries in the main settings."rrdtimer" will call "convert.sh" about every 24h (timebase may beconfigured in main settings file). This script will generate pictogramson the main index page of your webstats from the actual weekly graphs.This will require "convert" from "ImageMagick" to be installed.TROUBLESHOOTING-------------------------------------------------------------------In case you encounter any trouble with HotSaNIC, you should check thelogfiles for possible errors.Each "settings" file may contain an item "DEBUGLEVEL=<level>" whichchanges the logging behaviour. Increasing the value will usuallyincrease verbosity, a value less than zero turns off all specialinformation.o How do I solve the "cannot find "RRDs.pm" issue?-------------------------------------------------------------------You probably forgot to install the site-perl module of rrdtool.If you installed rrdtool from the source files, you just have to doamake site-perl-installIf you used a .rpm package, you should check if the RRDs.pm hasbeen installed in the correct places. maybe you used an RPM packagewhich didn't really fit your installation - some pathes may havechanged.Or maybe you upgraded PERL, then you also may have to adapt themodules' pathes.o ping module is not working-------------------------------------------------------------------On some systems the PERL header-files may be missing. This resultsin the ping-module complaining about something like"Can't locate sys/syscall.ph in @INC (did you run h2ph?)"Linux distributions known to be affected are for example "RedHat7.2" and "Slackware"The solution would be to do (as root) the following:cd /usr/includefind . -name '*.h' -print | xargs h2phAfter that everything should run as expected. - hopefully ;)o the graphs don't show up-------------------------------------------------------------------Maybe you just started the daemon. in that case let it run for someminutes to let the databases be created and filled. Then you mayrun the "diagrams" script in the main directory to generate thegraphs. This is done by the daemon automatically every DTIME (foundin the main settings)If just the small graphs on the main page don't show, you have torun "convert.pl" (or "convert.sh") in order to create the thumbnailimages. This is done every CTIME.o the thumbnails on the main page are not updating or still don'texist-------------------------------------------------------------------Maybe you upgraded to v0.3.6 or later ?In the later snapshots of this version the thumbnails moved fromthe main web-dir to the module subdirs to enhance the overview abit. You have to call the main "makeindex.pl" to update the htmlpages once again.UPGRADING-------------------------------------------------------------------Generally the upgrade process involves the following actions:o stop the daemono copy the new files over the existing oneso call the main setup scripto call each module's update script (if exists)o re-start the daemonHowever, if you intend to upgrade your HotSaNIC installation, youshould check the HotaNIC homepage firt to make sure wich additionalsteps have to be performed. Maybe you have to check the history aswell, in case you update from a very old version.Usually updates run quite smoothly without any further changes. Youshould do as described above: Stop the daemon first to make sure thatno data will be fed into the databases which may lead to some annoyingside-effects. Then copy the new files to the corrosponding directories.If some major changes occur, there will be an update script in theaffected module which you will have to call. The script will take carethe necessary and sometimes really nasty modifications for you.Anyway, if you copy a newer version over a previous one, it's always agood idea to call the main setup script once again. Maybe some newimportant configuration items have been added since you last upgradedor installed the tool!Oh, and don't forget to re-start the daemon afterwards ;).TOOLS-------------------------------------------------------------------The "tools" directory contains some useful scripts and add-ons forHotSaNIC.A brief description resides in this directory, some furtherdescriptions may appear in this documentation later.CONTACT-------------------------------------------------------------------If you encounter further problems or have any questions or new ideas,please contact us via email to: "hotsanic at bernisys dot prima dot de"and we will try to take care of everything. Please put the keyword"hotsanic" and a brief description of your request into the subject!You may also use the project's tracker system on sourceforge.net toreport errors, post bugfixes or to request feature enhancements andextensions.CREDITS-------------------------------------------------------------------At this point i'd like to thank and honor some people who support(ed)me and my project:o Matt Burke and Peter Reich, who are heavily involved in getting allfunctions running on BSD systems !o Todd Underwood, who managed to create some RPMs !o All my trusted friends for being appreciative of my hacking tilllate in the night ! ;)o Everybody who sent me hints, new ideas, extensions and bug-reports.FUTURE PLANS-------------------------------------------------------------------Converting the whole shell-script crap to PERL. TODO: makerrd scripts----------------------------------------------------------------------