Someone recently challenged me to use Splunk for voting. Splunk is a versatile platform, why not make a voting app? Sigi and Stephen put the app together one afternoon and then I tested it out on a live audience during SplunkLive! San Francisco.
It worked like a charm and we gained insight from the audience. That’s when I realized, although it’s not a typical use case of Splunk, this app could be useful for others. From polling an audience during a presentation or even getting consensus from coworkers on a question during a meeting, maybe I should put the app on splunkbase.
— Nate McKervey (@DataPhysicist) March 16, 2016
I finally got around to publishing it. It consists of a few components. A webpage (thanks Sigi!)which users click a letter to cast their vote, the splunk vote app (thanks Stephen!) which displays the results, and the Lookup File Editor App for Splunk which makes it easy to create and edit the questions people will vote on. The webpage is a simple page that allows participants to select one more more answers and move on to the next question by touching the right arrow at the bottom.
When a user clicks on an answer an event, like the one below, is sent to your Splunk instance using the HTTP Event Collector.
The subject “SplunkLive! San Francisco” is created by appending to the URL. In this case “my.webserver.com/vote/?subject=SplunkLive!%20San%20Francisco“. Simply substitute it for whatever event or topic you want people to vote on. I recommend using a URL shortener so you can give participants a more friendly URL to type in.
To setup the questions simply click the “Edit Questions” link in the nav bar. Some example questions are in the app already. Change them to whatever you would like and make sure to set the subject to match the subject in the URL.
The event will appear in the “Select Event” dropdown. Selecting an event and a question in the dropdowns will populate the URL and question panels in the dashboard by pulling from the lookup table.
That’s it! Now you can have people vote on topics anytime anywhere using Splunk!
P.S. If you want to shake things up check this out next. https://github.com/splunk/parallel-piper
At .conf2015 attendees shook their phones hard enough it triggered a custom alert action in Splunk and launched Buttercup from a cannon! I’d love to see what others have come up with. Be sure to send me a message if you’ve done something with the shake or vote app.