28.3. Monitor Types

The System and Server Status allows you to monitor many different kinds of servers and daemons, using different monitor types. All types perform some kind of check, and either succeed or fail depending on whether the check passes or not. In some cases, a monitor can return a third result indicating that the server being checked is not installed or that the check that it is trying to perform is impossible.

The available types, their purposes, and additional parameters are listed in Table 28.1:

Table 28.1. Monitor Types and Their Options
MonitorDescriptionParameters
Apache Web serverDetermines if Apache is running by looking at its PID file, using the configuration set in the Apache Webserver module.None
BIND 4 DNS ServerChecks if BIND version 4 is running by looking at its PID file, using the path set in the BIND 4 DNS Server module.None
BIND DNS ServerChecks if BIND version 8 or 9 is running by looking at its PID file, using the configuration from the BIND DNS Server module.None
Check FileCan be configured to make sure that some file exists, does not exist, or that its size is smaller or larger than a certain number of bytes. This monitor can be useful for detecting log files that have become too large, critical files that have gone missing, or indicator files created by other programs.

File to check The full path to the file whose existence or size should be checked by the monitor.

Test to perform If File must exist is chosen, the monitor will fail if the file does not exist.

If File must not exist is chosen, the monitor will fail if the file does exist.

If File must be bigger than is selected, the monitor will fail if the file is smaller than or equal to the size entered next to this option.

If File must be smaller than is selected, the monitor will fail if the file is bigger than or equal to the size entered.
Check ProcessChecks if the process matching some pattern is running or not. This can be useful for ensuring that servers and daemons are running, or for detecting suspicious processes.

Command to check for A Perl regular expression to search the list of running processes for, such as httpd or nfsd.

Fail if process is Determines if the monitor checks to make sure that the command is running, or if it does the opposite and makes sure that it is not running.

Configuration Engine DaemonChecks to see if the CFengine daemon is running.None
DHCP ServerChecks to see if the ISC DHCP server is running by looking at its PID file, taken from the configuration of the DHCP Server module.None
Disk SpaceMakes sure that a filesystem has at least a certain amount of free disk space. A monitor of this type can be used to give you an early warning of an impending shortage of disk space.

Filesystem to check For this parameter, you must select the filesystem whose size should be checked from its menu. Or you can choose the Other option and enter the mount point into the text field next to it.

Minimum free space (in kB) If the amount of disk space free on the filesystem is less than the number of kilobytes entered for this parameter, the monitor will fail.

Execute CommandExecutes an arbitrary shell command and checks its exit status. This is the most flexible monitor, as you can use it to run your own custom scripts that perform checks that none of the built-in monitor types can.

Command to check exit status of A shell command or commands that the monitor will run as root and check to see if it succeeds or fails, based on its exit status. All the usual shell metacharacters such as ;, &&, and | can be used.

Extended Internet ServerChecks to see if the xinetd Extended Internet Server is running by looking at its PID file.None
File ChangeDetermines if a file has changed since the last time the monitor was run. Useful for detecting changes to critical files or log files that record serious error messages.

File to monitor The full path to a file or directory whose last modification time will be checked. The monitor will report a failure if the time has changed since the monitor was last queried.

Free MemoryMakes sure that the amount of free memory available on your system is not less than a certain amount.

Minimum free memory (in kB) If the amount of available memory is less than the number of kilobytes entered for this parameter, the monitor will fail. On Linux, free memory is defined as the sum of free RAM, free swap, and the memory used for buffers and caches.

Hostsentry DaemonChecks to see if the Hostsentry daemon is running on your system.None
Internet and RPC ServerChecks to see if the inetd Internet Server is running by looking at its PID file.None
Jabber IM ServerChecks if the Jabber Instant Messaging Server is running by looking at its PID file.None
Load AverageMonitors the system load average, and checks to see if it has exceeded some limit.

Load average to check As explained in Chapter 11, all UNIX systems keep track of the average system load over the last 1, 5, and 15 minutes. This parameter controls which average the monitor will check.

Maximum load average The average above which the monitor will fail. On a single-CPU machine, an average of 1.0 means that the system is fully loaded.

MON Service MonitorChecks to see if MON is running by looking at its PID file, which is taken from the configuration of the MON Service Monitor module.None
MySQL Database ServerChecks to see if MySQL is running by attempting a test connection, using the username and password set in the MySQL Database Server module.None
NFS ServerChecks to see if the nfsd process exists on your system, indicating that the NFS server is running.None
Network TrafficThis monitor type checks the number of bytes that have passed through a network interface, and fails if the data rate exceeds some limit. Because the rate is just the number of bytes that have passed since the last check divided by the number of seconds since the check, a monitor of this type must be run every few minutes on schedule. This can be useful for warning you of a denial of service attack launched from or at your system.

Interface to monitor The network interface that will be checked for excessive traffic.

Maximum bytes/second The data rate above which the monitor will report a failure.

Direction to monitor This parameter determines whether incoming, outgoing or traffic on both directions is counted towards the data rate.

Portsentry DaemonChecks to see if Postsentry is running by looking at its PID file, which is taken from the configuration of the Security Sentries module.None
Postfix ServerChecks to see if Postfix is running by looking at its PID file, the location of which is taken from the Postfix Configuration module.None
PostgreSQL Database ServerChecks to see if PostgreSQL is running by attempting a test connection, using the username and password set in the PostgreSQL Database Server module.None
ProFTPD ServerChecks the ProFTPD PID file to see if the server process is running. This monitor can only be used if the FTP server is running in stand-alone mode, not from a super server like inetd or xinetd.None
QMail ServerChecks to see if Qmail is running by looking for the qmail-send process.None
Remote HTTP ServiceAttempts a connection to an HTTP server running on some host, and requests a page. If something goes wrong, the monitor will fail. This type is useful for testing web servers running on systems that do not have Webmin installed, or for checking to see that critical pages are available.

URL to request An HTTP or HTTPS URL for the monitor to download when it is run. FTP URLs are not supported.

Connection timeout The number of seconds that the monitor will wait to make the connection and request a page. If the process takes longer than this time, a failure will be reported. The default is 10 seconds.

Login as If the URL is password protected, this parameter can be used to specify a username and password with which to log in.

Remote PingSends and listens for ICMP packets to determine if some host is up or down. This can be useful for testing network connectivity and server availability.

Host to ping The IP address or hostname of a system to check. If the host fails to respond to ICMP echo-request packets, the monitor will fail.

Time to wait for response The number of seconds that the monitor should wait for an ICMP echo-reply response.

Remote TCP ServiceAttempts a TCP connection to a host and port to ensure that the server listening on that port is running. If the connection is successful, it will be closed immediately.

Host to connect to The IP address or hostname of the system to which the monitor should open a TCP connection.

Port to connect to The TCP port on the host on which the connection should be made.

Connection timeout The number of seconds to wait for the TCP connection to succeed before the monitor gives up and reports a failure. The default is 10 seconds.

Samba ServersChecks to see if both the smbd and nmbd Samba server processes are running, unless they have been configured to run from inetd or xinetd.None
Sendmail ServerChecks to see if the Sendmail server is running by looking at its PID file, which is taken from the configuration of the Sendmail Mail Server module.None
Squid Proxy ServerChecks to see if the Squid server is running by looking at its PID file, which is taken from the configuration of the Squid Proxy Server module.None
Usermin Web serverChecks to see if the Usermin HTTP server is running by looking at its PID file, the location of which is taken from the Usermin Configuration module.None
Webmin Web serverChecks to see if Webmin itself is running. This monitor type is only really useful when run on schedule.None

Not all monitors are available on all operating systems. Because they use Linux-specific files in /proc, the Free Memory and Network Traffic monitors are only available on that OS. The Load Average type can only be used on systems that support the Running Processes module, and the Disk Space monitor will only work on systems to which the Disk and Network Filesystems module has been ported.

In addition, many monitors depend upon other Webmin modules. For example, if the Apache Webserver module has been deleted from your Webmin installation, you will not be able to use the Apache Webserver monitor type. If you attempt to add a new monitor that depends upon a module that is not installed or will not work on your operating system, an error message will be displayed when the Create button is clicked.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.208.206