DBINSTANCE  prod-v55  mysql 300 available

DBINSTANCE  prod-ro-db8-v55  mysql 400 available general-public-license
      SECGROUP  monitoring          active
      SECGROUP  prd-security-group  active

DBINSTANCE  prod-ro-db8-v65  mysql 450 available general-public-license
      SECGROUP  monitoring          active
      SECGROUP  prd-security-group  active

DBINSTANCE  prod-ro-db8-v75  mysql 400 available general-public-license
      SECGROUP  monitoring          active
      SECGROUP  prd-security-group  active

checkhash =
  { "checks" =>
      ["mysql_disk_usage+#{foo1}" => {
        "handlers" => ["default", "mailer_alerts"],
        "command" => "/etc/sensu/plugins/mysql-desk.rb -h -u -p
-s#{foo2}",
        "interval" => 300,
        "occurances" => 1,
        "subscribers" => ["urls"]
      }
  ]}.to_json

Hello, I am trying to implement the ruby split method to pull out
strings from the above chunk of data and then assign them to variables.
For each DBINSTANCE line I need the 2nd and 4th space delimited strings,
which I then will use to fill out a full hash.  My extra credit to
myself is to only pull string from the DBINSTANCE with the SECGROUP
monitoring.

-- 
Posted via http://www.ruby-forum.com/.