LoginSignup
0
0

Splunk - コメントを残したい

Last updated at Posted at 2024-05-21

検証環境

Splunk Enterprise 9.2.1

はじめに

Splunkに限らず、作成したコマンドは第三者が見ても理解できるようにコメントを残してくれると嬉しいな!でもコメントでどうやって書くんだっけ?という話。

コメントの残し方

[1] 使い方

```コメント``` のようにバッククォートで囲むとコメントが可能。

SPL
index=* sourcetype="WinEventLog" ```Windowsイベントログを検索する```
| head 100 ```直近から100件をサンプリングする```
| stats count by app ```アプリの統計を算出する```

スクリーンショット 2024-05-21 8.33.38.png

Commentsの使い方はSearch Manualを参照
https://docs.splunk.com/Documentation/Splunk/9.2.1/Search/Comments

終わりに

SPLの構文エラーが出た際にも、どこまできちんと動作するのか切り分けに便利。切り分け方法はマニュアル見ればすぐに分かる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0