我最近将过去的一些事件上传到 Splunk,因此
_time
字段不相关,但我有 START_TIME
字段包含相关数据_time
替换为 START_DATA
: index="reporter" PROJECT_NAME="pr1" | eval NewTime=strptime(START_TIME,"%Y-%m-%dT%H:%M:%S.%fZ") | eval _time=NewTime | ...
Time Period
下拉菜单来使用 START_DATE
而不是默认的 _time
:
<input type="time" token="Time Period">
<label>Time Period</label>
<search>
<query>index="reporter" PROJECT_NAME="pr1" | eval NewTime=strptime(START_TIME,"%Y-%m-%dT%H:%M:%S.%fZ") | eval _time=NewTime</query>
<earliest>@w0</earliest>
<latest>now</latest>
</search>
</input>
..但它不起作用:
Node <search> is not allowed here
时间输入字段无法执行搜索。可能的想法是时间范围定义了搜索,而不是相反。可用元素位于文档中 https://docs.splunk.com/Documentation/Splunk/9.1.1/Viz/PanelreferenceforSimplifiedXML#Shared_input_child_elements