Я пытался работать с Regex, пытаясь найти множественные вхождения всех команд loadjob в исходном коде панели мониторинга, и с этим боролся.Это выполнимо?
Уже пытались, зная, что loadjob SavedSearch имеет "| loadjob SavedSearch =" пользователь: приложение: имя_прибора "
| rex field="source" max_match=0 ".*(?:b: loadjob.*=.*:.*:(?P<jobname>))\|* .*"
Исходный пример (это рассматривается как одна строка):
<form script="playground_v2.js" stylesheet="playground_v3.css">
<label>1st Line Clone</label>
<init>
<set token="PrioColor">0xfecb00</set> <set token="Prio1Color">0xe60000</set>
<set token="Prio2Color">0xa8b400</set> <set token="Prio3Color">0x9c2aa0</set>
<set token="Prio4Color">0xeb9700</set> <set token="Prio5Color">0x00b0ca</set>
</init>
<earliest>0</earliest> </search>
<search id="volume2">
<query> | loadjob savedsearch="reporting:fs_reporting:1st_Line_Volumes" | search Domain=$history_domain$ | eval month=if("$report$"=="raised",RaisedMonth,ResolvedMonth) | eval conta=if("$report$"=="raised and resolved" AND RaisedSameMonth==0,0,count) | where month>="$start_time$" AND month<="$end_time$" | eval _time=strptime(month."/01 00:00:00", "%Y/%m/%d %H:%M:%S") | stats sum(conta) as conta by _time, Priority
</query>
</search>
<search id="time2">
<query> | loadjob savedsearch="reporting:fs_reporting:1st_Line_Times" | search Domain=$history_domain$ | eval month=if("$report$"=="raised",RaisedMonth,ResolvedMonth) | where month>="$start_time$" AND month<="$end_time$" | eval _time=strptime(month."/01 00:00:00", "%Y/%m/%d %H:%M:%S")
</query>
</search>
<search id="sla2">
<query> | loadjob savedsearch="reporting:fs_reporting:1st_Line_SLA" | search Domain=$history_domain$ | eval month=if("$report$"=="raised",RaisedMonth,ResolvedMonth) | where month>="$start_time$" AND month<="$end_time$" | eval _time=strptime(month."/01 00:00:00", "%Y/%m/%d %H:%M:%S")
</query>
</search>
</form>
<form script="playground_v2.js" stylesheet="playground_v3.css"> <label>1st Line Clone</label> <init> <set token="PrioColor">0xfecb00</set> <set token="Prio1Color">0xe60000</set> <set token="Prio2Color">0xa8b400</set> <set token="Prio3Color">0x9c2aa0</set> <set token="Prio4Color">0xeb9700</set> <set token="Prio5Color">0x00b0ca</set> </init> <earliest>0</earliest> </search> <search id="volume2"> <query> | loadjob savedsearch="reporting:fs_reporting:1st_Line_Volumes" | search Domain=$history_domain$ | eval month=if("$report$"=="raised",RaisedMonth,ResolvedMonth) | eval conta=if("$report$"=="raised and resolved" AND RaisedSameMonth==0,0,count) | where month>="$start_time$" AND month<="$end_time$" | eval _time=strptime(month."/01 00:00:00", "%Y/%m/%d %H:%M:%S") | stats sum(conta) as conta by _time, Priority </query> </search> <search id="time2"> <query> | loadjob savedsearch="reporting:fs_reporting:1st_Line_Times" | search Domain=$history_domain$ | eval month=if("$report$"=="raised",RaisedMonth,ResolvedMonth) | where month>="$start_time$" AND month<="$end_time$" | eval _time=strptime(month."/01 00:00:00", "%Y/%m/%d %H:%M:%S") </query> </search> <search id="sla2"> <query> | loadjob savedsearch="reporting:fs_reporting:1st_Line_SLA" | search Domain=$history_domain$ | eval month=if("$report$"=="raised",RaisedMonth,ResolvedMonth) | where month>="$start_time$" AND month<="$end_time$" | eval _time=strptime(month."/01 00:00:00", "%Y/%m/%d %H:%M:%S") </query> </search> </form>
| rest /servicesNS/-/-/data/ui/views
| table Type author title eai:acl.app eai:data
| eval Type="Dashboards"
| rename author as Owner title as Name eai:acl.app as AppName eai:data as source search as source
| rex field="source" max_match=0 ".*(?:b: loadjob.*=.*:.*:(?P<jobname>))\|* .*"
То, что я хотел, - это получить все экземпляры в источнике «loadjob» на инструментальной панели и получить его имя задания в поле
В настоящее время я не получаю никакихРезультаты с ним