Global Constant
Steve Nay's ramblings

Getting more detailed stats on KRL applications with the Ruby gem

A couple months ago, Kynetx released a new version of their Ruby gem, which added support for getting statistics on your apps. A limited version of this facility was available in the old AppBuilder, but the feature was removed when the current AppBuilder rolled out last April.

There is a bare-bones command, krl stats, that will give you a simple run-down of your app’s stats for yesterday. It looks like this:

But if you want to get information in any more depth, you’ll have to learn the somewhat complex krl stats_query syntax. First run krl stats_interface to list all the possibilities. Let’s say for this example that I want to know how many rules were fired per day of the week for the last three months. I would construct a query like this:

krl stats_query -k rules_fired -d day_of_week -r last_three_months

That produces something like this:

I haven’t figured out how to specify multiple KPIs or dimensions, though. For example, I might want a report that gave me both BRSE and rules fired, or perhaps one that correlated the day/month/year with the day of the week. I have an open question on StackOverflow that should hopefully clear that up.