Hi
I am looking at google for this solution
i got few commands to do that… but i cant figured it out ,
example my code
result = JSON.parse(response.body)
result.each do |key,value|
#if k.has_value?'CHECK_NRPE: Socket timeout
after 10 seconds’
puts
“-----------------------------------------------”
puts key[“host_display_name”]
#reference properties like this
puts key[“plugin_output”] # this is
the result in object form
puts key[“display_name”]
puts key[“last_time_critical”]
puts
“------------------------------------------------”
#end
end
Basically the output is like :
myserver.home.lan
CHECK_NRPE: Socket timeout after 10 seconds.
Memory Load
1355046656
What i am after is
if key[“plugin_output”] == “CHECK_NRPE: Socket timeout after 10
seconds.”
puts key[“host_display_name”] #reference properties like this
end
but that doe not work
also if i try
if result.has_value?‘CHECK MAINT: MAINTANANCE MODE ENABLED ON HOST’
stil it through the error
Can any one please give me some light on this
Thanks