$('a[name]').remove(); $('#ic-homepage__footer').before('

'); $("#tabs").tabs({ selected: 1 }); $("#ic-homepage__ic-tips").append( quickTipHTML() ); unhideOneProductTip(); $("#ic-homepage__product-tips").wrapInner('

'); $("#ic-homepage__feed-tips").wrapInner('

'); });

IBM Tivoli Monitoring > Version 6.3 > User's Guides > Agent Builder User's Guide IBM Tivoli Monitoring, Version 6.3


Monitor data by using a socket

Collect data from an external application by using a TCP socket.


Use the socket data source to provide data to the agent from an external application, running on the same system as the agent. The external application can send data to the agent anytime it wants to. For example, you can develop a command-line interface that allows a user to post data to an attribute group when it is run. Another option is to modify a monitored application to send updates to the agent. The agent does not start or stop the application that is sending data to the socket; this action is controlled by the user.

There are some limitations with the socket data source:

Use the following procedure to create an attribute group to collect data by using a Transmission Control Protocol socket (TCP) socket.


Procedure

  1. On the Agent Initial Data Source page (Figure 1) or the Data Source Location page, click Custom programs in the Monitoring Data Categories area.

    Figure 1. Monitoring data with Socket

  2. In the Data Sources area, click Socket.

  3. Click Next.

  4. On the Socket Information page, enter an Attribute group name.

    Figure 2. Socket Information window

  5. Enter a help text for the attribute group.

  6. Select whether the attribute group Produces a single data row, Can produce more than one data row, or Produces events. See (Sending data).

  7. In the Socket Information section, select a Code page. See (Character sets).

  8. Optional: Click Advanced to modify the advanced properties for the attribute group. The Advanced option is active when you select that the attribute group Can produce more than one data row, or Produces events.

  9. Click Next.

  10. On the Attribute Information page, specify the first attribute for the attribute group. For more information about creating attributes, see (Create attributes).

  11. Click Next.

  12. Optional: On the Global Socket Data Source Information page, Error Codes section (Figure 3), you can define the error codes that the socket client can send when it cannot collect data. See (Sending errors instead of data). To define an error code, use the following steps:

    Figure 3. Global Socket Data Source Information page

    1. In the Error Codes section, click Add. An error code has a limit of 256 characters. Only ASCII letters, digits, and underscores are allowed. No spaces are allowed.

    2. In the Socket Error Code Definition window, enter a display value that is shown in the Performance Object Status attribute group.

      Figure 4. Socket Error Code Definition window,

    3. Enter an internal value. The internal value must be an integer from 1,000 to 2,147,483,647.

    4. You must define a message text for each error. You can use message text that was entered previously by selecting it from the list. Click OK to return to the Global Socket Data Source Information page. The message text is used in the agent log file. If no suitable message text is available, click Browse to set up the message text. The Messages (list) window opens (Figure 5). The message window lists messages that are defined in the agent. Until you define messages, the list remains blank. You can use Edit to alter a defined message and Remove to delete one or more messages that you defined.

      Figure 5. Messages window


    5. In the Messages (list) window, click Add to see a Message Definition window (Figure 6). In the Message Definition window type, the text that describes the meaning of the new message and select the message type.

      Figure 6. Message Definition window

      The message identifier is automatically generated for you.

    6. Click OK.

    7. The Messages (list) window opens, with the new message. To verify the message and return to the Global Socket Data Source Information page, click OK.

  13. Optional: In the Supplemental Files section of the Global Socket Data Source Information page, you can add files that are packaged with the agent. These files are copied to the agent system when the agent is installed. The File Type column describes how each file is expected to be used. Three possible uses are described in the following table:


    File types for supplemental files

    File Type Description
    Executable Select this option if you want to include an executable file with the agent. The agent does not use these files.
    Library Select this option if you to include a library with the agent. The agent does not use these files.
    Java resource Select this option to include Java resources with the agent. The agent does not use these files.

    For information about where the Supplemental Files are installed with your agent, see (New files on your system).

    Click Edit to edit the imported file. See ( Edit a command file definition).

  14. Optional: You can test this attribute group by clicking Test. For more information about testing, see Test socket attribute groups

  15. Optional: If the data source is sampled, you can create a filter to limit the data that is returned by this attribute group by clicking Advanced. The data source is sampled when you did not select "Produces events" on the Socket Information page. For more information about filtering data from an attribute group, see Filtering attribute groups

  16. Do one of the following steps:

    1. If you are using the New Agent wizard, click Next.

    2. Click Finish to save the data source and open the Agent Editor. Select the operating systems on which the agent listens to data from socket clients in the Operating Systems section of the Socket Provider Settings page. To open the page, click Socket Provider Settings in the outline view or click Global Settings in the Agent Editor on any socket attribute group page.

      Error codes and supplemental files can be updated in the Error Codes and Supplemental Files sections of the Socket Provider Settings page.



+

Search Tips   |   Advanced Search