summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/cli.rb3
-rw-r--r--lib/oxidized/model/junos.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/oxidized/cli.rb b/lib/oxidized/cli.rb
index 0c87d53..fd766e3 100644
--- a/lib/oxidized/cli.rb
+++ b/lib/oxidized/cli.rb
@@ -18,10 +18,11 @@ module Oxidized
private
def initialize
- Log.info "Oxidized starting, running as pid #{$$}"
+ Log.info "Oxidized starting, running as pid #{$$} by #{ENV['USER']}"
_args, @opts = parse_opts
Oxidized.config.debug = true if @opts[:debug]
@pidfile = File.expand_path("pid")
+ Log.debug "pidfile: #{@pidfile}"
end
def crash error
diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb
index a02d588..1b641ca 100644
--- a/lib/oxidized/model/junos.rb
+++ b/lib/oxidized/model/junos.rb
@@ -54,7 +54,8 @@ class JunOS < Oxidized::Model
end
cmd('show chassis hardware detail') { |cfg| comment cfg }
cmd('show chassis routing-engine') do |cfg|
- cfg.gsub!(/(\S+\s+)(\d+)( percent)/, '\1<stripped>\3')
+ cfg.gsub!(/(\S+\s+)(\d{2})( percent)/, '\1<stripped>\3')
+ cfg.gsub!(/(\S+\s+)(\s\d{1})( percent)/, '\1<stripped>\3')
cfg.gsub!(/(\s+\d+ days,)(.+seconds)/, '\1 <stripped>\3')
cfg.gsub!(/(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)/, '\1<stripped>\3<stripped>\5<stripped>')
comment cfg