Slide 1

Slide 1 text

Monitor all the things @dmathieu

Slide 2

Slide 2 text

(Easily) Monitor all the things @dmathieu

Slide 3

Slide 3 text

Awesome app

Slide 4

Slide 4 text

Such features

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Product monitoring X new users this month.! X active users this month.! X users who left this month.! …

Slide 7

Slide 7 text

Let’s build a production monitoring dashboard

Slide 8

Slide 8 text

module Api module V1 class StatsController < ::Api::V1::BaseController respond_to :json ! def index stats = StatService.search(current_user, params[:ids], params[:query]) respond_with stats, root: :stats end ! def show service = StatService.find(current_user, params[:id]) respond_with service.subject end ! def create service = StatService.new(Stat.new) service.save(permitted_params, current_user) ! respond_with service.subject end ! def update service = StatService.find(current_user, params[:id]) service.save(permitted_params, current_user) ! respond_with service.subject end ! def destroy service = StatService.find(current_user, params[:id]) service.destroy(current_user) ! respond_with service.subject end ! private def permitted_params params.require(:stat).permit(*StatService.permitted_params) end end end end

Slide 9

Slide 9 text

Just kidding Remember the title of the talk? Easily Monitor all the things

Slide 10

Slide 10 text

What’s the easiest way to view data? SELECT date_trunc('month', users.created_at) as date, count(*) FROM users GROUP BY date ORDER BY date DESC;

Slide 11

Slide 11 text

Have you met data clips? https://dataclips.heroku.com https://github.com/mmcgrana/pgpin

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Are we done? Sure we’re not! What’s the way best to get an overall view of things?

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Postgres to Librato

Slide 17

Slide 17 text

Postgres to Librato https://github.com/ys/libraclips https://github.com/mmcgrana/ pg2librato

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

I now declare thee king of your own data

Slide 20

Slide 20 text

Thanks Questions? http://bit.ly/data-monitoring