Sun Java Enterprise System 5 Update 1 Monitoring Guide

Setting up the Common Agent Container

The Common Agent Container is another shared component and one that the Monitoring Framework depends on to run the node agent. Depending on your installation sequence, Common Agent Container may be stopped and need restarting. In addition, Common Agent Container has been instrumented and can be monitored as well. For a description of the monitored objects, see Instrumentation of the Common Agent Container.

To check if the Common Agent Container and thus the node agent is already started, run the following command:


cacaoadm status

If a message similar to the following appears, the node agent is running:


default instance is DISABLED at system startup.
Smf monitoring process:
26996
Uptime: 0 day(s), 0:57

If a message similar to the following appears, the node agent is not running:


default instance is DISABLED at system startup.
default instance is not running.

ProcedureTo Enable Monitoring of the Common Agent Container

The Common Agent Container is a shared component that has instrumentation to allow monitoring. As described in Node Agents, all Java ES components on a host or in a zone share the Common Agent Container and the node agent. Perform this task as root on every logical host in your deployment where you wish to monitor the Common Agent Container.

  1. If the Common Agent Container is running, stop it with the following command:


    cacaoadm stop
  2. Enable instrumentation of the container itself:


    cacaoadm set-param enable-instrumentation=true
  3. Check the value of the parameter you just set and restart the Common Agent Container:


    cacaoadm get-param enable-instrumentation
    cacaoadm start
  4. Create a key password in clear text in a file named /etc/mfwk-base/config/security/password.cacao. The password must be the only contents of the file and must not have a trailing end-of-line marker. Depending on your platform, the end-of-line marker consists of the newline character \n, the carriage return character \r, or both \r\n.

    1. Before adding the password, create the empty file such that only the root user has read and write access. As root, run the following commands:


      # touch /etc/mfwk-base/config/security/password.cacao
      # chmod 600 /etc/mfwk-base/config/security/password.cacao
    2. Add the clear text password to the file in such a way that the password does not appear on the command line. If the password appears on the command line, it will be visible through such tools as ps, top, and prstat. Normally, you could use a text editor to do this, but most text editors automatically add the end-of-line marker. One editor that is capable of omitting the end-of-line marker is called elvis. You can download elvis for most platforms from http://elvis.vi-editor.org/. It is similar to the vi editor, and you would use the following sequence of commands:


      # elvis /etc/mfwk-base/config/security/password.cacao
      
      :set readeol=binary<Enter>
      :set partiallastline<Enter>
      <Escape> i (insert mode)
      password<Escape>
      :wq!<Enter> (save file and quit)

      If you know your host is secure, you could use one of the following commands where the password appears in the command line. However, the echo -n option is only available in the bash and tcsh shells, and the printf command may not be available on all platforms.


      # echo –n password > /etc/mfwk-base/config/security/password.cacao
        OR
      # printf password > /etc/mfwk-base/config/security/password.cacao
  5. Generate your key:


    mfwk-base/bin/cpgenkey -n cacao -p /etc/mfwk-base/config/security/password.cacao
  6. Register the Common Agent Container's own monitoring modules:


    cacaoadm register-module /usr/lib/cacao/ext/instrum/config/com.sun.cacao.instrum.xml
    cacaoadm register-module /usr/lib/cacao/ext/instrum_jesmf/config/com.sun.cacao.instrum.jesmf.xml
    cacaoadm register-module /usr/lib/cacao/ext/instrum_jesmf/config/com.sun.cacao.cmm.xml