Search found 2 matches

by bellrd07
Thu Oct 26, 2017 2:18 pm
Forum: Nagios XI
Topic: Ruby require 'gem' issues
Replies: 4
Views: 1016

Re: Ruby require 'gem' issues

I am requiring the mysql2 gem. How would I run the script without requiring that gem? This is my simplified code. However, Nagios gets the return value from require 'mysql2' and ignores the rest of the output. #!/usr/bin/env ruby require 'mysql2' client = Mysql2::Client.new(:host => "host"...
by bellrd07
Thu Oct 26, 2017 12:12 pm
Forum: Nagios XI
Topic: Ruby require 'gem' issues
Replies: 4
Views: 1016

Ruby require 'gem' issues

When I write a check in Ruby and must require or load a gem the require statement returns true or false which causes nagios to ignore the rest of the script. Is there a way to get around this as it is causing nagios to exit with warning status and not read any of the actual output? Any tips would be...