From b0ddada5d10d414788439d95865e145b231a1b4b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 19 Dec 2019 19:22:56 +0100 Subject: munin: Add 'currently checked in' counter --- lib/Travelynx/Command/munin.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Travelynx/Command/munin.pm b/lib/Travelynx/Command/munin.pm index 110e058..ee509d3 100644 --- a/lib/Travelynx/Command/munin.pm +++ b/lib/Travelynx/Command/munin.pm @@ -20,7 +20,7 @@ sub run { my $db = $self->app->pg->db; - my $now = DateTime->now( time_zone => 'Europe/Berlin' ); + my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $active = $now->clone->subtract( months => 1 ); my $checkin_window_query @@ -40,6 +40,8 @@ sub run { } )->hash->{count} ); + query_to_munin( 'checked_in', + $db->select( 'in_transit', 'count(*) as count' )->hash->{count} ); query_to_munin( 'checkins_24h', $db->query( $checkin_window_query, -- cgit v1.2.3