OpsMgr agents not showing up in pending management
Hi,
It has been a long time since I worked with OpsMgr but I encountered a rather strange issue lately. Some manually installed agents sitting behind a Gateway were not showing up in pending management state so I couldn’t approve them, but other agents were fine. I even enabled “automatically approve new manually installed agents” for a while, reinstalled the agent but still nothing.
As some agents were reporting correctly and showing up immediately in pending management I had a look in the OpsMgr database. You can check which agents are in pending management with this SQL query (run on OperationsManager database). To view the database information on pending actions:
[xml]
select * from agentpendingaction
[/xml]
You can do the same with PowerShell. Open a command shell, and run the following:
[xml]Get-SCOMPendingManagement
[/xml]
To see a prettier view:
[xml]
Get-SCOMPendingManagement | ft agentname,agentpendingactiontype [/xml]
Now that we could see all our pending agents, you can approval them with Powershell with the –Approve-SCOMPendingManagement switch.
To approve them all
[xml]
Get-SCOMPendingManagement | Approve-SCOMPendingManagement
[/xml]
To approve specific agent
[xml]
Get-SCOMPendingManagement | where {$_.AgentName -eq “ServernameFQDN”} | Approve-SCOMPendingManagement
[/xml]
So once this worked I investigated a bit more to found out the root cause of this issue. It seemed that the agents that were stuck in agent pending state in the database had been installed before the final Gateway configuration was done to allow the gateway to act as proxy server. One final step for the gateway server is to configure it as a Proxy. In the Operations Console go to the Administration **space, then click on Management Servers then find the gateway box you just added, Double Click on it. In the Management Server Properties Click the Security tab. Check the box Allow this server to act as a proxy
Hope this helps,
Alex
Leave a comment