Logparser

telegraf/logparser プラグインモニターには、この Splunk Observability Cloud インテグレーションを使用します。メリット、インストール、設定、メトリクスを参照してください

注意: Smart Agent モニターは非推奨になります。ログファイルのテーリングを行うには、OpenTelemetry Collector と Telegraf Exec Input プラグインを使用します。手順については、「Telegraf Input プラグインと OpenTelemetry によりサービスを監視」を参照してください。

Splunk Distribution of OpenTelemetry Collectorは、Smart Agentレシーバー と telegraf/logparser モニタータイプを使用して、ログファイルを追尾します。

このインテグレーションは、Telegraf logparser プラグインに基づいており、出力されるすべてのメトリクスは、プラグインのディメンションを telegraf-logparser に設定しています。

メリット

インテグレーションを設定すると、これらの機能にアクセスできるようになります:

インストール

このインテグレーションを導入するには、以下の手順に従ってください:

  1. Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:

  2. [設定] セクションの説明に従ってインテグレーションを設定します。

  3. Splunk Distribution of OpenTelemetry Collector を再起動します。

設定

Smart Agent モニターとCollector のインテグレーションを使用するには、以下の手順に従います:

  1. Smart Agent レシーバーを設定ファイルに含めます。

  2. レシーバーセクションおよびパイプラインセクションの両方で、Collector 構成にモニタータイプを追加します。

このインテグレーションを有効にするには、Collector構成に以下を追加します:

YAML
receivers:
  smartagent/logparser:
    type: telegraf/logparser
    ...  # Additional config

インテグレーションを完了するには、このモニタータイプを logs パイプラインのメンバーとして含めます。SignalFx エクスポータを使用して、イベント送信リクエストを行います。リソース検出プロセッサを使用して、ホストの ID やその他の有用な情報をイベントディメンションとして利用できるようにします。例:

YAML
service:
  pipelines:
    logs:
      receivers:
        - smartagent/logparser
      processors:
        - resourcedetection
      exporters:
        - signalfx

次の例はYAML設定のサンプルです:

YAML
receivers:
  smartagent/logparser:
    type: telegraf/logparser
    files:
     - '$file'
    watchMethod: poll
    # Specifies the file watch method ("inotify" or "poll").
    fromBeginning: true
    # Specifies to read from the beginning.
    measurementName: test-measurement
    # This is the metric name prefix.
    patterns:
     - "%{COMMON_LOG_FORMAT}"
    # Specifies the Apache Common Log Format (CLF).
    timezone: UTC

設定オプション

次の表に、このモニタータイプの設定オプションを示します:

オプション

必須

タイプ

説明

files

list of strings

追尾するファイルへのパス

watchMethod

いいえ

string

ファイルの変更を監視する方法("inotify " または "poll")。値は、

デフォルト値は poll です。

fromBeginning

いいえ

bool

ファイルの先頭からテーリングを始めるかどうか。値は、

デフォルト値は false です。

measurementName

いいえ

string

測定名

patterns

いいえ

list of strings

一致するパターンのリスト。

namedPatterns

いいえ

list of strings

一致する名前付きgrokパターンのリスト。

customPatterns

いいえ

string

カスタム grok パターン。( grok のみ)

customPatternFiles

いいえ

list of strings

カスタムgrokパターンファイルへのパスのリスト。

timezone

いいえ

string

タイムゾーンを指定します。デフォルトのタイムゾーンは UTC です。その他のオプション

は、Local はマシンのローカルタイム、UTC、および Canada/Eastern (unixスタイルのタイムゾーン)です。

メトリクス

Splunk Distribution of OpenTelemetry Collector では、このモニタータイプから出力されるメトリクスに対する組み込みのフィルターリングは行われません。

トラブルシューティング

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers

Available to prospective customers and free trial users

  • Ask a question and get answers through community support at Splunk Answers.

  • Join the Splunk community #observability Slack channel to communicate with customers, partners, and Splunk employees worldwide.