Example Rollover Script; System Alerts - Novell PRIVILEGED USER MANAGER 2.2.1 - ADMINISTRATION GUIDE 03-31-2010 Administration Manual

Hide thumbs Also See for PRIVILEGED USER MANAGER 2.2.1 - ADMINISTRATION GUIDE 03-31-2010:
Table of Contents

Advertisement

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" on page
4 Click Next to apply the changes.
If the changes are applied successfully, a green box
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
old.
use File::Basename;
system("/usr/bin/gzip $LOG_FILE");
my $log_root = dirname($LOG_FILE);
opendir(LOGDIR, $log_root);
# Find all the compressed log files
my @log_files = map { $_->[1] }
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
$ctx->log_info("Checking $log $age");
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.
32
Novell Privileged User Manager 2.2.1 Administration guide
and then removes any log files that are more than 30 days
unifid.log
map { [ $_, "$log_root/$_" ] }
grep { /\.gz$/ }
readdir(LOGDIR);
= int((($time - $mtime) / 3600) / 24);
32.
is shown next to the agent name.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Privileged user manager 2.2.1

Table of Contents