Check & use output of svcs command

Hello Dear Friends,

I need to check output of svcs command and so the status of some instances.

-bash-3.00$ svcs -a | grep rfe
online         Aug_04   svc:/application/rfe/rfe_master_3:default
online         Aug_04   svc:/application/rfe/rfe_master_4:default
as you can see there are two instances and operation team needs to be sure that they are running (online). 
If there is a sporadic issue occurs and they becomes down (offline) then they need to be restarted & invoked.

I would appreciate if you could tell me how could I check those output lines, namely $1 of those rows.. Afterwards i will compare them in an "if" statement and then do the necessary actions.

I thought about using awk with getline (getting the outputs special variable of awk and then checking) however I know how to use getline by giving an output file but dont know how to give the output of the commands..

KR,
Eagle

You can try something like this:

svcs -a | awk '!/^online/{print $NF " is " $1}'