Documentation forAppOptics

Socket Listener

Overview

This integration is a service input plugin that listens for messages from streaming (tcp, unix) or datagram (udp, unixgram) protocols. The plugin expects messages in the Telegraf Input Data Formats:

Setup

The socket_listener monitoring is accomplished by bridge-stream plugin which is included with the SolarWinds Snap Agent by default. Follow the directions below to enable it for an agent instance. The bridge-stream plugin utilize Telegraf Socket Listener plugin.

Configuration

The agent provides an example task file to help you get started quickly, but requires you to provide the correct settings for your installation. To enable the task:

  1. Make a copy of the socket_listener example task file task-bridge-socket_listener.yaml.example, renaming it to task-bridge-socket_listener.yaml:

    On Windows, using Explorer or PowerShell:

    copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-socket_listener.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-socket_listener.yaml"

    On Linux using command line:

    sudo cp -p /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-socket_listener.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-socket_listener.yaml
  2. Edit the task file with settings specific to your use case:

    ---
    version: 2
    
    schedule:
      type: "streaming"
      
    plugins:
      - plugin_name: bridge-stream
      
        config:
          socket_listener:
          
            ## URL to listen on
            # service_address: "tcp://:8094"
            # service_address: "tcp://127.0.0.1:http"
            # service_address: "tcp4://:8094"
            # service_address: "tcp6://:8094"
            # service_address: "tcp6://[2001:db8::1]:8094"
            # service_address: "udp://:8094"
            # service_address: "udp4://:8094"
            # service_address: "udp6://:8094"
            # service_address: "unix:///tmp/metrics.sock"
            # service_address: "unixgram:///tmp/metrics.sock"
            
            ## Maximum number of concurrent connections.
            ## Only applies to stream sockets (e.g. TCP).
            ## 0 (default) is unlimited.
            # max_connections: 1024
            
            ## Read timeout.
            ## Only applies to stream sockets (e.g. TCP).
            ## 0 (default) is unlimited.
            # read_timeout: "30s"
            
            ## Maximum socket buffer size in bytes.
            ## For stream sockets, once the buffer fills up, the sender will start backing up.
            ## For datagram sockets, once the buffer fills up, metrics will start dropping.
            ## Defaults to the OS default.
            # read_buffer_size: 65535
            
            ## Period between keep alive probes.
            ## Only applies to TCP sockets.
            ## 0 disables keep alive probes.
            ## Defaults to the OS configuration.
            # keep_alive_period: "5m"
            
            ## Data format to consume: "collectd", "graphite", "influx", "json", or "value".
            ## Each data format has its own unique set of configuration options, read more about them here:
            ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
            # data_format: "graphite"
            ## Metric name prefix
            # bridge_prefix: "graphite"
            
        publish:
          - plugin_name: publisher-appoptics
  3. Restart the agent:

    On Windows command line:

    net stop swisnapd
    net start swisnapd

    On Linux command line:

    sudo service swisnapd restart
  4. Enable the Socket Listener integration in AppOptics

    On the Integrations Page you will see Socket Listener integration available if the previous steps were successful. It may take a couple minutes before the Socket Listener integration is identified. Select the Socket Listener integration to open the configuration menu in the UI, and enable it. If you do not see it, see Troubleshooting Linux.

Testing Integration

To check if and what metrics can be collected with given configuration, run bridge-stream plugin in debug mode:

On Windows command line:

"C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-bridge.exe" --debug-mode --plugin-config "{\"socket_listener\": {\"service_address\": \"tcp://:8094\", \"bridge_prefix\": \"graphite\", \"data_format\": \"graphite\"}}"

On Linux command line:

/opt/SolarWinds/Snap/bin/snap-plugin-collector-bridge-stream --debug-mode --plugin-config "{\"socket_listener\": {\"service_address\": \"tcp://:8094\", \"bridge_prefix\": \"graphite\", \"data_format\": \"graphite\"}}"

For more information read the Telegraf Socket Listener Service Input Plugin docs.

Metrics and Tags

The collected metrics will be prefixed with configured bridge_prefix in AppOptics.

Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.