wazuh-kibana-app/public/templates/agents.html
2016-08-15 13:48:54 +00:00

172 lines
11 KiB
HTML

<div flex ng-controller="agentsController" layout="column">
<md-content class="md-padding">
<md-nav-bar md-selected-nav-item="menuNavItem" nav-bar-aria-label="navigation menu">
<md-nav-item id="header_logo" md-nav-href="#/" name="wazuh" aria-label="img logo">
<img aria-label="Logo image" src="/plugins/wazuh/icon.png" height="44" weight="252"></img>
</md-nav-item>
<md-nav-item md-nav-href="#/dashboards" name="dashboards">Dashboards</md-nav-item>
<md-nav-item md-nav-href="#/agents" name="agents">Agents</md-nav-item>
<md-nav-item md-nav-href="#/manager" name="manager">Manager</md-nav-item>
<md-nav-item md-nav-href="#/ruleset" name="ruleset">Ruleset</md-nav-item>
<md-nav-item md-nav-href="#/settings" name="settings">Settings</md-nav-item>
</md-nav-bar>
</md-content>
<md-progress-linear md-mode="indeterminate" ng-show="load"></md-progress-linear>
<div flex layout="row" ng-if="!load">
<md-content flex id="content" layout-padding>
<md-toolbar class="md-hue-3" style="height: 64px;">
<div class="md-toolbar-tools" layout="row" layout-align="space-between center">
<h2 ng-show="_agent">{{_agent.id}} - {{_agent.name}} <span ng-show="_agent.id == '000'">(Manager)</span></h2>
<h2 ng-show="!_agent">Select an agent to start visualizing data</h2>
<span layout="row" flex="40">
<md-autocomplete flex md-no-cache="true" md-selected-item="_agent" md-selected-item-change="fetchAgent(_agent)" md-search-text="search"
md-items="item in agentsSearch(search)" md-item-text="item.name" md-min-length="1" md-no-asterisk="true" md-menu-class="autocomplete-custom-agents-bar"
placeholder="Search agent hostname, ID or IP address">
<md-item-template>
<span class="item-title">
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{item.name}} ({{item.id}}) </strong></span>
</span>
<span class="item-metadata">
<span class="item-metastat" md-highlight-text="search" md-highlight-flags="i"> {{item.ip}} ({{item.status}}) </span>
</span>
</md-item-template>
<md-not-found>
No agents matching "{{search}}" were found.
</md-not-found>
</md-autocomplete>
<md-button class="md-fab md-primary md-mini" aria-label="Add agent">
<i class="fa fa-plus" aria-hidden="true"></i>
</md-button>
</span>
</div>
</md-toolbar>
<md-content ng-show="_agent" class="md-padding">
<md-nav-bar md-selected-nav-item="submenuNavItem" nav-bar-aria-label="navigation submenu">
<md-nav-item md-nav-href="#/agents" name="overview">Overview</md-nav-item>
<md-nav-item md-nav-href="#/agents/alerts" name="alerts">Alerts</md-nav-item>
<md-nav-item md-nav-href="#/fim" name="fim">File Integrity</md-nav-item>
<md-nav-item md-nav-href="#/policy_monitoring" name="policy_monitoring">Policy Monitoring</md-nav-item>
</md-nav-bar>
</md-content>
<md-content ng-show="_agent" class="md-padding">
<md-content layout="row" class="md-padding" layout-align="end">
<md-button class="md-raised md-primary">Discover alerts <i class="fa fa-external-link" aria-hidden="true"></i></md-button>
<md-button ng-disabled="true" class="md-raised md-primary" layout="row" layout-align="space-between center"><span>{{_agent.status}}</span><span ng-class="getAgentStatusClass(_agent.status)" class="round status"></span></md-button>
</md-content>
<md-card>
<md-card-title>
<md-card-title-text>
<span class="md-subhead">Agent alerts last 7 days</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px;" vis-type="histogram" vis-index-pattern="ossec-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'1h',customLabel:'Agent alerts last 7 days',extended_bounds:(),field:'@timestamp',interval:h,min_doc_count:1),schema:segment,type:date_histogram)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,mode:stacked,scale:linear,setYExtents:!f,shareYAxis:!t,times:!(),yAxis:()),title:'Agentbalerts last 7 days',type:histogram))"
vis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))" vis-filter="{{_agent.name ? 'AgentName:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
<md-content layout="row">
<md-card flex="40">
<md-card-content>
<div layout="column" flex>
<p><b style="margin-right: 5px;">Hostname:</b> {{_agent.name}}</p>
<p><b style="margin-right: 5px;">IP address:</b> {{_agent.ip}}</p>
<p><b style="margin-right: 5px;">Agent version:</b> {{agentInfo.version}}</p>
<p><b style="margin-right: 5px;">Operating system:</b> {{agentInfo.os}}</p>
<p><b style="margin-right: 5px;">Last file integrity scan:</b> {{agentInfo.syscheckEndTime}}</p>
<p><b style="margin-right: 5px;">Last policy monitoring scan:</b> {{agentInfo.rootcheckEndTime}}</p>
<p ng-show="_agent.id != '000'"><b style="margin-right: 5px;">Last keep alive:</b> {{agentInfo.lastKeepAlive}}</p>
<p ng-show="_agent.id != '000'" ng-click="showKey = !showKey"><b style="margin-right: 5px;">Agent key <i ng-show="!showKey" class="fa fa-caret-down" aria-hidden="true"></i><i ng-show="showKey" class="fa fa-caret-up" aria-hidden="true"></i></b></p>
<pre ng-if="showKey">{{agentInfo.key}}</pre>
</div>
</md-card-content>
</md-card>
<md-card flex="30">
<md-card-title>
<md-card-title-text>
<span class="md-subhead">Top 10 alerts by type</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px;" vis-type="pie" vis-index-pattern="ossec-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:rule.description,order:desc,orderBy:'1',size:10),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'Top 10 alerts by type',type:pie))"
vis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))" vis-filter="{{_agent.name ? 'AgentName:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="30">
<md-card-title>
<md-card-title-text>
<span class="md-subhead">Top 10 file changes</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px;" vis-type="pie" vis-index-pattern="ossec-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:SyscheckFile.path,order:desc,orderBy:'1',size:10),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'Top 10 file changes',type:pie))"
vis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))" vis-filter="{{_agent.name ? 'AgentName:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-content layout="row">
<md-card flex="40">
<md-card-title>
<md-card-title-text>
<span class="md-subhead">Top 10 source IP</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px;" vis-type="histogram" vis-index-pattern="ossec-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:srcip,order:desc,orderBy:'1',size:10),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'Top 10 source IP',type:pie))"
vis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))" vis-filter="{{_agent.name ? 'AgentName:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="60">
<md-card-title>
<md-card-title-text>
<span class="md-subhead">Alert level evolution</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px;" vis-type="line" vis-index-pattern="ossec-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'1h',extended_bounds:(),field:'@timestamp',interval:h,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:rule.AlertLevel,order:desc,orderBy:'1',size:10),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Alert level evolution',type:line))"
vis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))" vis-filter="{{_agent.name ? 'AgentName:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-content layout="row">
<md-card flex="40">
<md-card-content>
PLACEHOLDER
</md-card-content>
</md-card>
<md-card>
<md-card-title>
<md-card-title-text>
<span class="md-subhead">Last alerts summary</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px;" vis-type="table" vis-index-pattern="ossec-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:0,direction:desc)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'5',params:(customInterval:'1h',extended_bounds:(),field:'@timestamp',interval:auto,min_doc_count:1),schema:bucket,type:date_histogram),(enabled:!t,id:'6',params:(field:rule.description,order:desc,orderBy:'1',size:0),schema:bucket,type:terms),(enabled:!t,id:'7',params:(field:rule.AlertLevel,order:desc,orderBy:'1',size:0),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'Last alerts',type:table))"
vis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))" vis-filter="{{_agent.name ? 'AgentName:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
</md-content>
</md-content>
</div>
</div>