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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...