Sun Management Center 3.5 Update 1 Supplement for Halcyon PrimeAlert Agent for Linux

Chapter 2 Using the Linux Agent

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:

Introduction to the Linux Agent

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:

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  

Overview of Using the Linux Agent

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):

Flowchart of using the Linux Agent

Starting and Stopping the Linux Agent

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.

To start the PrimeAlert Agent:

# /opt/PrimeAlert/bin/pa start agent

To stop the PrimeAlert Agent:

# /opt/PrimeAlert/bin/pa stop agent

To restart the PrimeAlert Agent (stop and start):

# /opt/PrimeAlert/bin/pa restart agent

To display the status of the PrimeAlert Agent:

# /opt/PrimeAlert/bin/pa status agent


Note –

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.


Monitoring the Linux Host With the Sun Management Center 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:

After creating the object, you need to modify the object as a Sun Management Center Agent - Host.

To Create a Linux Object As an SNMP Ping Object
  1. 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.

  2. Choose Create Object from the Edit menu.

    The Create Object window appears with the Node tab selected.

  3. If the Node tab is not displayed, select the Node tab in the Create Object window.

  4. Select SNMP Ping from the Monitor Via list.

    A window similar to the following appears.

    Screen capture of Node tab in Create Object window
  5. Type a node label, for example, caspian .

  6. (Optional) Type a description, for example, Linux Host on 4th floor, Building Five.

  7. Type a hostname, for example, caspian.

  8. (Optional if the hostname is provided in Step 7) Type the IP address in the IP Address field, for example, 192.1.4.58.

  9. 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.

  10. Click OK.

    A new object is inserted into the topology window. It has a generic icon.

  11. Go to To Modify the Linux Object As a Sun Management Center Agent - Host.

To Discover the Linux Object
  1. 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).

  2. Go to To Modify the Linux Object As a Sun Management Center Agent - Host.

To Modify the Linux Object As a Sun Management Center Agent - Host
  1. In the hierarchy view of the main console window, select the Linux Agent host that was just added to the current domain.

  2. Choose Modify Object from the Edit menu.

  3. In the Node tab, from the Monitor Via list, select Sun Management Center Agent - Host.

  4. Click OK.

    The object icon in the topology window changes from the generic icon to an icon that looks like a personal computer.

    Partial screen capture of console showing PC icon

    After you have created the Linux object, you can monitor the host.

To Monitor the Linux Object
  1. Select the Linux object in the topology window of the console.

  2. 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 .

    Screen capture of Module Browser tab of Details window
  3. 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.

Configuring the Email Action Script for Alarms

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.

To Send Email When an Alarm Is Triggered

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.

  1. Select the Linux object in the topology window of the console.

  2. Double-click the selected Linux object.

    The Module Browser tab of the Details window appears.

  3. 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 SystemMonitor for Linux

    PrimeAlert AgentHealth 

    Local Applications 

    PrimeAlert AgentHealth

    PrimeAlert MIB-II System 

    Operating System 

    PrimeAlert MIB-II System

    For example, expand the PrimeAlert SystemMonitor module by clicking its expansion icon.

    The hierarchy tree view shows the items monitored by the module.

  4. Double-click the CPU Usage item.

    The CPU Usage table appears.

  5. Select the CPU Busy Time (%) value in the right column.

    The cell is highlighted.

  6. Click mouse button 3 (right-click) on the cell.

    A pop-up menu appears.

  7. Click Attribute Editor from the pop-up menu.

    The Attribute Editor window appears.

  8. Click the Actions tab.

  9. 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
    
    Screen capture of Actions tab of the Attribute Editor window
    Note –

    You can type multiple addresses by using a space as a delimiter, for example:


    email name@domain name2@domain
    


  10. Click Apply.

  11. Click the Alarms tab to enter a threshold for when the alarm is triggered.

  12. 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.

  13. Click Apply.

Reconfiguring the Linux Agent

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:

Reconfiguring by Running the Install Script

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.

Reconfiguring by Editing the domain-config.x File

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"
}

Reseeding After Changing Host Names or Port Numbers

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.

To Reseed After Changing Host Names or Port Numbers
  1. 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

  2. Restart the Linux Agent.

    Wait 5 –10 minutes for the server layer and the agent to authenticate before managing the agent from the console.

Logging

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:

/opt/PrimeAlert/bin/ctail

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.

/opt/PrimeAlert/bin/ccat

Similar to the UNIX command cat, this command displays the file to standard output.

The following log files are created by the agent:

/var/opt/PrimeAlert/log/agent.log

Contains runtime information about the PrimeAlert Agent for Linux. Lines containing critical error messages begin with error.

/var/opt/PrimeAlert/log/agentStatus.log

Contains events generated by the PrimeAlert Agent for Linux.

/var/opt/PrimeAlert/log/history.log

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.

Module Features

The Linux Agent modules include:

These Linux Agent modules are loaded by default when the Linux Agent is first started.

Module Online Help

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.


Note –

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/

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:

PrimeAlert SystemMonitor for Linux

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:

User Statistics

Displays information about the current console user, the number of current users and sessions, and the primary user of the system.

Process Statistics

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.

System Load

Provides information about the current system load (1–minute, 5–minute and 15–minute load averages).

CPU Usage

Provides information about the current usage of the CPU. Shown are idle time, busy time, system time, user time, and the average CPU usage.

Swap 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.

Filesystem Usage

Displays information about mounted filesystems. For each filesystem, the total size, available space, used space, and the change rate of used space are shown.

Network Interfaces

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.

TCP Connections

Provides information about existing TCP connections. Probe commands generate a detailed view of network statistics for several protocols (for example, Inet, TCP, and UDP).

IPC Facilities

Displays information about IPC message queues, shared memory, and semaphores.

PrimeAlert AgentHealth

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.


Note –

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.


PrimeAlert MIB-II System

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.