I have already shown on how you can create the recovery task for Unix services in my previous blog Here. And that was meant to run when the state changes from healthy to critical. But personally, i didn't like that. So i feel its good to allow those services to be queries if its stopped or not, and only then run the recovery. Isnt that Cool!!
Here is how you can create a Diagnostic task for Unix/Linux services.
<!-- Add below lines just below the tag </Discoveries> and right above the tag <Recoveries> -->
<Diagnostic Accessibility="Public" ID="Microsoft.Unix.ACPID.Restart.Diagnostic" Remotable="true" Target="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService" Enabled="false" Timeout="300" ExecuteOnState="Error" Monitor="MicrosoftUnixServiceLibrary!Microsoft.Unix.Generic.Service.Monitor" Comment="In response">
<ProbeAction ID="Invoke" TypeID="Unix!Microsoft.Unix.SSHCommand.ProbeAction">
Once this is done, please add the Display string as well
<Description>WARNING: Running this diagnostic is unsecure, do not run this against machines you do not trust as it may expose credentials to an unknown system.</Description>
Also please make sure to edit your Recovery task Where you have an entry "ExecuteOnState="Error" Described in http://blogs.technet.com/b/chandanbharti/archive/2011/12/21/creating-the-recovery-task-for-linux-services-in-scom-2007.aspx
Remember, this is created under a custom MP. Next import the MP to the console. You should see your Diagnostic task created