Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
dashboard review
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhemmarchand committed Sep 1, 2017
1 parent 0b37766 commit 8c699c8
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 394 deletions.
Binary file modified nmon-performance-monitor-for-unix-and-linux-systems_1911.tgz
Binary file not shown.
116 changes: 61 additions & 55 deletions nmon/default/data/ui/views/Nmon_Dark.xml
Original file line number Diff line number Diff line change
@@ -1,70 +1,76 @@
<form stylesheet="nmon:ui_simple.js,nmon:dark.css" hideFooter="true" hideSplunkBar="true" hideAppBar="true" hideChrome="true" hideEdit="true" hideTitle="true">
<label>Dark MONITORING</label>
<fieldset submitButton="false">
<fieldset submitButton="false">

<input type="time" token="time">
<label></label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
<!--
Reset the form token changed
-->
<change>
<unset token="form.refresh"></unset>
</change>
</input>
<input type="time" token="time">
<label></label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
</input>

<input type="dropdown" token="refresh" searchWhenChanged="true">
<label></label>
<choice value="30s">30 sec</choice>
<choice value="60s">1 min</choice>
<choice value="300s">5 min</choice>
<choice value="0">none</choice>
<default>30s</default>
</input>

<input id="host" type="dropdown" token="host" searchWhenChanged="true">
<label></label>
<search id="hostsSearch">
<query>| tstats count as count WHERE `nmon_index` sourcetype=nmon_data by host | sort 0 host </query>
<earliest>$time.earliest$</earliest>
<latest>$time.latest$</latest>
</search>
<prefix>host="</prefix>
<suffix>"</suffix>
<fieldForLabel>host</fieldForLabel>
<fieldForValue>host</fieldForValue>
<selectFirstChoice>true</selectFirstChoice>
</input>

</fieldset>

<!--
This input is an hidden input that intents to smartly configure the auto refresh feature
Assume that if the latest time range is higher or equal than 4 hours in delta with now, the auto refresh should be disabled.
As well, this form will be reset whenever the time range period is modified
Dynamic configuration
The following searches are being used to define various tokens using event handlers
-->

<input type="dropdown" token="autorefresh_detection" depends="$hidden_element$" searchWhenChanged="true">
<label>Is past data search ?:</label>
<search>
<query>| stats c | addinfo | eval now=now(), delta_now=now-info_max_time, is_past_search=if(delta_now>=14400, "true", "false") | fields is_past_search</query>
<earliest>$time.earliest$</earliest>
<latest>$time.latest$</latest>
</search>
<selectFirstChoice>true</selectFirstChoice>
<fieldForLabel>is_past_search</fieldForLabel>
<fieldForValue>is_past_search</fieldForValue>
<change>
<condition value="true">
<!-- autorefresh_detection -->

<search id="autorefresh_detection">
<query>| stats c | addinfo | eval now=now(), delta_now=now-info_max_time, is_past_search=if(delta_now>=14400, "true", "false") | fields is_past_search</query>
<earliest>$time.earliest$</earliest>
<latest>$time.latest$</latest>
<progress>
<condition match="'result.is_past_search'==&quot;true&quot;">
<set token="form.refresh">0</set>
</condition>
</change>
</input>
<condition match="'result.is_past_search'==&quot;false&quot;">
<unset token="form.refresh"></unset>
</condition>
</progress>
</search>

<input type="dropdown" token="refresh" searchWhenChanged="true">
<label></label>
<choice value="30s">30 sec</choice>
<choice value="60s">1 min</choice>
<choice value="300s">5 min</choice>
<choice value="0">none</choice>
<default>30s</default>
</input>
<row>
<panel>
<html>
<div style="color: white;">
<p>
form.refresh is $form.refresh$
refresh is $refresh$
</p>
</div>
</html>
</panel>
</row>

<input id="host" type="dropdown" token="host" searchWhenChanged="true">
<label></label>
<search id="hostsSearch">
<query>| tstats count as count WHERE `nmon_index` sourcetype=nmon_data by host | sort 0 host </query>
<earliest>$time.earliest$</earliest>
<latest>$time.latest$</latest>
</search>
<prefix>host="</prefix>
<suffix>"</suffix>
<fieldForLabel>host</fieldForLabel>
<fieldForValue>host</fieldForValue>
<selectFirstChoice>true</selectFirstChoice>
</input>

</fieldset>

<row>
<row>
<panel>
<single>
<search>
Expand Down
18 changes: 4 additions & 14 deletions nmon/default/data/ui/views/Nmon_Summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,6 @@
</search>
<fieldForLabel>host</fieldForLabel>
<fieldForValue>host</fieldForValue>
<!--
Reset the form token changed
-->
<change>
<unset token="CPU_datasource"></unset>
<unset token="CPU_datasource_minilabel"></unset>
<unset token="is_LPAR"></unset>
<unset token="is_not_LPAR"></unset>
<unset token="start_uptime_searches"></unset>
<unset token="start_disk_stats_search"></unset>
<unset token="start_dg_stats_search"></unset>
<unset token="start_df_storage_stats_search"></unset>
</change>
</input>

<input type="dropdown" token="span" searchWhenChanged="true">
Expand Down Expand Up @@ -119,13 +106,16 @@
<condition match="'result.is_past_search'==&quot;true&quot;">
<set token="form.refresh">0</set>
</condition>
<condition match="'result.is_past_search'==&quot;false&quot;">
<unset token="form.refresh"></unset>
</condition>
</progress>
</search>

<!-- OStype -->

<search id="OSType_detection">
<query>eventtype=nmon:performance $host$ | head 1 | stats count by OStype | fields OStype</query>
<query>eventtype=nmon:performance host=$host$ | head 1 | stats count by OStype | fields OStype</query>
<earliest>$timerange.earliest$</earliest>
<latest>$timerange.latest$</latest>
<progress>
Expand Down

0 comments on commit 8c699c8

Please sign in to comment.