Best Practice: Script timeout should be 300 seconds or more

 

What does this best practice check for?

Many workflows in your management pack may run scripts. Because there are often hundreds of workflows running at any given time in Operations Manager from many different sources, it is important to ensure that script timeouts are not so short that there is a possibility that the script will never execute. The best practice is that script timeouts be atleast300 seconds.

Why is it important to follow this best practice? What is the impact of not following this best practice?

Through your script not take very long to run in an MP test environment, keep in mind that in an actual customer environment, there are hundreds of workflows running at any given time in Operations Manager. As a result, the script could take longer to execute on a customer environment than it would on a test environment. It is recommended that the timeout be sufficiently high so that valid scripts do not timeout due to performance in a customer environment.

How can I fix this in my MP?

Using XML:

     < Discovery ID = " Microsoft.Windows.Server.2008.Computer.Discovery" Enabled =" onEssentialMonitoring" Target =" Windows!Microsoft.Windows.Server.Computer" >

       < Category > Discovery </ Category >

       < DataSource ID = " DS" TypeID =" Microsoft.Windows.Server.2008.Discovery.DataSource" >

         < IntervalSeconds > 86400 </ IntervalSeconds >

          < TimeoutSeconds > 360 </ TimeoutSeconds >

         < SourceId > $MPElement$ </ SourceId >

       </ DataSource >

     </ Discovery >