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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...