update query script to fix error conditions
@@ -348,6 +348,7 @@ Available options:'
end
end.parse!
+begin
#puts $query.to_json
uri = URI.parse("#{$host}/api/v1/datapoints/query")
http = Net::HTTP.new(uri.host, uri.port)
@@ -376,5 +377,9 @@ if $monitor.monitor_set?
else
print_results(query_results)
end
+rescue => error
+ puts "Query failed: #{error}"
+ exit(5)
+end
