Sun Java Enterprise System 5 Update 1 Monitoring Guide

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