- puts <<-END
-graph_args --base 1000
-graph_category passenger
-graph_title Passenger requests
-graph_vlabel requests / ${graph_period}
-
-requests.label requests
-requests.type DERIVE
-requests.max 1000000
-requests.min 0
-END
- exit 0
+ puts <<~CONFIG
+ graph_args --base 1000 --lower-limit 0
+ graph_category passenger
+ graph_title Passenger requests
+ graph_vlabel requests / ${graph_period}
+
+ total.label total
+ total.type DERIVE
+ total.max 1000000
+ total.min 0
+ CONFIG
+
+ groups = passenger_status.get_elements("//supergroup").map do |supergroup|
+ supergroup.text("name")
+ end
+
+ groups.sort.each do |name|
+ puts "#{name}.label #{name}"
+ puts "#{name}.type DERIVE"
+ puts "#{name}.max 1000000"
+ puts "#{name}.min 0"
+ end