opmanager run command pass arguments

opmanager run command pass arguments

Hello,

I need help getting the run system command to work.  Here is the output from the logs when the command is triggered:
  1. ==> stdout1620.txt <==
    02:45:29:127 AM CHECK
    02:45:29:128 AM parsed_cmd ::: ruby /root/scripts/test "Device Down: No response from device for last 5 polls" "10.135.10.159" "Desktop" "Critical" "May 28,2010 07:22:54 PM"
    02:45:29:148 AM  Inside addNotificationLog
    02:45:29:332 AM Command Output  ::Arg 1: "Device, Arg 2: Down:, Arg 3: No



Here is the command:
  1. #!/usr/bin/env ruby

    first_arg = ARGV[0]
    sec_arg = ARGV[1]
    third_arg = ARGV[2]

    puts "Arg 1: #{first_arg}, Arg 2: #{sec_arg}, Arg 3: #{third_arg}"





And here is where I run the parsed command from the log on the command line:
  1. [root@ate ~]# ruby /root/scripts/test "Device Down: No response from device for last 5 polls" "10.135.10.159" "Desktop" "Critical" "May 28,2010 07:22:54 PM"
    Arg 1: Device Down: No response from device for last 5 polls, Arg 2: 10.135.10.159, Arg 3: Desktop
As you can see, it is not passing the arguments correctly, or at least, not the way I expect.  How do I get this to work correctly?





                  New to ADSelfService Plus?