From d494e4e0446e8025d3287823cff6b2db53ba3b71 Mon Sep 17 00:00:00 2001 From: kiranps Date: Tue, 22 Mar 2016 18:39:41 +0530 Subject: [PATCH] added inode details --- lib/monittr.rb | 5 ++++- lib/monittr/sinatra/template.erb | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/monittr.rb b/lib/monittr.rb index 82e3cc9..089c5be 100644 --- a/lib/monittr.rb +++ b/lib/monittr.rb @@ -116,7 +116,10 @@ def initialize(xml) :monitored => value('monitor', :to_i), :percent => value('block/percent', :to_f), :usage => value('block/usage' ), - :total => value('block/total' ) + :total => value('block/total' ), + :inode_percent => value('inode/percent', :to_f), + :inode_usage => value('inode/usage' ), + :inode_total => value('inode/total' ) } ) rescue Exception => e puts "ERROR: #{e.class} -- #{e.message}, In: #{e.backtrace.first}" diff --git a/lib/monittr/sinatra/template.erb b/lib/monittr/sinatra/template.erb index 506170a..b2c7a1b 100644 --- a/lib/monittr/sinatra/template.erb +++ b/lib/monittr/sinatra/template.erb @@ -30,12 +30,17 @@ @@ -59,6 +64,7 @@ memory: <%= process.memory || 'N/A' %> uptime: <%= time_in_words(process.uptime) || 'N/A' %> + <% end %>