3.3 Monitoring Hosts

Privileged User Manager maintains a log file for each host, can be configured to send alerts to the Framework Manager console when errors occur, and allows you to view the status of each host:

3.3.1 Viewing the Host Log

  1. Click Hosts on the home page of the console.

  2. In the navigation pane, select the host whose details you want to view.

  3. In the task pane, click View Host Log.

  4. Select the information you want to view:

    Log level: Set the level of information you want to see on the screen.

    • Error displays only Error messages.

    • Warning displays Warning and Error messages.

    • Information displays Information, Warning, and Error messages.

    Refresh (secs): Set the interval in seconds between screen refreshes. You can select intervals from 1 to 60 seconds

    Maximum cached log messages: Set the maximum number of log messages to display on the screen. You can view from 10 to 1000 messages.

  5. Click the Pause check box to pause the screen display.

  6. Click the Clear button to clear the screen display.

  7. Click Close to return to the Framework hierarchy view.

3.3.2 Modifying Log Settings

You can modify log settings for all hosts, all hosts in a domain, or an individual host by using the Domain Log Settings or Host Log Settings options.

  1. Click Hosts on the home page of the console.

  2. To modify the log settings for all hosts in a domain, select the domain. To modify the log settings for an individual host, select the host in the navigation pane.

  3. Click Domain Log Settings or Host Log Settings in the task pane, then modify the following settings:

    Filename: Specify the filename and location of the log file. The default value is logs/unifid.log.

    Level: Set the level of information you need. The default value is Info.

    • Error displays only Error messages.

    • Warning displays Warning and Error messages.

    • Info displays Information, Warning, and Error messages.

    • Debug displays Debug, Information, Warning, and Error messages.

    • Trace displays Trace, Debug, Information, Warning, and Error messages.

      NOTE:The Debug and Trace settings generate a lot of data and are primarily for the use of Novell Support.

    Show all tasks: Click Show all tasks to have the log show all tasks. The Show all tasks option is primarily for the use of Novell Support.

    Rollover: Select the rollover point from the drop-down list to specify when the log file is overwritten with new information. If the maximum size set for the log file is reached, the log file is overwritten regardless of this setting.

    Max Size (MB): Select the maximum size of the log file from the drop-down list to specify when the log is overwritten with new information.

    Rollover Script: Enter a Perl script to be executed at the rollover point. For a sample script, see Example Rollover Script.

  4. Click Next to apply the changes.

    If the changes are applied successfully, a green box is shown next to the agent name.

    If the changes are not applied successfully (for example, if the host is not online), a red box is shown next to the agent name.

  5. Click Close.

3.3.3 Example Rollover Script

This is an example of a Perl script that can be called at the rollover point for the host log file. The script compresses the old unifid.log and then removes any log files that are more than 30 days old.

use File::Basename;
# Zip up rolled over logfile
system("/usr/bin/gzip $LOG_FILE");
my $log_root = dirname($LOG_FILE);
$ctx->log_info("Log file directory  - $log_root");
opendir(LOGDIR, $log_root);
$ctx->log_info("Zipping up $LOG_FILE");
# Find all the compressed log files
my @log_files = map { $_->[1] }
map { [ $_, "$log_root/$_" ] }
grep { /\.gz$/ }
readdir(LOGDIR);
closedir(LOGDIR);
# Delete all log files older than 30 days
my $time = time();
foreach my $log (@log_files) {
my ($mtime) = (stat($log))[9];
my $age = int((($time - $mtime) / 3600) / 24);
$ctx->log_info("Checking $log ($age days old)");
next unless $age > 30;
$ctx->log_info("Deleting $log ($age days old)");
unlink $log;
}

3.3.4 System Alerts

The System Alerts page shows system status alert messages from all hosts in your Framework. The page shows the time of the alert, the host that originated the alert, the type of alert, and information about the alert.

You can define the level of system alerts you want by using the Domain Alert Settings or Host Alert Settings options.

The existence of system alerts is indicated by a flashing Framework icon in the bottom right corner of the screen.

  1. Click the icon to display the System Alerts page.

  2. To clear specific alerts, select the Resolved checkbox next to the desired alerts, then click Finish.

    To clear all alerts, select Mark all alerts resolved, then click Finish.

  3. To close the System Alerts page without clearing the existing alerts, click Cancel.

    The Framework icon continues to flash.

3.3.5 Modifying Alert Settings

You can configure your Framework hosts to generate system status alert messages when specific events occur, such as when the agent exceeds a specified memory usage. If a system alert is triggered, the Framework icon in the bottom right corner of the screen flashes. To view the system alerts, click the icon (see System Alerts for details).

You can modify alert settings for all hosts, all hosts in a domain, or an individual host by using the Domain Alert Settings or Host Alert Settings options.

To modify alert settings:

  1. Click Hosts on the home page of the console.

  2. To modify alert settings for all hosts in a domain, select Hosts or the name of a domain. To modify alert settings for an individual host, select the host in the navigation pane.

  3. In the task pane, click Domain Alert Settings or Host Alert Settings.

    Changes made to a domain’s alert settings override the current settings for individual hosts in that domain. However, subsequent changes made to an individual host’s alert settings override the current domain alert settings on that host.

  4. Configure the following options:

    Alert on log level: Select the level of log information needed to trigger an alert. For example, if you want alerts to be triggered when error messages occur in the log, select Error. The Warning option includes Warning and Error messages. The Info option includes Info, Warning, and Error messages. Select Never to switch this setting off.

    Alert log filter: Define a specific message you want to trigger alerts, or part of a message with wildcard symbols *. You can use regular expressions in this field by selecting the Regular expression check box and specifying your regular expression.

    This setting is independent of the setting in Alert on log level.

    Time offset (mins): Specify the time offset in minutes when you want to trigger an alert. An alert is triggered if a host’s time setting differs from the time setting of the Primary Registry Manager by this number of minutes. Time offsets can cause problems because certificates are time-based. The UTC (Universal Time Coordinated) value is used.

    Pending messages (mins): Specify the interval for when you want to trigger an alert. An alert is triggered if an event has been in the queue of store and forward messages for this number of minutes.

    Maximum memory (MB): Specify the amount of memory in MB that you want as the threshold for an alert. An alert is triggered if a host is using more than this amount of memory.

    Minimum disk space (MB): Specify the minimum amount in MB of disk space that you want as the threshold of an alert. An alert is triggered if a host has less than this amount of disk space remaining in the default installation location.

    Expired certificate: Select this option to cause an alert to be triggered when an agent’s certificate expires.

  5. Click Next to apply the settings to the hosts.

    If the settings are applied successfully, the indicator next to the hostname is green .

    If the settings are not applied successfully (for example, if the host is offline), the indicator is red .

  6. Click Close.

    If any of your settings cause an alert to be triggered, the Framework icon flashes.

3.3.6 Viewing the Host Status

The Host Status option allows you to view the current status of all your hosts, or all the hosts in a domain, on one page.

  1. Click Hosts on the home page of the console.

  2. Select a domain.

  3. Click Host Status in the task pane.

    The status for each host is displayed, as shown in the following table, with a summary at the bottom of the screen.

    The host is online.

    There is a status problem with the host; for example, the host’s time offset exceeds the defined level (see Step 5). Click the arrow to the left of the green box to display status messages.

    The host is offline.

    The host is unregistered.

  4. Use the Online, Offline and Unregistered check boxes to select the hosts you want to view.

    If you have a long list of hosts, deselect the Auto scroll check box to stop the automatic scrolling.

  5. (Optional) Change the filter settings from the default values and select Restart to check the status again. The filters available are:

    Maximum time offset (minutes): The difference in system time between the host and the Primary Registry Manager. If the time offset exceeds the value in this field, a warning indicator is displayed.

    Minimum disk space (MB): If the available disk space on the host machine goes below the value in this field, a warning indicator is displayed.

    Maximum Memory (MB): If the memory used by the host exceeds the value in this field, a warning indicator is displayed.

  6. To view a host’s details, double-click the host or click Close to return to the hierarchical view.

To use a command line option to view the status, see Section 10.5.3, Agent Status.