## Information On The CGIs

Introduction

This is a brief description of each CGI distributed with NetSaint, along with the various options that can be specified in the URL to control output. Authorization requirements for each CGI are also discussed.

Important: By default, the CGIs require that you have authenticated to the web server and are authorized to view any information you are requesting. For more information on configuring your web server and CGI configuration file to allow for this, read the sections on setting up the web interface and CGI authorization.

Index

Status CGI
Status map CGI
WAP interface CGI
Status world CGI (VRML)
Tactical overview CGI
Network outages CGI
Configuration CGI
Command CGI
Extended information CGI
Log file CGI
History CGI
Notifications CGI
Trends CGI
Availability reporting CGI

Status CGI

File Name: | status.cgi

Description: This is the most important CGI included with NetSaint. It allows you to view the current status of all hosts and services that are being monitored. The status CGI can produce two main types of output - a status overview of all host groups (or a particular host group) and a detailed view of all services (or those associated with a particular host). Pretty icons can be associated with hosts by defining extended host information entries in the CGI configuration file. Authorization Requirements: If you are authorized for all hosts you can view all hosts and all services. If you are authorized for all services you can view all services. If you are an authenticated contact you can view all hosts and services for which you are a contact. | CGI Arguments:
Argument | Description
host=all | This will produce a detailed view of the status of all services being monitored with NetSaint
host=xxxx | This will produce a detailed view of the status of all services associated with host xxxx, where xxxx is the short name of the host as defined in the host configuration file.
hostgroup=all | This will produce an overview of all services (and their associated hosts) being monitored with NetSaint, grouped into various host groups.
hostgroup=xxxx | This will produce an overview of all services (and their associated hosts) belonging to host group xxxx, where xxxx is the short name of the host group as defined in the host configuration file.
columns=x | This option may only be used in conjunction with the hostgroup=all argument. It allows you to control how many columns of hostgroups are displayed on the generated page. For instance, supplying hostgroup=all&columns=4 as arguments to the CGI will produce an overview page that contains four columns of host groups.
style=detail | This option may only be used in conjunction with the hostgroup argument. Supplying this option will produce a detailed view of all services for hosts that are members of the hostgroup you specified. If you do not supply this option, the default action is to produce a status overview page.
nopopup | This option will suppress the host alert console window that gets displayed when one or more monitored hosts is either down or unreachable.

Status Map CGI

File Name: | statusmap.cgi

Description: This CGI creates a map of all hosts that you have defined on your network. The CGI uses Thomas Boutell's gd library (version 1.6.3 or higher) to create a PNG image of your network layout. The coordinates used when drawing each host (along with the optional pretty icons) are taked from extended host information entries in the CGI configuration file. If you can't seem to find this CGI, or if you have get errors when trying to compile or run it, read this FAQ. Authorization Requirements: If you are authorized for all hosts you can view all hosts. If you are an authenticated contact you can view hosts for which you are a contact. Note: Users who are not authorized to view specific hosts will see unknown nodes in those positions. I realize that they really shouldn't see anything there, but it doesn't make sense to even generate the map if you can't see all the host dependencies... | CGI Arguments:
Argument | Description
host=all | This will produce a network map of all hosts being monitored with NetSaint
host=xxxx | This will produce a network map of host xxxx and all of its child hosts, where xxxx is the short name of the host as defined in the host configuration file.
maxwidth=xxxx | This will limit the maximum width of the produced image to xxxx pixels.
maxheight=xxxx | This will limit the maximum height of the produced image to xxxx pixels.
hspacing=xx | This sets the horizontal spacing between host nodes to xx pixels.
vspacing=xx | This sets the vertical spacing between host nodes to xx pixels.
createimage | This instructs the CGI to create the PNG image instead of the HTML code with imagemap coordinates

WAP Interface CGI

File Name: | statuswml.cgi

Description: This CGI serves as a WAP interface to network status information. If you have a WAP-enable device (i.e. an Internet-ready cellphone), you can view status information while you're on the go. Different status views include hostgroup summary, hostgroup overview, host detail, service detail, all problems, and unhandled problems. In addition to viewing status information, you can also disable notifications and checks and acknowledge problems from your cellphone. Pretty cool, huh? Authorization Requirements: If you are authorized for system information you can view NetSaint process information. If you are authorized for all hosts you can view status data for all hosts and services. If you are authorized for all services you can view status data for all services. If you are an authenticated contact you can view status data for all hosts and services for which you are a contact.

Status World CGI (VRML)

File Name: | statuswrl.cgi

Description: This CGI creates a 3-D VRML model of all hosts that you have defined on your network. Coordinates used when drawing the hosts (as well as pretty texture maps) are defined using extended host information entries in the CGI configuration file. You'll need a VRML browser (like Cortona, Cosmo Player or WorldView) installed on your system before you can actually view the generated model. Authorization Requirements: If you are authorized for all hosts you can view all hosts. If you are an authenticated contact you can view hosts for which you are a contact. Note: Users who are not authorized to view specific hosts will see unknown nodes in those positions. I realize that they really shouldn't see anything there, but it doesn't make sense to even generate the map if you can't see all the host dependencies... | CGI Arguments:
Argument | Description
host=all | This will produce a network model of all hosts being monitored with NetSaint
host=xxxx | This will produce a network model of host xxxx and all of its child hosts, where xxxx is the short name of the host as defined in the host configuration file.
notextures | This will prevent images from being texture mapped onto host objects.
notext | This will suppress the billboard text (host name and status) that is displayed over the host objects.

Tactical Overview CGI

File Name: | tac.cgi

Description: This CGI is designed to server as a "birds-eye view" of all network monitoring activity. It allows you to quickly see network outages, host status, and service status. It distinguishes between problems that have been "handled" in some way (i.e. been acknowledged, had notifications disabled, etc.) and those which have not been handled, and thus need attention. Very useful if you've got a lot of hosts/services you're monitoring and you need to keep a single screen up to alert you of problems. Authorization Requirements: If you are authorized for all hosts you can view all hosts and all services. If you are authorized for all services you can view all services. If you are an authenticated contact you can view all hosts and services for which you are a contact.

Network Outages CGI

File Name: | outages.cgi

Description: This CGI will produce a listing of "problem" hosts on your network that are causing network outages. This can be particularly useful if you have a large network and want to quickly identify the source of the problem. Hosts are sorted based on the severity of the outage they are causing. More information on how the network outage CGI works can be found here. Authorization Requirements: If you are authorized for all hosts you can view all hosts. If you are an authenticated contact you can view hosts for which you are a contact. |

Configuration CGI

File Name: | config.cgi

Description: This CGI allows you to view host, host group, contact, contact group, time period, service, and command definitions that you have defined in your host configuration file(s). Authorization Requirements: You must be authorized for configuration information in order to view contact, contact group, host group, time period, and command definitions. You will also be able to view all host and service definitions. If you are authorized for all hosts you can view all host and service definitions. If you are authorized for all services you can view all service definitions. If you are an authenticated contact you can view all host and service definitions for which you are a contact. | CGI Arguments:
Argument | Description
type=xxxx | This option allows you to specify what type of definitions you would like to view. Valid options include "hosts", "hostgroups", "contacts", "contactgroups", "timeperiods", "commands", and "services".

Command CGI

File Name: | cmd.cgi

Description: This CGI allows you to send commands to the NetSaint process. Although this CGI has several arguments, you would be better to leave them alone. Most will change between different revisions of NetSaint. Use the extended information CGI as a starting point for issuing commands. Authorization Requirements: You must be authorized for system commands in order to issue commands that affect the NetSaint process (restarts, shutdowns, mode changes, etc.). If you are authorized for all host commands you can issue commands for all hosts and services. If you are authorized for all service commands you can issue commands for all services. If you are an authenticated contact you can issue commands for all hosts and services for which you are a contact. Notes: If you have chosen not to use authentication with the CGIs, this CGI will not allow anyone to issue commands to NetSaint. This is done for your own protection. I would suggest removing this CGI altogether if you decide not to use authentication with the CGIs. In order for the CGI to issue commands to NetSaint, you will have to set the proper file and directory permissions as described in this FAQ. |

Extended Information CGI

File Name: | extinfo.cgi

Description: This CGI allows you to view NetSaint process information, host and service state statistics, host and service comments, and more. It also serves as a launching point for sending commands to NetSaint via the command CGI. Although this CGI has several arguments, you would be better to leave them alone - they are likely to change between different releases of NetSaint. You can access this CGI by clicking on the 'Network Health' and 'Process Information' links on the side navigation bar, or by clicking on a host or service link in the output of the status CGI. Authorization Requirements: You must be authorized for system information in order to view NetSaint process information. If you are authorized for all hosts you can view extended information for all hosts and services. If you are authorized for all services you can view extended information for all services. If you are an authenticated contact you can view extended information for all hosts and services for which you are a contact. |

Log File CGI

File Name: | showlog.cgi

Description: This CGI will display the log file. If you have log rotation enabled, you can browse notifications present in archived log files by using the navigational links near the top of the page. Authorization Requirements: You must be authorized for system information in order to view the log file. | CGI Arguments:
Argument | Description
archive=x | This option allows you to browse notifications in the xth latest log archive. A value of 0 will cause the current log file to be used, a value of 1 will cause the most recent archived log to be used, and so on...
oldestfirst | This option allows view notifications with older entries at the top of the page and newer entries at the bottom. The CGI will normally reverse the log file so that newer log entries show up at the top of the page while older ones are at the bottom.

History CGI

File Name: | history.cgi

Description: This CGI is used to display the history of problems with either a particular host or all hosts. The output is basically a subset of the information that is displayed by the log file CGI. You have the ability to filter the output to display only the specific types of problems you wish to see (i.e. hard and/or soft alerts, various types of service and host alerts, all types of alerts, etc.). If you have log rotation enabled, you can browse history information present in archived log files by using the navigational links near the top of the page. Authorization Requirements: If you are authorized for all hosts you can view history information for all hosts and all services. If you are authorized for all services you can view history information for all services. If you are an authenticated contact you can view history information for all services and hosts for which you are a contact. | CGI Arguments:
Argument | Description
host=all | This will display the history of all hosts being monitored with NetSaint
host=xxxx | This will display the history of host xxxx, where xxxx is the short name of the host as defined in the host configuration file.
type=x | This option allows you to control which types of historical alerts are displayed. As x is a numerical value generated by the CGI, I would suggest using the dropdown box to select the type of alerts you want to view.
statetype=x | This option allows you to control whether soft or hard alerts (or both) are displayed. As x is a numerical value generated by the CGI, I would suggest using the dropdown box to select the type of alerts you want to view.
archive=x | This option allows you to browse the history information in the xth latest log archive. A value of 0 will cause the current log file to be used, a value of 1 will cause the most recent archived log to be used, and so on...
oldestfirst | This option allows view history information with older entries at the top of the page and newer entries at the bottom. The CGI will normally reverse the log file so that newer log entries show up at the top of the page while older ones are at the bottom.

Notifications CGI

File Name: | notifications.cgi

Description: This CGI is used to display host and service notifications that have been sent to various contacts. The output is basically a subset of the information that is displayed by the log file CGI. You have the ability to filter the output to display only the specific types of notifications you wish to see (i.e. service notifications, host notifications, notifications sent to specific contacts, etc). If you have log rotation enabled, you can browse notifications present in archived log files by using the navigational links near the top of the page. Authorization Requirements: If you are authorized for all hosts you can view notifications for all hosts and all services. If you are authorized for all services you can view notifications for all services. If you are an authenticated contact you can view notifications for all services and hosts for which you are a contact. | CGI Arguments:
Argument | Description
host=all | This will display all notifications that have been sent out for all hosts (and their associated services) being monitored with NetSaint
host=xxxx | This will display all notifications that have been sent out for host xxxx (and its associated services), where xxxx is the short name of the host as defined in the host configuration file.
contact=all | This will display all service and host notifications that have been sent out to all contacts.
contact=xxxx | This will display all service and host notifications that have been sent out to contact xxxx, where xxxx is the short name of the contact as defined in the host configuration file.
type=x | This option allows you to control which types of notifications are displayed. As x is a numerical value generated by the CGI, I would suggest using the dropdown box to select the types of notifications you want to view.
archive=x | This option allows you to browse notifications in the xth latest log archive. A value of 0 will cause the current log file to be used, a value of 1 will cause the most recent archived log to be used, and so on...
oldestfirst | This option allows view notifications with older entries at the top of the page and newer entries at the bottom. The CGI will normally reverse the log file so that newer log entries show up at the top of the page while older ones are at the bottom.

Trends CGI

File Name: | trends.cgi

Description: This CGI is used to create a graph of host or service states over an arbitrary period of time. In order for this CGI to be of much use, you should enable log rotation and keep archived logs in the path specified by the log_archive_path directive. The CGI uses Thomas Boutell's gd library (version 1.6.3 or higher) to create the trends image. If you can't seem to find this CGI or if you have get errors when trying to compile or run it, read this FAQ. Authorization Requirements: If you are authorized for all hosts you can view trends for all hosts and all services. If you are authorized for all services you can view trends for all services. If you are an authenticated contact you can view trends for all services and hosts for which you are a contact. |

Availability Reporting CGI

File Name: | avail.cgi

Description: This CGI is used to report on the availability of hosts and services over a user-specified period of time. In order for this CGI to be of much use, you should enable log rotation and keep archived logs in the path specified by the log_archive_path directive. Authorization Requirements: If you are authorized for all hosts you can view availability data for all hosts and all services. If you are authorized for all services you can view availability data for all services. If you are an authenticated contact you can view availability data for all services and hosts for which you are a contact. |