jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [Documentation/] [README] - Rev 2 Go to most recent revision

Compare with Previous - Blame - Download


                                    HotSaNIC
             HTML overview to System and Network Information Center
 by Bernd Pissny ( hotsanic@bernisys.prima.de / http://www.bernisys.prima.de )

     ----------------------------------------------------------------------

HotSaNIC documentation

    CONTENTS                                                                
                                                                            
      -------------------------------------------------------------------   
                                                                            
    1.  description                                                         
    2.  requirements                                                        
    3.  configuration                                                       
    4.  starting & stopping                                                 
    5.  web output                                                          
    6.  troubleshooting                                                     
    7.  upgrading                                                           
    8.  tools                                                               
    9.  contacting me                                                       
    10. credits                                                             
    11. future plans                                                        
                                                                            
    DESCRIPTION                                                             
                                                                            
      -------------------------------------------------------------------   
                                                                            
    HotSaNIC (the acronym stands for "html overview to system and network   
    information center") consists of a set of perl-scripts built on Tobias  
    Oetiker's "rrdtool" to generate graphical system-statistics, currently  
    supported platforms are linux (main development) and *BSD.              
    I started to build this tool in december 2000, because none of the      
    existing 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 to    
    expand, unused modules may be switched off easily.                      
    Another advantage over most existing tools is the min/max-area that is  
    drawn behind the average-graphs in many modules - a feature that        
    reflects e.g. min/max bandwidth usage in much more detail than similar  
    tools do.                                                               
    The smallest time span that will be displayed covers the last hour, the 
    longest span diagram covers the last year though all data will be kept  
    for about two years (in order to have the chance to look further back   
    in time and compare). Currently supported data-sources are traffic      
    (local and via SNMP), system's properties like                          
    processes/memory/users/loadavg, hdd usage, hdd throughput, ping-times,  
    lm_sensors, #of running copies of given applications, distributed.net   
    statistics, worm-impacts (by analyzing apache-logfiles), APC-USV        
    statistics (load/temperature/charge...), connections to shoutcast       
    streams. More modules are to come on users' requests and ideas.         
    I recently started adding some tools for debugging and to generate      
    alarm-reports (for example if a given threshold is exceeded) which may  
    be mailed to the system's admins.                                       
                                                                            
    REQUIREMENTS                                                            
                                                                            
      -------------------------------------------------------------------   
                                                                            
    Tobias Oetiker's "rrdtool" is needed to let this script work. It is     
    used to manage the databases and generate the graphics. At this point i 
    would like to congratulate Tobi, he did a very good job writing 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. But this should not  
    be an issue since most systems already come with full Perl5 support.    
    But please be sure to install the perl-libraries of "rrdtool" using     
    "make site-perl-install" afer you install "rrdtool."                    
                                                                            
    "convert" from the "ImageMagick" package has to be installed to get     
    full functionality.                                                     
                                                                            
    "iptables" or "ipchains" has to be installed if you want to use the     
    "network" module. Maybe you have to build a new kernel which has the    
    corrosponding firewalling capabilities (packet filter)                  
                                                                            
    CONFIGURATION                                                           
                                                                            
      -------------------------------------------------------------------   
                                                                            
    For version 0.3.6 first of all you should run setup.pl to generate the  
    start/stop script (this will be rrdgraph) and the main "settings" file. 
    The setup-script also calls each module's setup script to generate all  
    module-specific settings. After that you should check if the "settings" 
    file in the main directory contains the correct configuration to fit    
    your system. Then you should check the settings files in each module    
    directory and edit the generated "settings" files to fit your system.   
                                                                            
    The "settings" files are (well, ok, at least they should be) quite      
    self-explaining, so i guess it isn't needed to explain them here -      
    though some day I might list every single module on this page along     
    with a short explanation of what they do and which features they have.  
                                                                            
    STARTING AND STOPPING THE DAEMON                                        
                                                                            
      -------------------------------------------------------------------   
                                                                            
    To run the auto-update daemon the best thing would be to get yourself   
    root-permissions and enter:                                             
                                                                            
    ./rrdgraph start                                                        
                                                                            
    rrdgraph will begin sampling data vor every plugin installed every 10   
    seconds.                                                                
                                                                            
    To stop the daemon enter                                                
                                                                            
    ./rrdgraph stop                                                         
                                                                            
    Most modules will run as non-root, too, but if you want full            
    functionality it is absolutely necessary to let the whole thing run as  
    root. For example the PING module uses ICMP stuff that is only working  
    if you are running it as root.                                          
                                                                            
    GENERATING WEB-STATISTICS                                               
                                                                            
      -------------------------------------------------------------------   
                                                                            
    Well, you should not have to worry about anything except the            
    output-directory which has to be configured correctly (you will have to 
    enter the full path!) in the main settings file.                        
                                                                            
    The images on the statistics pages will be built automatically by       
    HotSaNIC every configured timespan (which will be 15min. by default) If 
    you like to build the graphs more often, you are welcome to decrease    
    the time-base as you like by editing the main settings file. But be     
    sure that decreasing the time-span will eat up more CPU time (which may 
    be needed for more important tasks ... ).                               
                                                                            
    To build the index.html files just start makeindex.pl and all shall be  
    well. The script will gather every plugin-directory and build the       
    necessary index-files for your webpage. In case you install a new       
    plugin, just let HotSaNIC run a couple of minutes inititalize the       
    plugin's databases. Then you just call makeindex.pl again and it will   
    do the rather nasty update-job for you. New plugins can be installed on 
    the fly, the only thing to do is to copy the module-directory to the    
    main directory and maybe you have to add the new module to the RUN and  
    SHOW entries in the main settings.                                      
                                                                            
    If you use the "traffic" plugin, please let rrdgraph run at least some  
    30 seconds to allow the plugin to scan your local interfaces before you 
    run the index-maker.                                                    
                                                                            
    "rrdtimer" will call "convert.sh" about every 24h (timebase may be      
    configured in main settings file). This script will generate pictograms 
    on the main index page of your webstats from the actual weekly graphs.  
                                                                            
    This will require "convert" from "ImageMagick" to be installed. It is   
    used to resize the weekly graph images.                                 
                                                                            
    TROUBLESHOOTING                                                         
                                                                            
      -------------------------------------------------------------------   
                                                                            
      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 do 
        a                                                                   
                                                                            
        make site-perl-install                                              
                                                                            
        If you used a .rpm package, you should check if the RRDs.pm has     
        been installed in the correct places. maybe you used an RPM package 
        which didn't really fit your installation - some pathes may have    
        changed.                                                            
                                                                            
        Or maybe you upgraded PERL, then you also may have to adapt the     
        modules' pathes.                                                    
                                                                            
      o ping module is not working                                          
                                                                            
      -------------------------------------------------------------------   
                                                                            
        On some systems the PERL header-files may be missing. This results  
        in 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 "RedHat    
        7.2" and "Slackware"                                                
                                                                            
        The solution would be to do (as root) the following:                
                                                                            
        cd /usr/include                                                     
        find . -name '*.h' -print | xargs h2ph                              
                                                                            
        After 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 some 
        minutes to let the databases be created and filled. Then you may    
        run the "diagrams" script in the main directory to generate the     
        graphs. This is done by the daemon automatically every DTIME (found 
        in the main settings)                                               
        If just the small graphs on the main page don't show, you have to   
        run "convert.pl" (or "convert.sh") in order to create the thumbnail 
        images. This is done every CTIME.                                   
                                                                            
      o the thumbnails on the main page are not updating or still don't     
        exist                                                               
                                                                            
      -------------------------------------------------------------------   
                                                                            
        Maybe you upgraded to v0.3.6 or later ?                             
        In the later snapshots of this version the thumbnails moved from    
        the main web-dir to the module subdirs to enhance the overview a    
        bit. You have to call the main "makeindex.pl" to update the html    
        pages once again.                                                   
                                                                            
      o after i compiled the scripts some modules fill the logfiles with    
        errors                                                              
                                                                            
      -------------------------------------------------------------------   
                                                                            
        At the moment there is no other way than removing the binaries. I   
        had such strange effects on some systems myself, but I don't know   
        why the binaries behave that way. The compiling completes without   
        any errors, but the binaries won't start properly like the .pl      
        scripts do.                                                         
                                                                            
        UPGRADING                                                           
                                                                            
      -------------------------------------------------------------------   
                                                                            
        Generally the upgrade process involves the following actions:       
           o stop the daemon                                                
           o copy the new files over the existing ones                      
           o call the main setup script                                     
           o call each module's update script (if exists)                   
           o re-start the daemon                                            
        However, if you intend to upgrade your HotSaNIC installation, you   
        should check the HotaNIC homepage firt to make sure wich additional 
        steps have to be performed. Maybe you have to check the history as  
        well, in case you update from a very old version.                   
        Usually updates run quite smoothly without any further changes. You 
        should do as described above: Stop the daemon first to make sure    
        that no data will be fed into the databases which may lead to some  
        annoying side-effects. Then copy the new files to the corrosponding 
        directories. If some major changes occur, there will be an update   
        script in the affected module which you will have to call. The      
        script will take care the necessary and sometimes really nasty      
        modifications for you.                                              
        Anyway, if you copy a newer version over a previous one, it's       
        always a good idea to call the main setup script once again. Maybe  
        some new important configuration items have been added since you    
        last upgraded or installed the tool!                                
        Oh, and don't forget to re-start the daemon afterwards ;).          
                                                                            
        TOOLS                                                               
                                                                            
      -------------------------------------------------------------------   
                                                                            
        Since version 0.4.0 I added a directory containing some possibly    
        useful scripts and add-ons for HotSaNIC.                            
        A brief description resides in this directory, some further         
        descriptions may appear in this documentation later.                
                                                                            
        One nifty thing has to be mentioned:                                
        The modules may be compied in order to start up a bit faster. This  
        will save some percent of your valuable CPU time, but it may not    
        run on every machine! Unhappily the behaviour of the binaries is    
        beyond my control. In most cases they run as smoothly as the        
        perl-scripts, but up to three times faster, sometimes they fill the 
        error-log and sometimes they won't even compile. Only thing you can 
        do is to give it a try and remove all binaries which cause          
        problems.                                                           
                                                                            
        The compilation process is quite easy: Just call the "compile"      
        script in the main directory - that's all.                          
        A whole load of compiler information will scroll down your screen   
        for quite a while. During the (hopefully successful) compiling      
        process, your daemon will automatically start to call the binaries  
        instead of the scripts. These are named "read-data" (without the    
        .pl suffix). This allows to compile while the daemon is already     
        running.                                                            
        The compile script has some useful options:                         
           o "compile r" forces the re-compiling of all modules - no matter 
             if they are already compiled or not.                           
           o "compile u" removes all binaries, leaving just the scripts     
             again.                                                         
           o "compile c" checks if any modules have to be re-compiled (does 
             not change anything, just lists them)                          
           o "compile " compiles precisely not more the given module (the   
             prefix "data-" may be omitted).                                
                                                                            
        CONTACT                                                             
                                                                            
      -------------------------------------------------------------------   
                                                                            
        If you encounter further problems or have any questions or new      
        ideas, please contact us at hotsanic@bernisys.prima.de, we will try 
        to take care of everything. It would be a good idea to put the      
        keyword "hotsanic" and a brief description of your request into the 
        subject to make sure i find your mails again in case we need them   
        later on.                                                           
                                                                            
        If you already have a solution for a problem you encountered,       
        please attach the working code or the modifications you made. A     
        proper description of your problem and the changes you made would   
        be very helpful.                                                    
                                                                            
        Same goes for extensions ideas and support for systems other than   
        Linux.                                                              
                                                                            
        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 all functions running on BSD systems !                 
           o Todd Underwood, who managed to create some RPMs !              
           o All my trusted friends for being appreciative of my hacking    
             till late in the night ! ;)                                    
           o Everybody who sent me hints, new ideas, extensions and         
             bug-reports.                                                   
                                                                            
        FUTURE PLANS                                                        
                                                                            
      -------------------------------------------------------------------   
                                                                            
        I intend to convert the whole shell-script crap to a PERL script    
        which will run very much faster and therefore does not generate     
        unnecessary system-overhead. This is already done for the           
        data-sampling scripts and the index generation. TODO: diagrams      
                                                                            
        I would like to implement more SMNP features not only for the       
        traffic module (as far as possible of course).                      
                                                                            
        In case you have written your own plug-in and you find it useful,   
        be sure to e-mail me a .tgz of your module and include a short      
        description. Same goes for reporting bugs of course!                
                                                                            
        Thank you!                                                          

     ----------------------------------------------------------------------

Powered by WebSVN 2.2.1