This Is Beacon
Beacon Data
Beacon receives page-load and bandwidth performance data generated by a Boomerang instance setup on a host and passes that data into Splunk for parsing and graphing.
Using Beacon
Using Beacon is easy! Just clone the Boomerang code into some location in your website, and then add the javascript on each page you want to track. Adding the javascript to multiple pages will help you track performance data across your site. Since Boomerang is written entirely in javascript, that's all that needs to be added to the server.
Clone:
git clone https://github.com/lognormal/boomerang.git boomerang
Include the Boomerang JavaScript:
<script src="boomerang/boomerang.js" type="text/javascript"></script>
<script src="boomerang/plugins/bw.js" type="text/javascript"></script>
<script src="boomerang/plugins/navtiming.js" type="text/javascript"></script>
<script src="boomerang/plugins/rt.js" type="text/javascript"></script>
And load Boomerang to send the data back to Beacon:
<script type="text/javascript">
BOOMR.init({
beacon_url: "https://beacon.oit.duke.edu/beacon.php",
user_ip: "your.users.ip.addr",
BW: {
base_url: 'images/',
cookie: 'HOWTO-BA'
},
RT: {
cookie: 'HOWTO-RT'
}
});
</script>
Viewing the Data in Splunk
Data sent to Beacon is automatically sent to OIT's Splunk Instance. The raw data is stored in http request query strings, and can be found in the results for "web-beacon-01.oit.duke.edu" in the "web" index. Graphs or report can be generated from this data. For example, the following search query:
index=web host=web-beacon-01* uri_path="/beacon.php" u=*beacon.oit.duke.edu*| timechart avg(t_page)
...produces a bar graph of page load times for the website "beacon.oit.duke.edu":