Dashboards & Visualizations

ダッシュボードでのfieldsタグについて

pisc
Explorer

ダッシュボードでのXML作成について質問です。

<table>

<searchString>source="WinEventLog:Security" | regex EventCode="53[0-9]"</searchString>

<fields>Eventtime,ComputerName,Username</fields>

</table>

上記のXMLを使用することで、サーチ内容の結果についてEventtime,ComputerName,Usernameのテーブルリストが表示されるという認識でおりますが、テーブルの結果には何も表示されませんでした。
fieldsタグに常にインデックスされる「_time」や「sourcetype」等であればfieldsタグに記述して結果が表示されることを確認しております。

source="WinEventLog:Security"はWindowsイベントログのセキュリティログになり、フィールドとしては「Eventtime」や「ComputerName」が存在し、インデックスされています。

どのようにすれば、「常にインデックスされるフィールド」以外もダッシュボードで表示することができるでしょうか。

また、tableタグだけではなく、chartタグを使用してグラフを作成しても同様です。

以上、お願いします。

Tags (3)
0 Karma
1 Solution

bananaman
Path Finder

Simple XML上の<table>は基本レポーティングコマンド(stats,top,chartなど)の結果から
表示したいフィールドをにて指定するものとなります。

http://docs.splunk.com/Documentation/Splunk/5.0.3/Viz/Exampledashboard#Add_a_table

本ケースではシンプルなサーチ結果を特にレポーティングコマンドを経由せずにテーブル出力されたいものと思われますので、以下のようなサーチ文にtableコマンドを付与したSimple XMLにて要件を満たせるかと思われます。

※下記のフィールド指定はあくまで通常のサーチにて抽出出来たフィールド名から選択しています。

<table>

<searchString>sourcetype="WinEventLog:Security" | regex EventCode="53[0-9]" | table _time,ComputerName,アカウント名</searchString>

<title>table output</title>

<earliestTime>0</earliestTime>

<latestTime></latestTime>

</table>

末尾の"| table"コマンド配下のフィールド選択は原則フィールド抽出がされているものであれば
どのようなフィールドでも選択可能です。

View solution in original post

0 Karma

bananaman
Path Finder

Simple XML上の<table>は基本レポーティングコマンド(stats,top,chartなど)の結果から
表示したいフィールドをにて指定するものとなります。

http://docs.splunk.com/Documentation/Splunk/5.0.3/Viz/Exampledashboard#Add_a_table

本ケースではシンプルなサーチ結果を特にレポーティングコマンドを経由せずにテーブル出力されたいものと思われますので、以下のようなサーチ文にtableコマンドを付与したSimple XMLにて要件を満たせるかと思われます。

※下記のフィールド指定はあくまで通常のサーチにて抽出出来たフィールド名から選択しています。

<table>

<searchString>sourcetype="WinEventLog:Security" | regex EventCode="53[0-9]" | table _time,ComputerName,アカウント名</searchString>

<title>table output</title>

<earliestTime>0</earliestTime>

<latestTime></latestTime>

</table>

末尾の"| table"コマンド配下のフィールド選択は原則フィールド抽出がされているものであれば
どのようなフィールドでも選択可能です。

0 Karma

pisc
Explorer

ありがとうございます。
確認したところ、表示させたいフィールドのみが表示されました。

質問ばかりになってしまい申し訳ございませんが、chartでグラフを作るために同じようにする場合はどのようにすればいいでしょうか?

よろしくお願いします。

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...