Application Management

Customizing Tags via SolarWinds Snap Agent File Collector Loggly

This article provides information on how to customize tag names via SolarWinds Snap Agent File Collector Loggly

First published date

8/31/2022 5:23 PM

Last published date

8/31/2022 5:23 PM

Overview

If you are using Solarwinds Snap Agent files collector and want to use custom tag names for different log files you are monitoring, it is possible to define it in task-logs-files.yaml under the tags section.

Product section

Loggly

Resolution

Please see the tag below to be able to define such tagging and more readable than the other format.
 
tags:
 |log_line|[file=/tmp/sample.log]:
  sometag: somevalue
 |log_line|[file=/tmp/error.log]:
  importanttag: someimportantvalue
Example: 
tags:
 |log_line|[file=/tmp/sample.log]:
  tag: sample
 |log_line|[file=/tmp/error.log]:
  importanttag: someimportantvalue

However, this is the below format that we don't support.

Example: 
tags:
      "|log-files|[file=/tmp/localhost.2022-02-06.log]|string_line":
        "tag" : "test-app"
      "|log-files|[file=/tmp/localhost.2022-02-07.log]|string_line":
        "tag" : "test-app"

If you wish to use a single tag name for your multiple log files, use in tag filter regular expression as provided below:
  tags:
      "|log-files|{/tmp/localhost.*.log}|string_line":
        "tag" : "test-app"