]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/files/default/plugins/chef_status
Remove munin
[chef.git] / cookbooks / munin / files / default / plugins / chef_status
diff --git a/cookbooks/munin/files/default/plugins/chef_status b/cookbooks/munin/files/default/plugins/chef_status
deleted file mode 100755 (executable)
index 6680c4a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/ruby
-
-require "json"
-
-nodes = JSON.parse(IO.popen(["/opt/chef/embedded/bin/knife", "status", "-c", "/var/lib/chef/.chef/knife.rb", "-F", "json"]).read).sort_by { |node| node["name"] }
-
-if ARGV[0] == "config"
-  puts "graph_title Chef node status"
-  puts "graph_args --base 1000 --logarithmic"
-  puts "graph_vlabel Time since last checkin"
-  puts "graph_category chef"
-
-  nodes.each do |node|
-    name = node["name"].split(".").first
-
-    puts "#{name}.label #{name}"
-    puts "#{name}.type GAUGE"
-    puts "#{name}.min 0"
-    puts "#{name}.warning 14400"
-    puts "#{name}.critical 43200"
-  end
-else
-  nodes.each do |node|
-    name = node["name"].split(".").first
-    time = Time.now.to_f - node["ohai_time"]
-
-    puts "#{name}.value #{time}"
-  end
-end