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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...