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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...