No-Hassle Javascript Database

Need a really quick way to collect data from your web page? Don’t need a full-fledged backend on your signup page? Cheack out how you can use Loggr to simplify launching your next web page. http://loggr.net/go/no-hassle-javascript-database

Access Your Data From The Command Line

Hosting your event log with a service dedicated to the task comes with some benefits which are tough to find in a homegrown solution. One example is that Loggr provides a flexible query language for querying your data (See http://docs.loggr.net/api/lql). Another benefit is being able to access your data from anywhere. Today I’m going to show you a real quick example of how to take advantage of both of those benefits to gets some quick stats from your app.

Open a terminal window (or command prompt on Windows). I’m going to be using the program CURL to make some simple web requests from the command line. Most system have this already (or a similar utility). 

The first thing I’m going to do is get a list of people that have used my app today. The query is:

GET users OCCURS(TODAY) COLUMNS(username)

Using curl, we type (be sure to escape the spaces with + signs and include your Loggr apikey):

#curl "http://api.loggr.net/1/logs/testlog/query?query=GET+users+
OCCURS(TODAY)+COLUMNS(username)&apikey=4302702e3159c7"

We get back the following JSON response (truncated for brevity):

[{"username":"joe.burns"},{"username":"len.dryson"},
{"username":"mike.mcdonald"},{"username":"j.fung"},...

That was simple. Now let’s create an aggregate query to get a quick count of the users today. The query is:

GET users GROUPBY DAY OCCURS(TODAY) COLUMNS(KEY,COUNT)

Run that using curl:

#curl "http://api.loggr.net/1/logs/testlog/query?query=GET+users+
GROUPBY+DAY+OCCURS(TODAY)+COLUMNS(KEY,COUNT)&apikey=4302702e3159c7"

And we get:

[{"key":"5/23/2013","count":186}]

Pretty easy to do at the command line. Now imagine piping those results into a dashboard like Geckoboard, or Ducksboard. You can always create your own dashboard hosted right out of Dropbox. See how we

created a little sales graph in a previous post.

Post Events From Node.js

We have recently added a Node.js package for Loggr which makes it really easy to post and read events from your Node application. You can find the package here. For details on how to install and use it, check out our docs http://docs.loggr.net/agents/nodejs.

New Case Study: DoubleTakeDeals

DoubleTakeDeals uses Loggr in several of their products. Chris Walker, the Product Manager of their high-traffic deal site talks about the benefits he has seen over the past year by using Loggr for their monitoring. Click through the link below to read this new case study.

DoubleTakeDeals’ Loggr Case Study