Hi I tried with fieldset in the form ..but its still fetch result based on first dropdown and runs the result Current Behavior: The dashboard fetches results immediately when the "env" dropdown is selected (e.g., "test" or "prod"). Results are fetched without considering other filters like "data entity" or "time." Expected behaviour The dashboard should wait for the user to: Select a value from the "env" dropdown (e.g., "test" or "prod"). Select a value from the "data entity" dropdown. Specify a time range. Only after all selections are made and the "Submit" button is clicked, the query should execute and fetch results. Could someone help on this .I tried adding fieldset <form version="1.1" theme="dark">
<label>Metrics222</label>
<fieldset>
<input type="dropdown" token="indexToken1" searchWhenChanged="false">
<label>Environment</label>
<choice value="prod-,prod,*">PROD</choice>
<choice value="np-,test,*">TEST</choice>
<change>
<eval token="stageToken">mvindex(split($value$,","),1)</eval>
<eval token="indexToken">mvindex(split($value$,","),0)</eval>
</change>
</input>
<input type="dropdown" token="entityToken" searchWhenChanged="false">
<label>Data Entity</label>
<choice value="*">ALL</choice>
</input>
<input type="time" token="timeToken" searchWhenChanged="false">
<label>Time</label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
</input>
</fieldset>
<row>
<panel>
<html id="APIStats">
<style>
#user{
text-align:center;
color:#BFFF00;
}
</style>
<h2 id="user">API USAGE STATISTICS</h2>
</html>
</panel>
</row>
<row>
<panel>
<table>
<title>Unique User / Unique Client</title>
<search>
<query>index=$indexToken$ AND source="/aws/lambda/g-lambda-au-$stageToken$"
| stats dc(claims.sub) as "Unique Users", dc(claims.cid) as "Unique Clients" BY claims.cid claims.groups{}
| rename claims.cid AS app, claims.groups{} AS groups
| table app "Unique Users" "Unique Clients" groups</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
</table>
</panel>
</row>
<row>
<panel>
<html id="nspCounts">
<style>
#user{
text-align:center;
color:#BFFF00;
}
</style>
<h2 id="user">NSP STREAM STATISTICS</h2>
</html>
</panel>
</row>
<row>
<panel>
<table>
<title>Unique Consumer</title>
<search>
<query>index="np" source="**"
| spath path=$stageToken$.nsp3s{} output=nsp3s
| sort -_time
| head 1
| mvexpand nsp3s
| spath input=nsp3s path=Name output=Name
| spath input=nsp3s path=DistinctAdminUserCount output=DistinctAdminUserCount
| search Name="*costing*"
| table Name, DistinctAdminUserCount</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
</table>
</panel>
<panel>
<table>
<title>Event Processed</title>
<search>
<query>index="$indexToken$" source="/aws/lambda/publish-$entityToken$-$stageToken$-nsp" "success Published to NSP3 objectType*"
| rex field=msg "objectType\s*:\s*(?<objectType>[^\s]+)"
| stats count by objectType</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
<panel>
<table>
<title>Number of Errors</title>
<search>
<query>index="$indexToken$" source="/aws/lambda/publish-$entityToken$-$stageToken$-nsp"
"error*" | stats count</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
</row>
<row>
<panel>
<title>API : Data/Search Count</title>
<html id="errorcount5">
<style>
#user{
text-align:center;
color:#BFFF00;
}
</style>
<h2 id="user"> API COUNT STATISTICS</h2>
</html>
</panel>
</row>
<row>
<panel>
<title>Total Request Data</title>
<table>
<search>
<query>(index=$indexToken$ source="/aws/lambda/api-data-$stageToken$-$entityToken$" OR source="/aws/lambda/api-commands-$stageToken$-*") ge:*:init:*:invoke
| spath path=event.path output=path
| spath path=event.httpMethod output=http
| eval Path=http + " " + path
|stats count by Path</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
<refresh>60m</refresh>
<refreshType>delay</refreshType>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
<panel>
<title>Total Request Search</title>
<table>
<search>rliest><query>index=$indexToken$ source IN ("/aws/lambda/api-search-$stageToken$-$entityToken$") ge:init:*:invoke
| spath path=path output=path
| spath path=httpMethod output=http
| eval Path=http + " " + path
|stats count by Path</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
<panel>
<title>Total Error Count :</title>
<table>
<search>rliest><query>index=$indexToken$ source IN ("/aws/lambda/api-search-$stageToken$-$entityToken$") msg="error*"
(error.status=4* OR error.status=5*)
| eval status=case(like(error.status, "4%"), "4xx", like(error.status, "5%"), "5xx") | stats count by error.status</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
<panel>
<title>Response Time Count in ms</title>
<table>
<search>rliest><query>index=np-papi source IN ("/aws/lambda/api-search-test-*") "ge:init:search:response"
| stats sum(responseTime) as TotalResponseTime, avg(responseTime) as AvgResponseTime
| eval API="Search API"
| eval TotalResponseTime = TotalResponseTime . " ms"
| eval AvgResponseTime = round(AvgResponseTime, 2) . " ms"
| table API, TotalResponseTime, AvgResponseTime
| append [
search index=np-papi source IN ("/aws/lambda/api-data-test-*") msg="ge:init:data:*"
| stats sum(responseTime) as TotalResponseTime, avg(responseTime) as AvgResponseTime
| eval API="DATA API"
| eval TotalResponseTime = TotalResponseTime . " ms"
| eval AvgResponseTime = round(AvgResponseTime, 2) . " ms"
| table API, TotalResponseTime, AvgResponseTime
]
| table API, TotalResponseTime, AvgResponseTime</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
</row>
<row>
<panel>
<html id="errorcount16">
<style>
#user{
text-align:center;
color:#BFFF00;
}
</style>
<h2 id="user">Request per min</h2>
</html>
</panel>
</row>
<row>
<panel>
<table>
<search>
<query>index=$indexToken$ source IN ("/aws/lambda/api-data-$stageToken$-$entityToken$","/aws/lambda/api-search-$stageToken$-$entityToken$") "ge:init:*:*"
| timechart span=1m count by source
| untable _time source count
| stats sum(count) as TotalCount, avg(count) as AvgCountPerMin by source
| eval AvgCountPerMin = round(AvgCountPerMin, 2)
| eval source = if(match(source, "api-data-test-(.*)"), replace(source, "/api-data-test-(.*)", "data-\\1"),
if(match(source, "/aws/lambda/api-data-prod-(.*)"), replace(source, "/aws/lambda/api-data-prod-(.*)", "data-\\1"),
if(match(source, "/aws/lambda/api-search-test-(.*)"), replace(source, "/aws/lambda/api-search-test-(.*)", "search-\\1"),
replace(source, "/aws/lambdaapi-search-prod-(.*)", "search-\\1"))))
| table source, TotalCount, AvgCountPerMin</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
</row>
<row>
<panel>
<title>SLA % :DATA API</title>
<table>
<search>
<query>index=$indexToken$ source IN ("/aws/lambdaapi-data-$stageToken$-$entityToken$") "ge:init:data:responseTime"
| eval SLA_threshold = 113
| eval SLA_compliant = if(responseTime <= SLA_threshold, 1, 0)
| stats count as totalRequests, sum(SLA_compliant) as SLA_passed by source
| eval SLA_percentage = round((SLA_passed / totalRequests) * 100, 2)
| eval API = "DATA API"
| table source, SLA_percentage, totalRequests, SLA_passed</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
<refresh>60m</refresh>
<refreshType>delay</refreshType>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
<panel>
<title>SLA % :SEARCH API</title>
<table>
<search>
<query>index=$indexToken$ source IN ("/aws/lambda/api-search-$stageToken$-$entityToken$") "ge:init:search:response:time"
| eval SLA_threshold = 100
| eval SLA_compliant = if(responseTime <= SLA_threshold, 1, 0)
| stats count as totalRequests, sum(SLA_compliant) as SLA_passed by source
| eval SLA_percentage = round((SLA_passed / totalRequests) * 100, 2)
| eval API = "SEARCH API"
| eval source = if(match(source, "/aws/lambda/api-search-test-(.*)"), replace(source, "/aws/lambda\api-search-test-(.*)", "search-\\1"), replace(source, "/aws/lambda/api-search-prod-(.*)", "search-\\1"))
| table source, SLA_percentage, totalRequests, SLA_passed</query>
<earliest>$timeToken.earliest$</earliest>
<latest>$timeToken.latest$</latest>
<refresh>60m</refresh>
<refreshType>delay</refreshType>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
</table>
</panel>
</row>
</form>
... View more