Sun N1 System Manager 1.1 Administration Guide

ProcedureTo Add the OS Monitoring Feature

This procedure describes how to add the OS monitoring feature on a server. You can add the OS monitoring feature to a server that already has the base management feature added. Alternatively, you can add the OS monitoring feature to a server with a newly loaded OS and the base management feature is added automatically. The OS monitoring feature is used for OS resource monitoring and inventory management. See Chapter 5, Monitoring Your Servers for details.

The add server feature osmonitor command creates an Add OS Monitoring Support job. You can submit multiple, overlapping add server feature osmonitor commands and have them run in parallel. However, you should limit the number of overlapping Add OS Monitoring Support jobs to a maximum of 15.

If you submit add server feature commands by using a script, see Example 3–13 for an example.

Before You Begin
Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

  2. To add the OS monitoring feature, perform one of the following actions:

    • If you have not added the base management feature, type the following command:


      Note –

      The SSH user account that is used in the following command must have root privileges on the remote machine.



      N1-ok> add server server feature osmonitor agentip agentip agentssh username/password
      
    • If you have already added the base management feature, type the following command:


      Note –

      You cannot specify the agent IP or SSH credentials when adding OS monitoring support to a server that has base management support.



      N1-ok> add server server feature osmonitor
      

    An Add OS Monitoring Support job starts.

    See add server in Sun N1 System Manager 1.1 Command Line Reference Manual for details about command syntax.

  3. Track the Add OS Monitoring Support job to completion.

    After the job completes successfully, the Servers table on the System Dashboard tab appears with values for OS Usage and OS Resource Health. In addition, the show server command output will appear with the OS Monitoring Supported value as OK.

  4. Verify that the OS monitoring feature is supported by issuing one of the following sets of commands on the provisionable server.

    • To verify the Solaris feature, type the following commands:


      # pkginfo |grep n1gc 
      system      SUNWn1gcsolx86ag              N1gc Solaris x86 Agent
      # ps -ef |grep -i esd
      root 23817     1  0 19:57:59 ?       0:01 esd - init agent -dir
       /var/opt/SUNWsymon -q
    • To verify the Linux feature, type the following commands:


      # rpm -qa | grep -i sun-symon-esagt
       sun-symon-esagt-3.6-1.0
       # ps -ef | grep -i esd
       root 1940 1 0 Jan28 ? 00:00:14 esd - init agent -dir
       /var/opt/SUNWsymon -q

Example 3–13 Scripting OS Monitoring Support

The following example script issues multiple add server feature commands on servers that do not have the base management feature support:


n1sh add server 10.0.0.10 feature=osmonitor agentip 10.0.0.110 agentssh admin/admin &
n1sh add server 10.0.0.11 feature=osmonitor agentip 10.0.0.111 agentssh admin/admin &
n1sh add server 10.0.0.12 feature=osmonitor agentip 10.0.0.112 agentssh admin/admin &

Troubleshooting

You must manually install the wget information if the add server feature osmonitor agentip command fails with the following error: Internal error: wget command failed: /usr/bin/wget —0 /tmp/hostinstall.pl http://xx.xx.xx.xx/pub/hostinstall.pl, where xx.xx.xx.xx is the IP address of the machine in question. To correct this error, perform the following actions:

Adding the OS monitoring feature might fail due to stale SSH entries on the management server. If the add server feature osmonitor agentip command fails and no true security breach has occurred, remove the /root/.ssh/known_hosts file or the specific entry in the file that corresponds to the provisionable server. Then, retry the add server feature osmonitor agentip command.

Adding the OS monitoring feature might also fail if you specify the agent IP or the SSH credentials in the add server feature osmonitor command when running it on servers that already have the base management feature support. To solve this problem, issue the add server feature osmonitor command without specifying values for the agent IP or for the SSH credentials.