The Linux Agent monitors the health and statistics of a host running Linux. The agent works with Sun Management Center so that Linux hosts running this agent can be managed and viewed from a Sun Management Center console.
This chapter covers these topics:
The Halcyon PrimeAlert Agent for Linux is a Sun Management Center compatible agent. It is close in architecture and functionality to a Sun Management Center 2.x agent.
The Linux Agent and its modules include:
PrimeAlert SystemMonitor for Linux
PrimeAlert MIB-II System
PrimeAlert AgentHealth
These modules are described in Module Features.
The following table list some of the features that the Linux Agent supports or that are implemented differently from other Sun Management Center 3.5 Update 1 agents. The next table lists features that are not supported by the Linux Agent.
Table 2–1 Features Supported Or Implemented Differently
Category |
Feature |
---|---|
Supported functions |
Configurable alarm thresholds |
|
Agent-down alarm |
|
Host-down alarm |
|
Graphing of agent attributes |
|
History logging of agent attributes |
|
Probes for additional information (System Monitor) |
|
Online help |
Different implementation |
Starting and stopping the agent (see Starting and Stopping the Linux Agent) |
|
Creating an object in the console (see To Create a Linux Object As an SNMP Ping Object) |
|
Discovering an object in the console (see To Discover the Linux Object) |
|
Creating an email action script when an alarm is triggered (see Configuring the Email Action Script for Alarms) |
|
Reconfiguring the agent (see Reconfiguring the Linux Agent) |
|
Logging (see Logging) |
|
Accessing help (see Module Online Help) |
|
|
Table 2–2 Features Not Supported
Category |
Features |
---|---|
Core functions not supported |
Load and unload module |
|
View Logs tab in Sun Management console |
|
Applications tab in Sun Management console. Hardware diagnostics and Solaris process details not available |
|
Data views (Sun Management Center 3.x function) |
|
Agent update (Sun Management Center 3.x function) |
|
User-approved action scripts (Sun Management Center 3.x function) |
|
Manage Job functions (also called group operations) (Sun Management Center 3.x function) |
|
Hardware configuration reader (including physical and logical hardware views) from the Hardware tab of the Details window |
|
MCP (Module Configuration Propagation) |
Optional configurations not supported |
Turning off SNMPv1 and SNMPv2c |
|
Defining port range for TCP probe for setting up a firewall |
|
Configuring agent for name mode used in Network Address Translation (NAT) |
|
Encrypting the SNMP PDU (protocol data unit) |
|
Defining multiple trap hosts |
|
Audit channels for agent log file |
|
Configuring how the agent binds to the host's interface ports |
Add-on functions not supported |
Hardware Diagnostics Suite |
|
Performance Reporting Manager |
|
Advanced System Monitoring |
|
Service Availability Manager |
|
Change Manager |
|
System Reliability Manager |
After you install the Linux Agent packages on the server layer, console layer, and agent layer, you need to do the following tasks (also shown in the figure):
Start the Linux Agent
Create a Linux object in the Sun Management Center topology
Create a Linux object as an SNMP ping object or discover the Linux object
Modify Linux object as a Sun Management Center Agent - Host
Monitor the Linux object from the Sun Management Center console
You control the Linux Agent with the pa script. You must be a super user to use the commands. Use the following commands to control the agent.
# /opt/PrimeAlert/bin/pa start agent
# /opt/PrimeAlert/bin/pa stop agent
# /opt/PrimeAlert/bin/pa restart agent
# /opt/PrimeAlert/bin/pa status agent
After starting the agent for the first time, you must wait 5 – 10 minutes for the server and agent to authenticate with one another before you manage the host through the console.
This section provides instructions on how to configure your Sun Management Center console to monitor hosts running the Linux Agent. The following examples assume that you are logged into a Sun Management Center console and an administrative domain is available.
Before you can monitor the Linux Agent, you need to create a Linux object in the Sun Management Center topology. You can create the Linux object in either of these ways:
Create the Linux object as an SNMP Ping object
Use Discovery Manager to populate the domain
After creating the object, you need to modify the object as a Sun Management Center Agent - Host.
In the hierarchy view of the main console window, select the administrative domain in which to create the new object.
Select the lowest level group of the administrative domain where the new object should be created.
Choose Create Object from the Edit menu.
The Create Object window appears with the Node tab selected.
If the Node tab is not displayed, select the Node tab in the Create Object window.
Select SNMP Ping from the Monitor Via list.
A window similar to the following appears.
Type a node label, for example, caspian .
(Optional) Type a description, for example, Linux Host on 4th floor, Building Five.
Type a hostname, for example, caspian.
(Optional if the hostname is provided in Step 7) Type the IP address in the IP Address field, for example, 192.1.4.58.
Verify or change the port number.
The default number is the port number that you provided during installation of the Linux Agent. The default is 161. If you had to install the Linux Agent on another port, for example, because there was already an agent using port 161, then specify that port.
Click OK.
A new object is inserted into the topology window. It has a generic icon.
Go to To Modify the Linux Object As a Sun Management Center Agent - Host.
Follow the procedure, “To Define and Initiate a Discover Objects Request” in the Sun Management Center 3.5 User's Guide (Chapter 4, page 76).
Go to To Modify the Linux Object As a Sun Management Center Agent - Host.
In the hierarchy view of the main console window, select the Linux Agent host that was just added to the current domain.
Choose Modify Object from the Edit menu.
In the Node tab, from the Monitor Via list, select Sun Management Center Agent - Host.
Click OK.
The object icon in the topology window changes from the generic icon to an icon that looks like a personal computer.
After you have created the Linux object, you can monitor the host.
Select the Linux object in the topology window of the console.
Double-click the selected Linux object.
The Details window appears.
By default, the three modules bundled with the Linux Agent are loaded. These modules appear in the Operating System and Local Applications groups. To access help for the modules, see Module Online Help .
Click the tabs relevant to the information you want to display about the Linux host.
Info tab – This tab shows general information about the object, including the name, IP address, polling type, and so on.
Module Browser tab – This tab appears by default. It shows which modules are loaded by category: Hardware, Operating System, Local Applications, and Remote Systems.
Alarms tab – This tab shows alarm status messages and alarm controls for the current host. Provides the ability to acknowledge or delete alarms. Because alarm actions run automatically, the Run Action option is not used.
Module Manager tab — This tab enables you to load and unload the modules. You see the message “This agent version is earlier than 3.0. Some features may not be supported.”
View Logs tab — Because the Log Viewer is not installed for this agent, the tab does not apply. For information about logs, see Logging.
Applications tab — This tab shows messages about the Solaris process details module that do not apply. Ignore the messages.
You can configure an alarm to send email to a specific address for an abnormal event, such as exceeding a certain percentage of CPU busy time.
The following procedure sets up an email action script when an alarm is triggered. In this example, the alarm is triggered when the system exceeds a CPU busy time threshold.
Select the Linux object in the topology window of the console.
Double-click the selected Linux object.
The Module Browser tab of the Details window appears.
Click the expansion icon next to the Operating System icon or the Local Applications icon in the hierarchy tree view to access the module desired.
To Access this Module |
Click the Expansion Icon Next to |
For more information, see |
---|---|---|
PrimeAlert SystemMonitor |
Operating System | |
PrimeAlert AgentHealth |
Local Applications | |
PrimeAlert MIB-II System |
Operating System |
For example, expand the PrimeAlert SystemMonitor module by clicking its expansion icon.
The hierarchy tree view shows the items monitored by the module.
Double-click the CPU Usage item.
The CPU Usage table appears.
Select the CPU Busy Time (%) value in the right column.
The cell is highlighted.
Click mouse button 3 (right-click) on the cell.
A pop-up menu appears.
Click Attribute Editor from the pop-up menu.
The Attribute Editor window appears.
Click the Actions tab.
Type email followed by the address in the text box for the alarm level desired (Critical, Alert, Caution, and so on), for example:
email name@domain |
You can type multiple addresses by using a space as a delimiter, for example:
email name@domain name2@domain |
Click Apply.
Click the Alarms tab to enter a threshold for when the alarm is triggered.
Type the threshold for the alarm level desired (Critical, Alert, Caution, and so on).
For example, for a Caution alarm, type the value 75 for CPU busy time.
Click Apply.
You configure the Linux Agent during installation. However, you can change settings, such as host names or port numbers, after installation by one of the following methods:
Running the install script
Editing domain-config.x
You can re-enter all the agent setup information by typing the following command:
# source-dir/HALLinuxAgent-install.sh -setupAgent |
where source-dir is the installation source directory.
The install script prompts you for the settings and reseeds the Linux Agent if needed.
You can specify different settings after installation, by logging into the Linux Agent host and editing the text file /var/opt/PrimeAlert/cfg/domain-config.x. Edit this file only when you want to change the server context or server ports. You must reseed after changing host names or port numbers, see To Reseed After Changing Host Names or Port Numbers.
The following lines can be specified in domain-config.x:
agent = { snmpPort = "161" agentServer = "caspian" } trap = { trapServer = "balkan" snmpPort = "162" } event = { eventServer = "balkan" snmpPort = "163" } |
If you change the agentServer and the snmpPort values in the domain.config.x file of the Linux Agent host, you must reseed the Linux Agent.
On the Linux Agent host, type the following command in a UNIX shell as a super user:
# /opt/PrimeAlert/bin/pa usm-seed -s seed agent |
seed is the seed you used for your Sun Management Center server layer installation
Restart the Linux Agent.
Wait 5 –10 minutes for the server layer and the agent to authenticate before managing the agent from the console.
The Linux Agent creates several log files that can be used for debugging purposes. These log files use a special format called clog (circular logs). Clog files remain at a fixed size. Use the following tools to view the log files:
Similar to the UNIX command tail, this command displays the last few lines of a file. New lines are displayed as they are added to the file.
Similar to the UNIX command cat, this command displays the file to standard output.
The following log files are created by the agent:
Contains runtime information about the PrimeAlert Agent for Linux. Lines containing critical error messages begin with error.
Contains events generated by the PrimeAlert Agent for Linux.
Contains information about monitored items for which the history function has been enabled. You can enable the history function in the Sun Management Center console through the History tab of the Attribute Editor.
The Linux Agent modules include:
PrimeAlert SystemMonitor for Linux
PrimeAlert AgentHealth
PrimeAlert MIB-II System
These Linux Agent modules are loaded by default when the Linux Agent is first started.
The Linux Agent modules have online help, which is accessed separately from the Sun Management Center online help.
To access the Linux Agent help, click the module name in the Module Browser tab. Then click mouse button 3 (right-click) and select Help from the pop-up menu that appears.
The illustrations in the Linux Agent help are not current with the Sun Management Center 3.5 Update 1 console. The illustrations do not show the View Logs, Applications, and Module Manager tabs. The View Logs and Applications tabs do not apply to the Linux Agent, but the Module Manager tab is functional. Also, the illustrations show the Module Browser tab as the Browser tab.
The help files are on the Sun Management Center server. In the following URLs, smc-svr:port 8080 is the Sun Management Center server running on port 8080. All of the help files have the following path:
http://smc-svr:8080/help/locale/C/ |
PrimeAlert SystemMonitor for Linux help is at:
path/HALLinuxSystemAlert/HALLinuxSystemAlert-h.html
PrimeAlert MIB-II System module help is at:
path/HALMIBII/HALMIBII-h.html
PrimeAlert AgentHealth help is at:
path/HALAgentStatistics/HALAgentStatistics-h.html
The help files are also in the doc subdirectory of the HALLinuxAgent_5.2.x directory in the tar file HALLinuxAgent_5.2.x.tar:
The PrimeAlert SystemMonitor for Linux provides information about the operating system and its components. It is similar to the Kernel Reader Simple module of Sun Management Center. The following subfolders are available:
Displays information about the current console user, the number of current users and sessions, and the primary user of the system.
Displays information about current processes on your Linux system grouped by their state. This subfolder also shows the total number of processes and the process capacity as well as the process limit. Probe commands provide a detailed view of processes in different states and ordered by several criteria.
Provides information about the current system load (1–minute, 5–minute and 15–minute load averages).
Provides information about the current usage of the CPU. Shown are idle time, busy time, system time, user time, and the average CPU usage.
Displays information about the total and available swap space and the current usage of swap memory. A probe command provides detailed information about allocated swap space.
Displays information about mounted filesystems. For each filesystem, the total size, available space, used space, and the change rate of used space are shown.
Lists installed network interfaces and reports input/output packet errors and collisions. Probe commands can be used to obtain information about route tables and protocols.
Provides information about existing TCP connections. Probe commands generate a detailed view of network statistics for several protocols (for example, Inet, TCP, and UDP).
Displays information about IPC message queues, shared memory, and semaphores.
The PrimeAlert AgentHealth module monitors statistics about the internal state of the agent and of the agent process. It is similar to the Agent Statistics module of Sun Management Center.
If the Memory Usage and Virtual Memory Size values exceed the Critical alarm thresholds, the agent exits automatically. The default is set to 70000 Kbytes for Virtual Memory Usage.
The PrimeAlert MIB-II System module delivers data for the system description, name, and uptime, as well as contact information and location. MIB-II stands for Management Information Base for Network Management of TCP/IP-based Internets and is a standard proposed by the Internet Architecture Board (IAB). The PrimeAlert MIB-II System module is similar to the MIB-II Simple module of Sun Management Center.