6 :name => "/store/planet/planet/planet-latest.osm.bz2",
7 :title => "Planet Dump",
8 :frequency => 7 * 24 * 60 * 60
12 :name => "/store/planet/replication/day/state.txt",
13 :title => "Daily Replication",
14 :frequency => 24 * 60 * 60
18 :name => "/store/planet/replication/hour/state.txt",
19 :title => "Hourly Replication",
24 :name => "/store/planet/replication/minute/state.txt",
25 :title => "Minutely Replication",
30 if ARGV[0] == "config"
31 puts "graph_title Planet Age"
32 puts "graph_args --base 1000 --lower-limit 0"
34 puts "graph_vlabel fraction of expected max age"
35 puts "graph_category planet"
38 puts "#{file[:label]}.label #{file[:title]}"
39 puts "#{file[:label]}.type GAUGE"
40 puts "#{file[:label]}.warning 0:1.05"
41 puts "#{file[:label]}.critical 0:1.1"
46 value = (Time.now - File.mtime(file[:name])) / file[:frequency]
48 puts "#{file[:label]}.value #{value}"