Python script to monitoring hosts in network