Problem with statsd metrics in s3 loader 2.2.2

Hi all.
I have a problem with statsd metrics in s3 loader. When we try to get metrics through the statsd exporter for prometheus, we do not have latency_collector_to_load and the count metric always comes from 0. This problem is only with this service
We are using Version 2.2.2

Hi @Edward_Kim, please could you share the config file you are using for S3 loader? I might be able to spot if something looks amiss.

Thanks for the help. Environment variables are used. The config looks like this:

{
  "region": "<%=ENV['AMAZON_REGION_KINESIS']%>",

  "purpose": "<%=ENV['PURPOSE_OPTION']%>",

  "input": {
    "appName": "<%=ENV['STREAM_APPLICATION_NAME']%>",
    "streamName": "<%=ENV['STREAM_NAME_INPUT']%>",
    "position": "<%=ENV['STREAM_POSITION_OPTION']%>",
    "maxRecords": <%=ENV['STREAM_MAX_BATCH_SIZE']%>
  },

  "output": {
    "s3": {
      "path": "<%=ENV['S3_FULL_PATH_TO_OUTPUT_DATA']%>",
      partitionFormat: "<%=ENV['S3_PARTITION_FORMAT']%>",
      "filenamePrefix": "<%=ENV['S3_FILENAME_PREFIX']%>",
      "maxTimeout": <%=ENV['S3_LOADER_MAX_TIMEOUT']%>,
      "compression": "<%=ENV['S3_OUTPUT_FORMAT']%>"
    },

    "bad": {
      "streamName": "<%=ENV['S3_LOADER_BAD_STREAM']%>"
    }
  },

  "buffer": {
    "byteLimit": <%=ENV['BUFFER_BYTE_LIMIT']%>,
    "recordLimit": <%=ENV['BUFFER_RECORD_LIMIT']%>,
    "timeLimit": <%=ENV['BUFFER_TIME_LIMIT']%>
  },

  # Optional
  "monitoring": {

    "metrics": {
      # StatsD-powered metrics; Optional
      "statsd": {
        "hostname": <%=ENV['S3_LOADER_STATSD_HOST']%>,
        "port": <%=ENV['S3_LOADER_STATSD_PORT']%>,
        "tags": {
          # It can resolve environment variables
          "input": "<%=ENV['STREAM_NAME_INPUT']%>",
          "output": "<%=ENV['S3_FULL_PATH_TO_OUTPUT_DATA']%>"
        },
        # Optional
        "prefix": "<%=ENV['S3_LOADER_STATSD_PREFIX']%>"
      }
    }
  }
}

Thanks! Please can you tell me what you have set for the purpose field? I would only expect the statsd feature to work if you have purpose set to ENRICHED_EVENTS.

More generally, can you confirm that all your environment variables are set to non-empty strings? It would help me understand how the loader would parse this file.

2 Likes

Setting the correct value for the parameter purpose helped me. Thanks

4 Likes

Hi @Edward_Kim
Thanks for updating the thread on how you resolved your issue - really helpful for other users.
Cheers,
Eddie