You should check why those machines didn't communicate to ePO from a month. Are they in network? Are you able to ping the ePO server and able to telnet on agent ports?
Yes I can ping ePO server, Machines are in network only. I also checked the machines which are communicating with ePO( This means telenet on agent ports working fine right)
I apologize but not clear. When the machines are in the network, they are communicating to ePO. They are in the network then next possibilty I can think of that you modified the query and set the lower value from 30 days of default Inactive agent query.