This section describes events and how they are integral to monitoring your servers.
Events are generated when certain conditions related to attributes occur. Each event has an associated topic. For example, when a server is discovered by the management server, an event is generated with the topic Action.Physical.Discovered. For a complete list of event topics, see create notification in Sun N1 System Manager 1.1 Command Line Reference Manual.
Events can be monitored: Monitoring is connected with the broadcasting of events for each monitored server or group of servers. When a monitored attribute is polled and the value of the attribute is beyond the default or user-defined threshold safe range, an event is generated and a status is issued.
If monitoring is enabled for a server, provided a notification rule has been added for the event, the event causes a notification to be emitted from the management server for that event.
If monitoring is disabled for a server, monitoring events are not generated for that server. You might want to disable monitoring of a hardware component to perform maintenance tasks without generating events.
See Introduction to Monitoring for more information about monitoring.
See Setting Up Notifications for more information about notifications.
Lifecycle events continue to be generated, even with monitoring disabled. Lifecycle events include server discovery, server change or deletion, or server group creation. If you have requested notification of this type of event you can still receive notifications even with monitoring disabled.
Logs are created when events occur. For example, if any monitored IP address is unreachable, an event is generated. This event creates a log record, which is visible from the browser interface.
During the installation and configuration of the N1 System Manager, you can configure which events to log and you can also interactively configure severity levels for event topics. See Configuring the N1 System Manager System in Sun N1 System Manager 1.1 Installation and Configuration Guide.
Even if a log is not saved, it can still generate a notification.
Use the show command with the log keyword to view the following information about events:
Date – The date and time of the event.
Subject – The server on which the event occurred.
Topic – The topic of the event, which can be useful for setting up notifications. Refer to Setting Up Notifications for information.
Severity – Relative severity of the event.
Level – Relative level of the event.
Source – The name of the component that generated the event. For events that are generated during the execution of a job, the source is the job number.
Role – Role or user name of the user who initiated the event.
Message – Complete text of the event log message.
The n1smconfig script can be used to change the number of days for which logs are kept. Reducing the number of days for which logs are stored reduces the average size of the log files. This task ensures that the log file size does not impair performance. The n1smconfig script is stored at /opt/sun/n1gc/bin. This script can be used to set the number of days for which logs are held.To configure logging, you must specify an event category and a resource category. The following event categories are defined:
Action
Ereport
Lifecycle
List
Problem
Statistic
all
Use the all event category to indicate that all events are to be logged. To understand how other event categories relate to actual events, see the notification topics at create notification in Sun N1 System Manager 1.1 Command Line Reference Manual.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> show log [count count] |
The Events log appears with events listed most recent first. The value for the count attribute is the number of events to show in the output. The default value for count is 500. See show log in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> show log [severity severity] [before date] [after date] |
The output shows only the events that match the specified criteria. The date variable values must be formatted appropriately, for example, 2005-07-20T11:53:04. The possible values for severity are critical, fatal, information, major, minor, other, unknown, and warning. See show log in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
Log in to the N1 System Manager.
See To Access the N1 System Manager Command Line for details.
Type the following command:
N1-ok> show log log |
The details of the event appear in the output. The log variable is the log ID. See show log in Sun N1 System Manager 1.1 Command Line Reference Manual for details.
N1-ok> show log 72 ID: 72 Date: 2005-03-15T13:35:59-0700 Subject: RemoteCmdPlan Topic: Action.Logical.JobStarted Severity: Information Level: FINE Source: Job Service Role: root Message: RemoteCmdPlan job initiated by root: job ID = 15. |