lib/perus/pinger/pinger.rb in perus-0.1.12 vs lib/perus/pinger/pinger.rb in perus-0.1.13

- old
+ new

@@ -106,9 +106,13 @@ json = JSON.parse(RestClient.get(config_url)) json['metrics'] ||= [] json['actions'] ||= [] @system_id = json['id'] + if @system_id == 'nil' + raise 'This system is unknown to the server' + end + # load metric and command modules based on the config json['metrics'].each do |config| begin if ::Perus::Pinger.const_defined?(config['type']) metric = ::Perus::Pinger.const_get(config['type'])