We were debugging a group of servers which were in a gray state and it was not a situation where all of the agents were gray reporting to a management server or a gateway server. In our situation, these computers were not displaying in the computer view. In the Agent Health State view they on the Agent State but not gray on the Agent State (right pane of the view below) from Health Service Watcher side (left pane of the view below).image

On these agents we found that the services were installed and running and communication was working correctly. After reviewing the Operations Manager event logs we found an indication that the Run As Profile had been configured to use an account which was no longer valid in the environment.

image

We fixed this by changing the Default action Account Run As account (Administration / Run As Configuration / Profiles – shown above) from an invalid Run As account to a correct one. Once this was done we restarted the servers which were in a gray state and they became healthy.

image

Summary: Gray agent state on some of your servers? You may want to check the Default Action Account Run As configuration for the servers reporting in as gray.