From 1da216558e9392d3465dba2e6bb79d0221e43c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20Heum=C3=BCller?= Date: Tue, 16 May 2017 14:21:04 +0200 Subject: fortios.rb fortios_autoupdate remove FDS Address The output of "diagnose autoupdate version" contains the FortiGuard Distribution Server (FDS) address. This IP address changes several times per week and therefore versioning is hardly possible. Added a line to remove the IP address when fortios_autoupdate is set true. --- lib/oxidized/model/fortios.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb index cdaa282..0249933 100644 --- a/lib/oxidized/model/fortios.rb +++ b/lib/oxidized/model/fortios.rb @@ -38,6 +38,7 @@ class FortiOS < Oxidized::Model #do not include if variable "show_autoupdate" is set to false if defined?(vars(:fortios_autoupdate)).nil? || vars(:fortios_autoupdate) cfg << cmd('diagnose autoupdate version') do |cfg| + cfg.gsub! /(FDS Address\n---------\n).*/, '\\1IP Address removed' comment cfg.each_line.reject { |line| line.match /Last Update|Result/ }.join end end -- cgit v1.2.1