From 83ce82e72f55326ffdceb4d52ed0ee2c4da5f0a6 Mon Sep 17 00:00:00 2001 From: foo Date: Tue, 7 Jan 2014 10:43:18 +0000 Subject: [PATCH] added config generation --- getstations.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/getstations.pl b/getstations.pl index de9df3c..84eecba 100755 --- a/getstations.pl +++ b/getstations.pl @@ -9,6 +9,8 @@ $CatchmentId = shift @ARGV; print "Decoding...\n" if $DEBUG; $in = decode_json(<>) or die; + +print "# ln -s /path/to/river_levels_ /etc/munin/plugins/river_levels_$CatchmentId\n\n[river_levels_$CatchmentId]\nenv.urlbase http://path.to/service\nenv.catchmentname Name\nenv.stations " unless $DEBUG; foreach $station (@{$in->{data}}) { if ($station->{url} =~ /CatchmentId=$CatchmentId$/) { print "$station->{id}", $DEBUG ? ": $station->{station} on $station->{river}\n" : " ";