Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (21 sloc) 0.622 kb
#!/usr/bin/ruby
#this is a base template for creating nagios plugins
#the file should be excuted using the following: basic_check.rb <warning> <critical> <min> <max>
#min and max are not required
#some scripts may not having a warning and may have other stuff
exit_code = 0
output_text = "Ok"
using_performance_data = true
performance_data = ""
perf_label = ""
value = 0
uom = ""
warning = ARGV[0]
critical = ARGV[1]
min = ARGV[2]
max = ARGV[3]
if using_performance_data
performance_data= "#{perf_label}=#{value}#{uom};#{warning};#{critical};#{min};#{max}"
end
puts output_text + " | "+performance_data
exit exit_code
Jump to Line
Something went wrong with that request. Please try again.