Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
Default dashboard: support multi-tenancy
Browse files Browse the repository at this point in the history
  • Loading branch information
siacomuzzi committed Sep 10, 2014
1 parent c5765b6 commit 97fe060
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
local
metadata
node_modules
*.log
5 changes: 2 additions & 3 deletions bin/app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@
try {
var event = new Event({
stanza: singleInput.domain,
sourcetype: 'auth0',
sourcetype: 'auth0_logs',
data: JSON.stringify(logs[i]), // Have Splunk index our event data as JSON
time: Date.parse(logs[i].date) // Set the event timestamp to the time of the log
});

eventWriter.writeEvent(event);
logCheckpoint = logs[i]._id;

Expand Down
31 changes: 15 additions & 16 deletions default/data/ui/views/logins_dashboard.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<dashboard>
<form>
<label>Logins dashboard</label>
<!-- First row of a single comment -->
<row>
<!-- Static content, remove upon editing-->
<html>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nec diam rhoncus eros mattis vestibulum ut et lorem. Nam a sapien ac mi tincidunt consequat quis eu nulla. In hac habitasse platea dictumst. Duis luctus tempor leo, accumsan scelerisque libero varius porttitor. Cras rutrum hendrerit tortor sed aliquam. Integer porta mauris id aliquet vestibulum. Vestibulum sollicitudin turpis eget eleifend aliquet.
</p>
</html>
<!-- End of static content -->
</row>
<fieldset submitButton="false" autoRun="true">
<input type="dropdown" token="auth0_tenant" searchWhenChanged="true">
<label>Data Input</label>
<selectFirstChoice>true</selectFirstChoice>
<populatingSearch earliest="$earliest$" latest="$latest$" fieldForLabel="source" fieldForValue="source">| metadata type=sources | search totalCount &gt; 0 | table source</populatingSearch>
<default>auth0://contoso</default>
</input>
</fieldset>
<row>
<panel>
<chart>
<title>Most frequent users</title>
<searchString>sourcetype=auth0 | top limit=10 user_name</searchString>
<searchString>source=$auth0_tenant$ | top limit=10 user_name</searchString>
<earliestTime>0</earliestTime>
<latestTime/>
<option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
Expand All @@ -40,7 +38,7 @@
<panel>
<chart>
<title>Most frequent connections</title>
<searchString>sourcetype=auth0 connection!=null | top limit=10 connection</searchString>
<searchString>source=$auth0_tenant$ connection!=null | top limit=10 connection</searchString>
<earliestTime>0</earliestTime>
<latestTime/>
<option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
Expand All @@ -50,7 +48,7 @@
<option name="charting.axisTitleY2.visibility">visible</option>
<option name="charting.axisX.scale">linear</option>
<option name="charting.axisY.scale">linear</option>
<option name="charting.axisY2.enabled">0</option>
<option name="charting.axisY2.enabled">false</option>
<option name="charting.axisY2.scale">inherit</option>
<option name="charting.chart">pie</option>
<option name="charting.chart.nullValueMode">gaps</option>
Expand All @@ -68,7 +66,7 @@
<panel>
<map>
<title>Login Locations</title>
<searchString>sourcetype=auth0 type=s | iplocation ip | geostats latfield=lat longfield=lon count by user_name</searchString>
<searchString>source=$auth0_tenant$ type=s | iplocation ip | geostats latfield=lat longfield=lon count by user_name</searchString>
<earliestTime>0</earliestTime>
<latestTime/>
<option name="mapping.data.maxClusters">100</option>
Expand All @@ -80,7 +78,8 @@
<option name="mapping.markerLayer.markerOpacity">0.8</option>
<option name="mapping.tileLayer.maxZoom">7</option>
<option name="mapping.tileLayer.minZoom">0</option>
<option name="drilldown">all</option>
</map>
</panel>
</row>
</dashboard>
</form>

0 comments on commit 97fe060

Please sign in to comment.