This App uses Node.js to collect web performance data (Web Timing metrics) beaconed from real end users using boomerang.js (a client-side JavaScript library developed by Yahoo!). The data sent by Boomerang to Node is written to /var/log/rum.log by default.
Download & install Node.js. See: http://nodejs.org/download/
node $SPLUNK_HOME/etc/apps/webperf/bin/node/test.js
Server running at http://127.0.0.1:7000
Hit http://127.0.0.1:7000 in your browser. Open ports as necessary.
sudo node $SPLUNK_HOME/etc/apps/webperf/bin/node/server.js
Server running at http://127.0.0.1:7000
Note: You must run server.js as root or someone with privledges to write to /var/log/
BOOMR.init({
beacon_url: 'http://node.mydomain.com:7000',
site_domain: "example.com",
user_ip: "{Client IP Address",
BW: { enabled: true,
base_url: "http://base_url/to/bandwidth/images/",
}
});
See: $SPLUNK_HOME/etc/apps/webperf/examples/example.html for a working example (View Soruce)
That's it! Data sent by boomerang.js should now be flowing into Splunk. Tail /var/log/rum.log to verify that you are receiving data.
To generate fake sample data, similar to that beaconed back by boomarang (that's a mouth full), use the data_gen.js node script.
node $SPLUNK_HOME/etc/apps/webperf/bin/node/data_gen.js
Note: This will create ~1 event/second for example.com until it reaches 1,000 events.
The beacon that sent to your server will contain several parameters. Each boomerang plugin also adds its own set of parameters.
*Source: http://lognormal.github.io/boomerang/*
Below is an example of the beaconed paramaters with the bandwidth & latency and navigation timing plugins enabled converted to JSON.
{
"v":"0.9",
"u":"file://localhost/Applications/Splunk/etc/apps/webperf/examples/example.html",
"rt.start":"navigation",
"rt.bstart":"1384457297300",
"rt.end":"1384457297303",
"t_done":"13",
"t_resp":"0",
"t_page":"13",
"r":"",
"t_other":"boomerang|2,boomr_fb|10",
"nt_red_cnt":"0",
"nt_nav_type":"1",
"nt_nav_st":"1384457297290",
"nt_red_st":"0",
"nt_red_end":"0",
"nt_fet_st":"1384457297290",
"nt_dns_st":"1384457297290",
"nt_dns_end":"1384457297290",
"nt_con_st":"1384457297290",
"nt_con_end":"1384457297290",
"nt_req_st":"1384457297290",
"nt_res_st":"1384457297290",
"nt_res_end":"1384457297290",
"nt_domloading":"1384457297295",
"nt_domint":"1384457297302",
"nt_domcontloaded_st":"1384457297302",
"nt_domcontloaded_end":"1384457297302",
"nt_domcomp":"1384457297303",
"nt_load_st":"1384457297303",
"nt_load_end":"0",
"nt_unload_st":"1384457297291",
"nt_unload_end":"1384457297291",
"bw":"NaN",
"bw_err":"NaN",
"lat":"24",
"lat_err":"0.84",
"bw_time":"1384457298",
"ua_raw":{"string":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36",
"clientip":"127.0.0.1"
}
Source: https://github.com/codycharris/splunk_web_performance
Fixed server.js and help documentation.
Updated for Splunk 6. New interactive dashboards.
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.