0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Splunk - ソースタイプの一覧を取得したい

Last updated at Posted at 2024-05-20

検証環境

Splunk Enterprise 9.2.1

はじめに

Splunkで今使ってるソースタイプ一覧をSPLで取得してみた話。

SPL

[1] metadata

SPL
| metadata type=sourcetypes index=*

スクリーンショット 2024-05-20 22.51.45.png

metadataコマンドの使い方はSearch Referenceを参照
https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Metadata

[2] tstats

SPL
| tstats count where index=* by sourcetype

スクリーンショット 2024-05-20 22.52.14.png

終わりに

metadataコマンドはソースタイプだけでなく、ソース、ホストのリストも表示する事が可能で便利。

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?