What's New in Version 0.0.5
What's new you ask? Well, a lot of stuff... This release represents several hundred hours of programming and debugging. I think you'll find it a worthwhile upgrade from the 0.0.4 release.
Note: This release has several new features which may prove difficult for new users (and even current users) to configure properly. If you run into problems or have questions, read the FAQs, all documentation on the configuration files, CGI authorization, etc. before sending me questions. If you don't have time to read the documentation I've put together, then I don't have time to help you.
Anyway, here are some of the things that have been changed or added since the 0.0.4 release...
New Features
- Parallel Service Checks. Service checks are now executed in parallel as needed in order to keep up with the schedule for each particular service definition. Execution of service checks is still done on a "best effort" basis, but those of you with a large number of services should notice definite speed improvements (at the sacrifice of CPU utilization). Two new variables in the main configuration file which affect parallel service check execution are the inter_check_delay_method, service_reaper_frequency, service_interleave_factor, and max_concurrent_checks variables. More information on how service checks are executed in parallel can be found here.
- Automatic Log File Rotation. NetSaint can now perform automatic log rotation of the main log file on an hourly, daily, weekly, or monthly basis. Log file rotation can also be disabled if you wish. The rotation period is specified by the log_rotation_method variable in the main configuration file. Rotated - or "archived" - logs are placed into the directory specified by the log_archive_path variable. The CGIs are aware of the log rotation methods used in NetSaint and can easily traverse through archived logs as needed.
- Standby Mode. NetSaint can now operate in two different modes - ACTIVE and STANDBY. When in active mode, NetSaint will monitor all hosts and services you specify and generate alert notifications if necessary. This is equivalent to the manner in which NetSaint has operated in previous releases. When in standby mode, NetSaint will still monitor all hosts and services you specify, but it will *not* send out alert notifications to any contacts. The program mode that NetSaint should use when initially starting is specified by the program_mode variable (the default it to use ACTIVE mode). The program mode can be changed on the fly (without having to restart NetSaint) by sending a command to NetSaint (as described below). One of the main uses for these two modes is the implementation of redundant monitoring hosts. More information on the two program modes can be found here. Information on implementing redundant monitoring hosts can be found here.
- External Command Interface. External applications now have the ability to send commands to the NetSaint process via a special command file. This allows for some very handy features in CGIs and external applications, and will prove extremely useful as more commands are implemented in the future. External command checking is controlled by the check_external_commands variable. To be on the safe side and prevent an unknowing admin from opening up any security holes in their system, external command checking is disabled by default. The command file that is to be checked is specified by the command_file variable. You can read more about external commands here.
- Command Interface CGI. This new CGI allows you to send commands to the NetSaint process via the external command file (described above). This allows authorized users to restart and shutdown the NetSaint process, change the program mode between ACTIVE and STANDBY, add and delete host and service comments, delay notifications, disable and enable service checks, and more - all from a web interface. The CGI checks to make sure the user has authenticated to the web server and is authorized for a particular command before committing it for processing (see CGI authorization information below). In order to use the command CGI you'll have to grant the proper permissions to the command file and directory as described in this FAQ.
- Host and Service State Statistics. NetSaint now keeps track of state time statistics for hosts and services that it monitors. In other words, it knows how long a particular host has been UP, DOWN, or UNREACHABLE since it was first monitored. For services, it keeps track of time that the service has been in OK, WARNING, UNKNOWN, and CRITICAL states. Don't wager your raise on the validity of these numbers, as there is plenty of room for error in their calculation. However, they do serve as good benchmarks if you're trying to get a sense of how often a service is working, a host is down, etc. State statistics can be viewed in the newly added Extended Information CGI described below...
- Extended Information CGI. This new CGI allows you to view various information about the NetSaint process, state statistics for hosts and services, and miscellaneous other things. It is also the point at which you initiate sending various commands to the NetSaint process (via the Command CGI).
- Network Status Map CGI. NetSaint can now dynamically create a diagram of your network as you have defined it. The CGI uses Thomas Boutell's gd library (version 1.6 or higher) to create a PNG image of your network (as defined by your configuration information). Although this doesn't really add to the functionality of NetSaint, it does help on the usability end...
- VRML (3-D) Status Map CGI. I took a few hours to learn the basics of VRML and created a new CGI that basically gives you a 3-D model of the hosts on your network, along with their status. This is definitely a rough cut, but it will be improved in the future to include automatic refreshes of the world at given intervals (with viewpoint preservation), a HUD, and other minor things. BTW, if you are a VRML wizard please get in touch with me - I need help. Textures can be applied to the host objects by using the extended host information definitions in the CGI configuration file. Even if you don't find it useful, you can use it to impress your boss and co-workers...
- Configuration CGI. The generation of HTML pages containing configuration information on hosts, services, etc. has been moved from the core NetSaint program into a new CGI. As a result, the auto_generate_html option in the main configuration file of 0.0.4 has been removed. Also, the physical_html_path, url_html_path, and url_cgibin_path variables have been moved from the main configuration file to the CGI configuration file.
- User Authorization in CGIs. Based on the requests of many people and some code provided by Ian Cass, the CGIs now use authentication to determine what hosts, services, and commands a user has access to. The actual authentication is handled by your web server, so you'll have to enable authentication for Apache or whatever you're using. Information on how to authorize users for hosts, services, and commands is explained here. If you really want, you can prevent the CGIs from using the authorization functions by setting the use_authentication variable in the CGI configuration file to zero. Note: If you do this you should remove the command CGI or you will open yourself up to denial of service attacks! The CGIs are configured by default to use the authorization functionality unless you specifically disable it.
- Daemon Mode. Karl DeBisschop has contributed some code which allows NetSaint to be run as a true daemon. Use the -d command line argument to start NetSaint in daemon mode.
- NetSaint Process Checking in CGIs. Thanks to suggestions made by Karl DeBisschop and other people, the CGIs can now check the status of the NetSaint process. This is especially useful when viewing the status of the monitoring via the web interface. It basically gives you some assurance that NetSaint is still running properly and that the stats you are seeing are not stale. In order to determine the state of the NetSaint process, the CGIs run a script/program/etc that you specify by the process_check_command variable in the CGI configuration file. The program must follow the same rules set forth for the plugins as far as returning the proper exit code, printing output, etc.
- Multiple Host Configuration Files. NetSaint now fully supports multiple host configuration files. The CGIs are also able to handle multiple config files. This allows you to break up your configuration information into multiple files if you wish. Multiple configuration files are configured by entering more than one cfg_file line in the main configuration file.
- Log File Reversal in CGIs. Many people have requested the ability to reverse the order of the log file when using the showlog, history, and notifications CGIs. By default, the CGIs will now display log entries with newer dates at the top of the page and older dates at the bottom. Each CGI has an option to display entries with older dates first (the old style) if you wish.
- Global Event Handlers. You can now specify global event handlers to be run for all services or hosts by using the global_host_event_handler and global_service_event_handler variables in the main configuration file.
Global event handlers are run immediately prior to any event handlers that you have configured for specific hosts or services. They can be especially useful if you want to log all service and host events to an external database.
- And Other Stuff... As usual, this release of NetSaint includes several minor bug fixes to previous releases and a lot of internal enhancements that you'll probably never notice.