Network Interface Statistics Collection Agent

Welcome to NISCA. Here's how to install it.

Upgrade Procedure
Fresh Installation Procedure
Instructions on Adding a Watermark to Graphs
Configuration Instructions
Got Errors?
Contact Information


Please don't let the length of the installation procedure scare you; it's really not that hard. This is just a very thorough installation manual. :) Installing PHP and its correct libraries is the most difficult part, especially if you compile it yourself (see the PHP_HINTS file for information about that subject). I've never used a precompiled binary release of... well, anything but X... so I have very little idea how to tell you how to do it. :)

Here's what all you need; some is required, some optional.

NISCA v2.5 Requirements

(All versions shown are minimums. Required packages are in red; optional packages are in the usual color.)
PackageVersionFootnote
Apachev 1.3.x1
MySQLv 3.23.x 
PHPv 4.x.x 
zlibv 1.1.4 
UCD SNMPv 4.2.32
libGDv 1.8.x3
libJPEGv 6b4
libPNGv 2.15
The FreeType Libraryv 1.x or 2.x6
The Zend Optimizer?7
  1. Theoretically, any web server can be used, but NISCA has been tested and developed using Apache's httpd. And PHP doesn't recommend using the Apache 2.x versions yet.
  2. You can also use net-snmp v5.x.x. You must have one or the other if you want to collect stats using SNMP.
  3. Only required to make graphs.
  4. Only required for JPG support in graphs.
  5. Only required for PNG support in graphs.
  6. Only required if you want to use TrueType Fonts on graphs.
  7. Optional. Get the version to match your PHP version. Zend will dramatically improve PHP performance.

NISCA also requires that Session Variables and Perl-Compatible Regular Expressions support be enabled in both the module and CGI binary versions of PHP. They're both enabled by default; please don't disable them. It also requires that you have the "register_globals" setting in php.ini set to "On". Sorry. :)

Fresh Installation Procedure

  1. Before proceeding verify that all the required packages are correctly installed. Please see the PHP_HINTS file for a highly detailed description of how to install all the pieces that NISCA requires.

  2. Unpack the NISCA package (which you've probably done if you're reading this).

  3. Move this entire directory to a directory somewhere in your web server's DocumentRoot. It doesn't have to be called "nisca-2.5/"; all URLs and links in the scripts are relative. For example, if you want its URL to be "http://localhost/admin/stats/", you can just do "mv -i nisca-2.5 <document_root_directory>/admin/stats" and it's done.

    Make sure "phtml" files can be executed in this directory (Apache configuration). Also make sure Apache knows to treat "index.phtml" as an index file (add "index.phtml" to the "DirectoryIndex" line of your "srm.conf" or "httpd.conf" file). Then, make sure the directory is writable by the web server user, or just make your web server user the owner of the directory. This is so it can create JPGs in it.

  4. Do whatever you want with the "docs" directory. :)

  5. Scripts that don't run from a web server require that their first line be set to the binary used to execute them. Nisca's scripts all assume your "php" binary is in /usr/local/bin/. If it isn't, either make a symlink to php as /usr/local/bin/php, or go through these scripts and change their first line to match wherever it really is:

    • utils/collect
    • utils/mrtg_import
    • utils/nisca_check
    • utils/nisca_kill
    • utils/snmp_collect
    • install/create_stats
    • install/move_niscaconf_to
    • install/update-to-2.5

  6. Make the directory "/etc/nisca" ("mkdir /etc/nisca" as root). Copy "nisca.conf" and "db.conf" from the "install" directory into it. If you don't like "/etc/nisca", it is actually possible to change the location and/or filename of "nisca.conf" from the default. If you want to do so, run the script "move_niscaconf_to" from your NISCA installation directory (run it without any parameters to see the command-line options). This script will move nisca.conf and db.conf into the directory of your choice (making it if it doesn't exist already), change the "require_once" fields in all the various scripts, and then spit out the list of commands necessary to restore all file ownerships and modes to their proper state, which you can just cut and paste without any modification into your shell command line.

  7. Edit "/etc/nisca/nisca.conf". Set the file locations and URLs to wherever you want to put the config files. Some are full pathnames on your filesystem, some are URLs. Beginners new to NISCA may want to refer to the file "nisca.conf.explained"; it explains all the options in detail. It can also be installed as your working "nisca.conf" (just rename it).

  8. Edit "/etc/nisca/db.conf". Set the variables appropriately for your MySQL installation; see the comments for each value.

  9. If you're using Debian, you can refer to this message for hints on where to put the package's various files.

  10. Correct file modes/permissions can now be achieved with these commands as root; make sure you're in your NISCA installation directory first!!! (Replace "nobody" with the username your web server runs as, and "/etc/nisca" with wherever you put nisca.conf and db.conf.)
         chown nobody:root .      
         chown -R root:root *
         chown -R nobody:root /etc/nisca archive
         chmod -R 644 *
         chmod 744 install/* utils/*
         chmod 644 install/*.conf
         chmod 755 . */
         chmod 700 /etc/nisca archive
         chmod 600 /etc/nisca/*
    
    And if your server's on Windows, of course, you can just ignore all that. :)

  11. Create the database to hold the statistics in by executing this command (and do make sure MySQL is running beforehand, of course):
        mysqladmin create stats
    
    If you already have a database named "stats", you can give it another name; just change the $database="stats"; line in "db.conf" to whatever you want to call it, and put that name in the "mysqladmin create ____" line above. db.conf is the only place you'll have to change the database's name. You're welcome. The "create_stats" script will NOT run if this database does not exist or does exist but is not empty.

  12. In MySQL, give the user your web server connects as (the $db_user variable in "db.conf") the following permissions for the database you just created:
    Select, Insert, Update, Delete, Create, Drop, References, Index, and Alter.
    There are many ways to do this; I recommend the MySQL documentation for help. :)

    I wouldn't worry too much about giving your web server such high privileges; it's only on the one database, and only the one user who's allowed to connect to it. Unless you have untrustworthy jackals roaming your server with root access, it's safe.... but if you do, Nisca's probably the least of your security concerns. :)

    phpMyAdmin is also a big help for those unfamiliar with MySQL administration.

  13. Initialize the database structure by running this command from the directory where you untarred this file:
        install/create_stats
    
    If you want to change the default admin password, edit create_stats before you run the above command. Look for the "$admin_pw=" line and change its value to whatever you want for a password. It defaults to "change". Also make sure its first line ("#!/usr/local/bin/php") points to your standalone PHP binary.

  14. Open the NISCA administration page in your browser ("admin/index.phtml"). The default administrator login is username "admin", password "change". See below for details on how to configure NISCA using this interface.

  15. Move the "collect" script to the bin directory of your choice (/usr/local/sbin/ for example). This script collects data only from localhost using the /proc/net/dev procfs file.

    You can monitor "localhost" with both the collect and snmp_collect scripts, but I don't know why you would unless you're me. The collect script will store stats with the community blank (that is, put into the database as ""), and snmp_collect will store them under whatever community name you use to connect to localhost. It won't screw anything up, but it's duplicated effort.

  16. Move the "snmp_collect" script to a bin directory, as before. This script uses SNMP to get data from some remote host(s) (set them up in the administration section). The script won't refuse to get data from "localhost" through SNMP, but it will be far, much faster to do it by reading /proc/net/dev directly with the "collect" script instead.

    Be sure you've set up the local and SNMP interfaces to be monitored in the configuration section before running the collector scripts!!

    Now, you have two choices. You can either run these two collectors as daemons, or you can run them from crontab. If you want to use crontab, edit the collectors and look for the "$runasdaemon" variable declaration at the very top. Change it from "y" to anything else, then save and exit the file. Add a job for it to crontab as you would for anything else, and you're done. No crontab entries are needed if they run as daemons.

    If you want to run them daemonically, start the collector(s) of your choice at this point by running these commands either as root or your web server user:

        nohup /usr/local/sbin/collect &  (for collection from localhost)
        nohup /usr/local/sbin/snmp_collect &  (for collection via SNMP)
    
    This will create the file "nohup.out" in either the current directory or your home directory if the current one can't be written to. If this is run from a system startup script, it will go into "/".

    If you like, you can run collect and snmp_collect from one of your system startup scripts, like rc.local. Just be SURE to put a "&" after them or your machine will never actually finish booting. :)

    There is another way, though. The script "nisca_check" will run a "ps" command and look for running collectors. If it doesn't find either one, it starts them (unless you tell it not to start one or the other of them). If you create a "crontab" entry for this script, it can run every five minutes (or one minute, or seven hours) and keep the scripts running, and then you don't need to change your system init scripts. If you want to use it, set it up in the Global Configuration administration section and move it to /usr/local/sbin or something. The crontab entry might look something like this for every 5 minutes:

       
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/local/bin/nisca_check 2>&1 > /dev/null
    
    (You only need the "root" in there if you're putting it in "/etc/crontab".)

    There's also a companion script for nisca_check: "nisca_kill". This also runs from crontab, and will kill off the collector(s) of your choice at specific times so nisca_check can restart them. This was done to get around the hideous non-UDP-socket-closing bug in either PHP or ucd-snmp. The collection scripts create process ID files (in /var/run by default), which are read by nisca_kill so it knows what process to kill off. And yes, it checks first to make sure the PID is actually a Nisca collector before it kills it; it is running as root, after all. :) Just add another crontab entry like the one for nisca_check, but only like once a day.

  17. Wait a while (at least three "Delay" cycles) after starting the collector(s) or there won't be enough data to graph.

  18. If you have MRTG logfiles you want to import, do them now using the following command:
        utils/mrtg_import <MRTG file to import> <hostname> <community> '<interface name>'
    
    Put the interface name in single quotes if it contains slashes or backticks or something. Whatever you put in for <hostname>, <community>, and <interface name> must already be defined in the configuration. There must also already be entries in the database for this host, community, and interface. What the script does is import everything from the MRTG log that's earlier than the earliest stamp in the database (so no data overlaps, which would be a Bad Thing). You have to run it separately for each interface you want to import data for. I know, very annoying... but it can't automatically determine which hostname/IF name to use based just on the log filename. Sorry.

    If you have an MRTG log that was collected on a localhost interface (via SNMP of course) and you want to put them into the NON-SNMP counter(s) in NISCA (thus meaning you'd have to use a blank community), you should specify the community as "localhost". Yes, this is a Hack. :)

    Note that this script may put counts into the database which are less than zero; this is all right because the report generator accounts for that automagically (only the interval between each entry is important, not the actual values). The only important thing is that the importer knows exactly where the running total byte count starts so it can decrement it from there; hence the need to have at least one entry inserted by the collector(s) before importing. Be very careful when using this script; make very sure you have all the command line options perfect before hitting enter. Pretend it's a "mke2fs" command and treat it just as carefully. :) There's a lot of error checking in it, but you can still put the wrong data in for the wrong interface pretty easily; there's no way to automatically check for that.

    Once you've run this it will refuse to run again for the same host/interface. Rather, it will run but not enter anything into the database whose timestamp is later than or equal to the earliest stamp in the database. Be sure you get it right the first time. :)

    Note that MRTG stores its data thusly (from "rateup.c" in the MRTG package):

    "The .log file stores real history every five minutes for 31 hours, then 'compresses' the history into 30 minute samples for a week, then 2-hour samples for 31 days, then daily samples for two years."
    This means that everything earlier than 31 hours ago will only be put in the database for every 30 minutes, everything earlier than a week before now will be put in in 2-hour increments, and everything earlier than that will only have an entry once a day. (Everything more than two years old is, I assume, simply lost forever.) This can make your graphs look kinda funky, like there's not much data for earlier periods. That's because there isn't. There's nothing anyone can do about it. MRTG does this to save disk space used by its logfiles; NISCA does not do this, which is why it takes up so much more space. But I thought the data granularity deserved to be as small as possible back to the beginning of time, so no data "compression" is done by NISCA whatsoever. (MRTG is more like an MP3, and NISCA is more like a WAV file, to make an easily-understood analogy.. :)

  19. If you wish, you can put an appropriate ".htaccess" file into the admin/ directory to make it even more secure (I did this for all you ultra- paranoid admins out there... :) You can also move the entire directory, or rename it, as long as you keep it under your DocumentRoot somewhere. Just change the "$location["admin"]" entry appropriately.

  20. A note about the "archive" directory. It must be writable by your web server user (the user it runs as), and can be located anywhere on your system. Just point your "nisca.conf" file to its location. This directory is where compressed backup data will be stored when you trim the stats in your database.

  21. Try "index.phtml" in your browser. It should work at this point.

  22. If you want to add a watermark image to your graphs, just make an appropriate image -- corporate logo, copyright, clever quip, whatever -- and set the $location["wmimg"] variable in your nisca.conf file to its location (full path/filename). It should be a greyscale JPG, PNG, or BMP, but it'll get treated as 256-color greyscale anyway so it doesn't really matter. Oh, and it should be pretty small; the bigger the watermark, the longer it takes to emboss it onto the graph image. I've included a silly little example image, "wm.png".

    Although there is a function in PHP, ImageCopyMerge, which will do embossing, it will only do it in PHP 4.0.6 or later. It also requires a newer version of libgd. For those reasons, I wrote my own implementation of it from scratch. So there are two functions in Nisca which will do this: icm(), and add_watermark(). You'll find them on or about line 469 of "report.phtml". Nisca will detect whether you have it or not all by itself.

Upgrade Procedure

EXCESSIVELY-brief instructions for experts upgrading from 2.3.x or 2.4 only

  1. Kill the running collectors.
  2. Install all the new files from the Nisca distribution.
  3. Set up the new nisca.conf and db.conf files in /etc/nisca. Use the move_niscaconf_to script if you need it.
  4. Run "update-to-2.4" IF you're upgrading from v2.3.x.
  5. Run "update-to-2.5".
  6. Move collect, snmp_collect, nisca_check, and nisca_kill from utils/ to wherever you had them before. Note they no longer have ".php" at the end.
  7. Verify "nisca_check" settings on the Global Variables admin page; make sure the commands have "collect" instead of "collect.php" and the same for "snmp_collect".
  8. Restart the collectors.
  9. Go back to browsing slashdot.

Brief instructions for people upgrading from 2.3.x or 2.4 only

  1. Unpack the distribution.
  2. Kill your running collectors.
  3. Delete everything in your existing NISCA installation directory (except the "archives" directory, if you have anything in it).
  4. Copy everything in the distribution to your newly-empty install directory.
  5. Edit the "nisca.conf" and "db.conf" files; change as necessary. See "nisca.conf.explained" for a more detailed explanation of all the options. After editing it, rename it to "nisca.conf".
  6. Run "move_niscaconf_to" if you don't want to install nisca.conf into "/etc/nisca/".
  7. If you didn't run "move_niscaconf_to", move the nisca.conf and db.conf files to /etc/nisca/.
  8. Run these commands as root to restore/create the necessary modes/permissions. Run them only from the NISCA installation directory, and only if you didn't run them after running "move_niscaconf_to" (which will give you these same commands to run). Replace "nobody" with whatever user your web server runs as.
         chown nobody:root .      
         chown -R root:root *
         chown -R nobody:root /etc/nisca archive
         chmod -R 644 *
         chmod 744 install/* utils/*
         chmod 644 install/*.conf
         chmod 755 . */
         chmod 700 /etc/nisca archive
         chmod 600 /etc/nisca/*
    
  9. **IF** you're upgrading from v2.3.x, run the "update-to-2.4" script. It modifies your database structure, so you might wanna back it up first.
  10. Run the "update-to-2.5" script and wait for it to finish; make sure it doesn't report any errors.
  11. In the Global Variables section, you'll need to check your two "nohup" commands (in the "nisca_check" section). The ".php" extension has been removed from collect.php and snmp_collect.php; just remove ".php" from the two "nohup" commands, and all will be well. You'll also need to update any crontab jobs you have for this as well; nisca_kill and nisca_check have also lost the .php extension.
  12. Restart the collector(s), or wait for your crontab job to do it.
  13. A note about the "archive" directory. It must be writable by your web server user (the user it runs as), and can be located anywhere on your system. Just point your "nisca.conf" file to it ($location["archive"]). This directory is where compressed backup data will be stored when you trim the stats in your database.
  14. If you want a watermark image merged onto your graphs, see the end of the Fresh Installation Procedure above.
  15. Just skip the rest of the upgrade procedure, and enjoy.

Detailed upgrade instructions for the enlightenment of all

  1. All the old (v1.2-v2.3) upgrade scripts have been removed from the distribution. They're still available at the distribution site; this directory contains them all. v2.3's updater is an exception; it's not that important. 2.3 sucked.

  2. Delete everything in your NISCA installation dir, no matter what version it is. It's just easier if you remove everything and then copy the new files into the empty directory. "nisca.conf" has changed, but it's fortunately very easy to set up. You might want to save your .htaccess file too, if you made one for the admin/ directory, and move your "archive" directory somewhere safe for the moment. Everything else is expendable; this includes the collector scripts and all nisca subdirectories (except "archive").

    This assumes you haven't done any of your own tweaking of NISCA, but if you have, it was probably to do something that works now, so it's best to install all the new files then tweak them using your originals for a model.

  3. Kill your running "collect" and "snmp_collect" scripts. Don't worry too much about data gaps; the program makes up for them by just averaging over a longer period of time. If you're using crontab to run them, just make sure they don't attempt to run while you're doing the upgrade.

  4. Uncompress the archive, then copy it over your existing installation. If you're using Debian, you can refer to this message for hints on where to put the package's various files.

  5. Make sure the first line of each executable script points to your standalone PHP binary (i.e., "#!/usr/local/bin/php"). This includes "functions.bak" if you're upgrading from 1.3. If a script doesn't have such a line, don't add one... :)

  6. Edit "nisca.conf". Change the pathname definitions to match where you want to put the various scripts. Also edit "db.conf" and change it to match your MySQL setup. These files should then go into "/etc/nisca/". Thus, run these commands as root after editing "nisca.conf" and "db.conf":
        mkdir /etc/nisca/
        mv nisca.conf db.conf /etc/nisca/
    
    If you put nisca.conf anywhere else, you'll have to run the script "move_niscaconf_to" to change the location each of Nisca's scripts gets nisca.conf from.

    Correct file modes/permissions can be achieved with these commands as root; make sure you're in your NISCA installation directory first!!! (Replace "nobody" with the username your web server runs as.)

         chown nobody:root .      
         chown -R root:root *
         chown -R nobody:root /etc/nisca archive
         chmod -R 644 *
         chmod 744 install/* utils/*
         chmod 644 install/*.conf
         chmod 755 . */
         chmod 700 /etc/nisca archive
         chmod 600 /etc/nisca/*
    
    And if your server's on Windows, of course, you can just ignore all that. :)

  7. Back up your existing database with:
        mysqldump -a stats > backup.sql
    

    (Note that the "-a" option only works with MySQL v3.23.xx and above. If using an older MySQL, leave off the "-a".)

    ***IF UPGRADING FROM v1.1 OR EARLIER, START HERE***

  8. If you're upgrading from v1.1 or earlier, run the "update-to-1.2.sql" script through mysql to update your database to the v1.2 format, thus:
        mysql stats < update-to-1.2.sql
    
    It may take quite a while to run, depending on how much data you have already. and the new database will probably take up a bit more space (more indices). If you're using v1.2 already, don't do this; just follow the update-to-1.3 step below.

    This WILL fail if you have duplicate data in the database already; that is, if there's more than one row containing the same stamp, hostname, and if_name values. If this happens, it's trouble. You'll have to go through the data and remove duplicate entries before the update will work (a "duplicate entry" is one which has the same values for "hostname", "if_name", and "stamp" as another entry). There's no easy way to do this but if you don't mind losing it, you can always delete all entries with that hostname and interface name in them and then run just the part of update-to-1.2.sql that starts with:

        alter table stats add primary key host_if (stamp, hostname, if_name);
    
    Paste everything from there (including that line) to the end of the file into a command-line mysql session ("mysql stats" as root) after fixing the duplicates and everything will be fine.

    ***IF UPGRADING FROM v1.2, START HERE***

  9. If you're upgrading from v1.2 or earlier, run the "update-to-1.3.sql" script to update your database to the v1.3 format, thus:
        mysql stats < update-to-1.3.sql
    
    Once you've run it once, don't do it again... :) If for some reason something dreadfully horrible goes wrong, restore the database with:
        echo y|mysqladmin drop stats
        mysqladmin create stats
        mysql stats < backup.sql
    
    If everything went okay, you can delete backup.sql if you want. It's very likely to be a very large file.

    Also, you should re-run the "snmp_setup.php" script (but first be sure to change its "require_once" line to "functions.bak" instead of "functions.php", assuming that's what you moved your old functions.php to).

    The format for the $interfaces[] array in functions.php changed completely in v1.3, so you need to reimport the list of interface names in the new format. Don't worry, this won't affect any data you already have in your database.

    Once you've run snmp_setup, cut & paste the output into "functions.bak" so the upgrade script will import them correctly. The $hostname[] array shouldn't need changing.

    ***IF UPGRADING FROM v1.3, START HERE***

  10. If you're upgrading from v1.3 or earlier, edit the "update-to-2.0.php" script and remove the line that will keep it from running before you read this. (This was just so people wouldn't screw anything up thinking "Oh, all I have to do is run this handy script here.") You can also change the default administrator password here (the $admin_pw variable) so your system will never have an admin password known to the world.

    Run the "update-to-2.0.php" script as root to upgrade your database to v2.0. This will convert your existing stored reports to the new format, store all the config variables from "functions.bak" into the "config" table of the database, store all your SNMP variables into the "interfaces" table, store all your localhost (non-SNMP) variables into the "localhost" table, and add/populate the "community" column in the "stats" table. (This can take awhile; be patient with it :)

    From this point on, all your config options (except those in "*.conf") are in the database; you have to use the "admin/index.phtml" script to configure your NISCA installation now.

    After verifying that your new installation works, you can remove "functions.bak"; it will never be used again.

    ***IF UPGRADING FROM v2.0, START HERE***

  11. Edit the "update-to-2.1.php" script and remove the line that will keep it from running before you read this. (This was just so people wouldn't screw anything up thinking "Oh, all I have to do is run this handy script here.")

    Run the "update-to-2.1.php" script as root to upgrade your database to v2.1. This will convert your existing statistics to the new format, and it can take awhile; be patient with it. :)

    ***IF UPGRADING FROM v2.1, START HERE***

  12. Edit, then run the "update-to-2.2.php" script and wait for it to finish; make sure it doesn't report any errors.

  13. You can get rid of "snmp_setup.php" if you still have it at this point; it's useless from here on.

    ***IF UPGRADING FROM v2.2 OR v2.3.x, START HERE***

  14. Run the "update-to-2.3.3" script and wait for it to finish; make sure it doesn't report any errors.

  15. Don't run the "create_stats" script if you have existing data; it will refuse to run.

  16. In the Global Variables section, you'll need to update the two "nohup" commands (in the "nisca_check" section). The ".php" extension has been removed from collect.php and snmp_collect.php; just remove ".php" from the two "nohup" commands, and all will be well. You'll also need to update any crontab jobs you have for this as well; nisca_kill and nisca_check have also lost the .php extension.

  17. Restart the new "collect" and/or "snmp_collect" scripts. if you aren't running them from crontab, you probably want to run the collectors with:
        nohup collect &
        nohup snmp_collect &
    
    especially if you're running it from an X-windows terminal. This should keep the collector from dying by making it ignore all hangup signals and increasing its scheduling priority by 5. If you don't understand, don't worry; just trust me :) You still need to put the "&" on the end. This will create the file "nohup.out" in either the current directory or your home directory.

    There is another way, though. The script "nisca_check" will run a "ps" command and look for running collectors. If it doesn't find either one, it starts them (unless you tell it not to start one or the other of them). If you create a "crontab" entry for this script, it can run every five minutes (or one minute, or seven hours) and keep the scripts running, and then you don't need to change your system init scripts. If you want to use it, set it up in the Global Configuration administration section and move it to /usr/local/sbin or something. The crontab entry might look something like this for every 5 minutes:

    0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/local/bin/nisca_check 2>&1 > /dev/null
    
    (You only need the "root" in there if you're putting it in "/etc/crontab".)

    There's also a companion script for nisca_check: "nisca_kill". This also runs from crontab, and will kill off the collector(s) of your choice at specific times so nisca_check can restart them. This was done to get around the hideous non-UDP-socket-closing bug in either PHP or net-snmp. The collection scripts create process ID files (in /var/run by default), which are read by nisca_kill so it knows what process to kill off. And yes, it checks first to make sure the PID is actually a Nisca collector before it kills it; it is running as root, after all. :) Just add another crontab entry like the one for nisca_check, but only like once a day.

    Notice: the new config format doesn't require you to kill and restart the collectors when you change config options (see "admin/index.phtml" to configure your system). All config options are now re-read every fetch cycle.

  18. The "update.sql" script was just for version 1.2; you can delete it. "update-to-1.2.sql" is an exact copy of it.

  19. If you wish, you can put an appropriate ".htaccess" file into the admin/ directory to make it even more secure (I did this for all you ultra- paranoid admins out there... :) You can also move the entire directory, or rename it. Just change the "$location["admin"]" entry appropriately.

  20. A note about the "archive" directory. It must be writable by your web server user (the user it runs as), and can be located anywhere on your system. Just point your "nisca.conf" file to its location. This directory is where compressed backup data will be stored when you trim the stats in your database.

  21. If you want a watermark image merged onto your graphs, see the end of the Fresh Installation Procedure above.

  22. See the configuration section for instructions on configuring NISCA with the new web interface.


What If Errors Occur?

This is a difficult topic. So many things can go wrong. This is a list of some of the most common ones I see, and ones I anticipate.

Symptom: snmp_collect does absolutely nothing and just exits as soon as you start it.
Cause: Most likely, you don't have the required SNMP utilities installed or set up right.
Solution: Install ucd-snmp or net-snmp. See PHP_HINTS for details. Then make sure your nisca.conf is set up right; the $location["snmpdir"] tells Nisca where to look for them.
Symptom: Even though you KNOW you're logging in with a valid user/password, you can't get past the login page.
Cause: php.ini (mis)setting.
Solution: Edit your "php.ini" file. The Apache module and the standalone binary can use different ini files. Run "php -i|grep php.ini" from a command prompt on the server to see which ini file it thinks it should be using. To see which one the Apache module is using, open the "test.phtml" page that comes with Nisca in a browser and you'll find it about halfway down the table on that page. Once you've found it or them, edit it or them and change its or their "register_globals" and "register_argc_argv" entries to "On". Then restart Apache and any running collector daemons, and the new settings will be active... and your problem will probably go away.

If not, it's possible the session variables aren't working right on your machine. This is probably also in the php.ini file, "session.use_cookies". I have mine set to 1; the alternative is 0, which makes sessions be server- stored instead of stored in your browser as cookies. If you change this setting, beware; it could break other applications on that server that need it set the other way.

Configuration Procedure

For ease-of-configuration comparison purposes, you might want to look at this link. Then come back here and read on. :)

Note: most of this is documented in the online help pages; click on the "Help Me!" button on any page to get help for that page.


Contact Information

If problems develop or you just want to send humble thanks, you can email me at
phee@isthisthingon.org and I'll see if I can help; no promises though... :) (Alternate address if that one doesn't work: brett@fnord.org)

I do also have a Bugzilla repository set up for this project. Please make all bug reports there.