Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
66 changes: 36 additions & 30 deletions content/ja/_index.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
---
archetype: home
title: Splunk Observability Workshops
linkTitle: Splunk Observability Workshops
description: Splunk を使用したオブザーバビリティソリューションの構築方法をご紹介します。
weight: 1
isCJKLanguage: true
---

## Splunk Observabilityワークショップへようこそ

Splunk Observability Cloudの監視、分析、対応ツールを使用して、アプリケーションとインフラストラクチャをリアルタイムで把握することができます。

このワークショップでは、メトリクス、トレース、ログを取り込み、監視し、可視化し、分析するためのクラス最高のオブザーバビリティ(可観測性)プラットフォームについて説明します。

![gif](images/observability-hero-dashboard.gif)

{{% notice title="OpenTelemetry" color="#4f62ad" icon="fab fa-wpexplorer" %}}
このワークショップで[OpenTelemetry](https://opentelemetry.io)をアプリケーションやインフラの分析に役立つテレメトリデータ(メトリクス、トレース、ログ)の計装、生成、収集、エクスポートに使用します。
{{% /notice %}}

{{% notice title="GitHub" color="#4078c0" icon="fab fa-github" %}}
このドキュメントには、issueやpull requestで [貢献](https://github.com/splunk/observability-workshop) することができます。より良いワークショップにするために、是非ご協力ください。
{{% /notice %}}

{{% notice title="Twitter" color="#1DA1F2" icon="fab fa-twitter" %}}
[Splunk](https://twitter.com/splunk)のTwitterチャンネルでは、アップデート情報や興味深い読み物を紹介しています。
{{% /notice %}}

{{%children type="card" description="true" %}}
+++
title = "Observability Workshops"
hero_title = "Observability *Workshops*."
description = "Splunkでオブザーバビリティソリューションを構築する方法を学びましょう"
weight = "1"
noautocards = true

[[cta]]
label = "Rookiesを見る"
href = "/splunk4rookies/"
style = "primary"

[[cta]]
label = "Ninjasを見る"
href = "/ninja-workshops/"
style = "ghost"
+++

{{< lead >}}
Splunk Observability Cloudが提供するモニタリング、分析、レスポンスツールを活用して、アプリケーションやインフラストラクチャの状況をリアルタイムで把握しましょう。
これらのワークショップでは、メトリクス、トレース、ログの取り込み、モニタリング、可視化、分析において業界最高クラスのオブザーバビリティプラットフォームをご紹介します。
{{< /lead>}}

{{< divider >}}

{{< cards >}}
{{< card title="リソース" href="/resources/" hero-icon="book-text" >}}
Splunk Observability Cloudを最大限に活用するためのリソースです。
{{< /card >}}
{{< card title="シナリオ" href="/scenarios/" hero-icon="rocket" >}}
Splunk Observability Cloudの価値を実際に体験できるガイド付きワークショップです。
{{< /card >}}
{{< card title="Unsupported Field Workshops" href="/unsupported-field-workshops/" hero-icon="users" >}}
Unsupported Field Workshopsは、Splunk Observability Cloudを最大限に活用するためのワークショップです。
{{< /card >}}
{{% /cards %}}
6 changes: 3 additions & 3 deletions content/ja/browse/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Browse *Workshops*
linkTitle: Browse Workshops
description: Every workshop in one place.
title: ワークショップを*探す*
linkTitle: ワークショップを探す
description: すべてのワークショップを一箇所に集めました。
layout: browse
weight: 5
menu:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: 2.1 File Storage Configuration
linkTitle: 2.1 Configuration
weight: 1
---

この演習では、`agent.yaml` ファイルの `extensions:` セクションを更新します。このセクションは OpenTelemetry の構成 YAML の一部で、OpenTelemetry Collector の動作を拡張または変更するオプションコンポーネントを定義します。

これらのコンポーネントはテレメトリーデータを直接処理するわけではありませんが、Collector の機能を向上させるための有用な機能やサービスを提供します。

{{% notice title="Exercise" style="green" icon="running" %}}

> [!IMPORTANT]
> **_すべての_ ターミナルウィンドウで `2-building-resilience` ディレクトリに移動し、`clear` コマンドを実行してください。**

ディレクトリ構造は以下のようになります:

```text { title="Updated Directory Structure" }
.
├── agent.yaml
└── gateway.yaml
```

**`agent.yaml` の更新**: **Agent ターミナル** ウィンドウで、既存の `health_check` エクステンションの下に `file_storage` エクステンションを追加します:

```yaml
file_storage/checkpoint: # Extension Type/Name
directory: "./checkpoint-dir" # Define directory
create_directory: true # Create directory
timeout: 1s # Timeout for file operations
compaction: # Compaction settings
on_start: true # Start compaction at Collector startup
# Define compaction directory
directory: "./checkpoint-dir/tmp"
max_transaction_size: 65536 # Max. size limit before compaction occurs
```

**エクスポーターへの `file_storage` の追加**: `otlphttp` エクスポーターを変更してリトライおよびキューイング機構を構成し、障害が発生した場合でもデータが保持され、再送されるようにします。`endpoint: "http://localhost:5318"` の下に以下を追加し、インデントが `endpoint` と一致していることを確認してください:

```yaml
retry_on_failure:
enabled: true # Enable retry on failure
sending_queue: #
enabled: true # Enable sending queue
num_consumers: 10 # No. of consumers
queue_size: 10000 # Max. queue size
storage: file_storage/checkpoint # File storage extension
```

**`services` セクションの更新**: 既存の `extensions:` セクションに `file_storage/checkpoint` エクステンションを追加します。構成は以下のようになります:

```yaml
service:
extensions:
- health_check
- file_storage/checkpoint # Enabled extensions for this collector
```

**`metrics` パイプラインの更新**: この演習では、デバッグやログのノイズを減らすために、Metric パイプラインから `hostmetrics` レシーバーをコメントアウトします。同様に、構成は以下のようになります:

```yaml
metrics:
receivers:
# - hostmetrics # Hostmetric reciever (cpu only)
- otlp
```

{{% /notice %}}

<!-- Validate the **Agent** configuration using **[otelbin.io](https://www.otelbin.io/)**. For reference, the `metrics:` section of your pipelines will look similar to this:

```mermaid
%%{init:{"fontFamily":"monospace"}}%%
graph LR
%% Nodes
REC1(&nbsp;&nbsp;otlp&nbsp;&nbsp;<br>fa:fa-download):::receiver
PRO1(memory_limiter<br>fa:fa-microchip):::processor
PRO2(resourcedetection<br>fa:fa-microchip):::processor
PRO3(resource<br>fa:fa-microchip<br>add_mode):::processor
PRO4(batch<br>fa:fa-microchip):::processor
EXP1(&ensp;debug&ensp;<br>fa:fa-upload):::exporter
EXP2(otlphttp<br>fa:fa-upload):::exporter
%% Links
subID1:::sub-metrics
subgraph " "
subgraph subID1["`**Metrics**`"]
direction LR
REC1 -- > PRO1
PRO1 -- > PRO2
PRO2 -- > PRO3
PRO3 -- > PRO4
PRO4 -- > EXP1
PRO4 -- > EXP2
end
end
classDef receiver,exporter fill:#8b5cf6,stroke:#333,stroke-width:1px,color:#fff;
classDef processor fill:#6366f1,stroke:#333,stroke-width:1px,color:#fff;
classDef con-receive,con-export fill:#45c175,stroke:#333,stroke-width:1px,color:#fff;
classDef sub-metrics stroke:#38bdf8,stroke-width:1px, color:#38bdf8,stroke-dasharray: 3 3;
``` -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: 3.1 Configuration
linkTitle: 3.1 Configuration
weight: 1
---

{{% notice title="演習" style="green" icon="running" %}}

**Gateway terminal** ウィンドウに切り替えて、`gateway.yaml` ファイルを開いてください。`processors` セクションを以下の設定で更新します。

1. **`filter` プロセッサーを追加する**:
`/_healthz` という名前のスパンを除外するように Gateway を設定します。`error_mode: ignore` ディレクティブにより、フィルタリング中に発生したエラーは無視され、パイプラインは問題なく動作し続けます。`traces` セクションでフィルタリングルールを定義し、`/_healthz` という名前のスパンを除外対象として指定します。

```yaml
filter/health: # Defines a filter processor
error_mode: ignore # Ignore errors
traces: # Filtering rules for traces
span: # Exclude spans named "/_healthz"
- 'name == "/_healthz"'
```

2. **`filter` プロセッサーを `traces` パイプラインに追加する**:
`filter/health` プロセッサーを `traces` パイプラインに含めます。最適なパフォーマンスを得るためには、フィルターをできるだけ早い段階、つまり `memory_limiter` の直後、`batch` プロセッサーの前に配置してください。設定は以下のようになります。

```yaml
traces:
receivers:
- otlp
processors:
- memory_limiter
- filter/health # Filters data based on rules
- resource/add_mode
- batch
exporters:
- debug
- file/traces
```

この設定により、ヘルスチェック関連のスパン (`/_healthz`) がパイプラインの早い段階でフィルタリングされ、テレメトリーデータの不要なノイズを削減できます。

{{% /notice %}}

<!--Validate the agent configuration using **[otelbin.io](https://www.otelbin.io/)**. For reference, the `traces:` section of your pipelines will look similar to this:-->

<!--
```mermaid
%%{init:{"fontFamily":"monospace"}}%%
graph LR
%% Nodes
REC1(&nbsp;&nbsp;otlp&nbsp;&nbsp;<br>fa:fa-download):::receiver
PRO1(memory_limiter<br>fa:fa-microchip):::processor
PRO3(resource<br>fa:fa-microchip<br>add_mode):::processor
PRO4(filter<br>fa:fa-microchip<br>health):::processor
PRO5(batch<br>fa:fa-microchip):::processor
EXP1(&ensp;debug&ensp;<br>fa:fa-upload):::exporter
EXP2(&ensp;&ensp;file&ensp;&ensp;<br>fa:fa-upload<br>traces):::exporter
%% Links
subID1:::sub-traces
subgraph " "
subgraph subID1["`**Traces**`"]
direction LR
REC1 -- > PRO1
PRO1 -- > PRO4
PRO4 -- > PRO3
PRO3 -- > PRO5
PRO5 -- > EXP1
PRO5 -- > EXP2
end
end
classDef receiver,exporter fill:#8b5cf6,stroke:#333,stroke-width:1px,color:#fff;
classDef processor fill:#6366f1,stroke:#333,stroke-width:1px,color:#fff;
classDef con-receive,con-export fill:#45c175,stroke:#333,stroke-width:1px,color:#fff;
classDef sub-traces stroke:#fbbf24,stroke-width:1px, color:#fbbf24,stroke-dasharray: 3 3;
```
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: 4.1 Configuration
linkTitle: 4.1 Configuration
weight: 1
---

このステップでは、`agent.yaml` を変更して `attributes` プロセッサーと `redaction` プロセッサーを追加します。これらのプロセッサーは、span 属性内の機密データがログ出力やエクスポートの前に適切に扱われるようにするのに役立ちます。

これまでに、コンソールに表示された一部の span 属性に個人情報や機密データが含まれていることに気づいた方もいるかもしれません。ここでは、こうした情報を効果的にフィルタリングして秘匿化するために必要なプロセッサーを設定します。

```text
Attributes:
-> user.name: Str(George Lucas)
-> user.phone_number: Str(+1555-867-5309)
-> user.email: Str(george@deathstar.email)
-> user.account_password: Str(LOTR>StarWars1-2-3)
-> user.visa: Str(4111 1111 1111 1111)
-> user.amex: Str(3782 822463 10005)
-> user.mastercard: Str(5555 5555 5555 4444)
{"kind": "exporter", "data_type": "traces", "name": "debug"}
```

{{% notice title="演習" style="green" icon="running" %}}

**Agent ターミナル** ウィンドウに切り替えて、エディターで `agent.yaml` ファイルを開いてください。テレメトリーデータのセキュリティとプライバシーを強化するため、2つのプロセッサーを追加します。

**1. `attributes` プロセッサーを追加する**: [**Attributes Processor**](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor) を使用すると、span 属性(タグ)の値を更新、削除、またはハッシュ化することで変更できます。これは、エクスポート前に機密情報を難読化する際に特に役立ちます。

このステップでは、以下を実施します。

1. `user.phone_number` 属性を静的な値 `("UNKNOWN NUMBER")` に **更新** します。
2. `user.email` 属性を **ハッシュ化** して、元のメールアドレスが露出しないようにします。
3. `user.password` 属性を **削除** して、span から完全に取り除きます。

```yaml
attributes/update:
actions: # Actions
- key: user.phone_number # Target key
action: update # Update action
value: "UNKNOWN NUMBER" # New value
- key: user.email # Target key
action: hash # Hash the email value
- key: user.password # Target key
action: delete # Delete the password
```

**2. `redaction` プロセッサーを追加する**: [**Redaction Processor**](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/redactionprocessor) は、クレジットカード番号やその他の個人を特定できる情報(PII)など、事前定義されたパターンに基づいて span 属性内の機密データを検出して秘匿化します。

このステップでは、以下を実施します。

- `allow_all_keys: true` を設定して、すべての属性が処理されるようにします(`false` に設定すると、明示的に許可されたキーのみが保持されます)。

- `blocked_values` に正規表現を定義して、**Visa** および **MasterCard** のクレジットカード番号を検出して秘匿化します。

- `summary: debug` オプションは、デバッグ目的で秘匿化処理に関する詳細情報をログに記録します。

```yaml
redaction/redact:
allow_all_keys: true # If false, only allowed keys will be retained
blocked_values: # List of regex patterns to block
- '\b4[0-9]{3}[\s-]?[0-9]{4}[\s-]?[0-9]{4}[\s-]?[0-9]{4}\b' # Visa
- '\b5[1-5][0-9]{2}[\s-]?[0-9]{4}[\s-]?[0-9]{4}[\s-]?[0-9]{4}\b' # MasterCard
summary: debug # Show debug details about redaction
```

**`traces` パイプラインを更新する**: 両方のプロセッサーを `traces` パイプラインに統合します。最初は redaction プロセッサーをコメントアウトしておくようにしてください(後の別の演習で有効化します)。設定は次のようになります。

```yaml
traces:
receivers:
- otlp
processors:
- memory_limiter
- attributes/update # Update, hash, and remove attributes
#- redaction/redact # Redact sensitive fields using regex
- resourcedetection
- resource/add_mode
- batch
exporters:
- debug
- file
- otlphttp
```

{{% /notice %}}

<!--
Validate the agent configuration using **[otelbin.io](https://www.otelbin.io/)**. For reference, the `traces:` section of your pipelines will look similar to this:

```mermaid
%%{init:{"fontFamily":"monospace"}}%%
graph LR
%% Nodes
REC1(&nbsp;&nbsp;otlp&nbsp;&nbsp;<br>fa:fa-download):::receiver
PRML(memory_limiter<br>fa:fa-microchip):::processor
PRRD(resourcedetection<br>fa:fa-microchip):::processor
PRRS(resource<br>fa:fa-microchip<br>add_mode):::processor
PRBA(batch<br>fa:fa-microchip):::processor
PRUP(attributes<br>fa:fa-microchip<br>update):::processor
EXP1(otlphttp<br>fa:fa-upload):::exporter
EXP2(&ensp;&ensp;debug&ensp;&ensp;<br>fa:fa-upload):::exporter
EXP3(file<br>fa:fa-upload):::exporter

%% Links
subID1:::sub-traces
subgraph " "
subgraph subID1["`**Traces**`"]
direction LR
REC1 -- > PRML
PRML -- > PRUP
PRUP -- > PRRD
PRRD -- > PRRS
PRRS -- > PRBA
PRBA -- > EXP2
PRBA -- > EXP3
PRBA -- > EXP1
end
end
classDef receiver,exporter fill:#8b5cf6,stroke:#333,stroke-width:1px,color:#fff;
classDef processor fill:#6366f1,stroke:#333,stroke-width:1px,color:#fff;
classDef con-receive,con-export fill:#45c175,stroke:#333,stroke-width:1px,color:#fff;
classDef sub-traces stroke:#fbbf24,stroke-width:1px, color:#fbbf24,stroke-dasharray: 3 3;
```
-->
Loading