Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Reference

SNMP Master Agent Integration

You can proxy the SNMP requests from the master agent for your operating system to the Enterprise Server subagent.

Solaris Platform

For additional information, see the man page for snmpd.conf.

    To configure SNMP on the Solaris S10 platform, follow these steps:

  1. Using a text editor, add the following lines to the end of the /etc/sma/snmp/snmpd.conf file.

    rocommunity public
    proxy -c public -v 1 gf-ip-address:10161 1.3.6.1.4.1.42.2.9999.1.1.1

    Substitute the IP address for the machine on which the Enterprise Server is running for gf-ip-address. The default SNMP port is 10161; for information on how to change this port, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide.

  2. Restart the snmpd daemon using the following command:


    /etc/init.d/init.sma restart
  3. Verify the snmpd status using the following command:


    /etc/init.d/init.sma status
  4. To test the Enterprise Server subagent through the Solaris S10 SNMP service, use an snmpwalk command such as this one, which retrieves all Enterprise Server tables:


    snmpwalk -c public -v 1 localhost 1.3.6.1.4.1.42.2.9999.1.1.1.1.1

    On the Solaris platform, this command is located in /usr/sfw/bin/. For more information about using snmpwalk with the Enterprise Server, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide.

To uninstall the SNMP Proxy for the Solaris S10 platform, follow these steps:

  1. Stop the snmpd daemon using the following command:


    /etc/init.d/init.sma stop
  2. Using a text editor, remove the following lines from the end of the /etc/sma/snmp/snmpd.conf file:

    rocommunity public
    proxy -c public -v 1 gf-ip-address:10161 1.3.6.1.4.1.42.2.9999.1.1.1
  3. Restart the snmpd daemon using the following command:


    /etc/init.d/init.sma restart

Linux Platform

For additional information, see the man page for snmpd.conf.

    To configure SNMP on the Linux platform, follow these steps:

  1. Using a text editor, add the following lines to the end of the /etc/snmp/snmpd.conf file.

    rocommunity public
    proxy -c public -v 1 gf-ip-address:10161 1.3.6.1.4.1.42.2.9999.1.1.1

    Substitute the IP address for the machine on which the Enterprise Server is running for gf-ip-address. The default SNMP port is 10161; for information on how to change this port, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide.

  2. If the following line in the /etc/snmp/snmpd.conf file exists, comment it by adding a pound sign, #, at the beginning:

    # com2sec notConfigUser default public
  3. Restart the snmpd daemon using the following command:


    /etc/rc.d/init.d/snmpd restart
  4. Send the snmpd an HUP signal using the following commands.


    ps -ef |grep snmpd|grep -v grep|awk '{print $2;}'
    kill -HUP process-id
    

    Substitute the snmpd process ID for process-id.

  5. Verify the snmpd status using the following command:


    /etc/rc.d/init.d/snmpd status
  6. To test the Enterprise Server subagent through the Solaris S10 SNMP service, use an snmpwalk command such as this one, which retrieves all Enterprise Server tables:


    snmpwalk -c public -v 1 localhost 1.3.6.1.4.1.42.2.9999.1.1.1.1.1

    On the Linux platform, this command is located in /usr/bin/. For more information about using snmpwalk with the Enterprise Server, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide.

To uninstall the SNMP Proxy for the Linux platform, follow these steps:

  1. Stop the snmpd daemon using the following command:


    /etc/rc.d/init.d/snmpd stop
  2. Using a text editor, remove the following lines from the end of the /etc/snmp/snmpd.conf file:

    rocommunity public
    proxy -c public -v 1 gf-ip-address:10161 1.3.6.1.4.1.42.2.9999.1.1.1
  3. If the following line in the /etc/snmp/snmpd.conf file is commented with a pound sign, #, remove the pound sign:

    com2sec notConfigUser default public
  4. Restart the snmpd daemon using the following command:


    /etc/rc.d/init.d/snmpd restart

Windows Platform

To configure SNMP on the Windows XP, 2003, or 2000 platform, perform the following tasks:

Installing the Windows SNMP Service

    If the Windows SNMP service is not installed, follow these steps:

  1. Log on as an administrator or a member of the Administrators group.

  2. Click Start->Control Panel->Add or Remove Programs->Add/Remove Windows Components.

  3. In Components, click Management and Monitoring Tools, but do not select or clear its check box. Then click Details.

  4. Select the Simple Network Management Protocol check box and click OK. Then click Next.

  5. Insert the CD containing the Windows SNMP Service or specify the complete path to the location at which these files are stored.

    The SNMP service starts automatically after installation.

Configuring the Windows SNMP Service

    Configuring the Windows SNMP Service is optional. Follow these steps:

  1. Click Start->Control Panel.

  2. Under Administrative Tools, click Services.

  3. In the details pane, right-click SNMP Service and select Properties.

  4. Change properties as desired.

Installing the SNMP Proxy for Windows

The SNMP Proxy for Windows can be downloaded from http://sourceforge.net/projects/snmppfw/.

    After downloading and unzipping the package, follow these steps:

  1. Copy the SNMPPfW.dll file under the package \bin directory to the Windows system32 directory, for example C:\Windows\System32.

  2. Register the proxy configuration in the Windows Registry using the following command:


    regedit /s Registry_Settings_Install.reg
  3. Change the registry entry number 9983842 to the next number in the list. Use the following command:


    regedit

    Find the following entry:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents]

    Replace 9983842 with the next number in the list using the command Edit->Rename.

  4. Create a proxy configuration file, for example GlassFish_proxy.reg, and enter the following lines:


    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\SNMPPfW\Config\1]
    "AgentAddress"="gf-ip-address"
    "AgentCommunity"="public"
    "AgentPort"="10161"
    "ProxyOIDRoot"=".1.3.6.1.4.1.42.2.9999"
    "ProxiedOIDRoot"=".1.3.6.1.4.1.42.2.9999"
    "Retries"="3"
    "TimeOut"="2000"

    Substitute the IP address for the machine on which the Enterprise Server is running for gf-ip-address. The default SNMP port is 10161; for information on how to change this port, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide.

  5. Execute the following command:


    regedit /s GlassFish_proxy.reg

    This configuration can be edited later using the regedit command.

  6. Restart the Windows SNMP service in one of the following ways:

    • From the Computer Management window, right click on SNMP Service and select Restart.

    • Execute the following commands:


      net stop snmp
      net start snmp
  7. To test the Enterprise Server subagent through the Windows SNMP service, use an snmpwalk command such as this one, which retrieves all Enterprise Server tables:


    snmpwalk.exe -v1 -c public localhost 1.3.6.1.4.1.42.2.9999.1.1.1.1

    You can use your preferred snmpwalk.exe command to retrieve SNMP monitoring information. Several SNMP tools can be found on the internet. For more information about using snmpwalk with the Enterprise Server, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide.

Uninstalling the SNMP Proxy for Windows

    To uninstall the SNMP proxy for Windows and clean up the registry, follow these steps:

  1. Stop the Windows SNMP service using the following command:


    net stop snmp
  2. Remove the SNMPPfW.dll file from the system32 directory such as C:\Windows\System32.

  3. Clean up the registry by using the regedit command. Remove the following registry entries:

    • HKEY_LOCAL_MACHINE\SOFTWARE\SNMPPfW

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents\X, where X contains SOFTWARE\SNMPPfW\CurrentVersion.