add check online function

Signed-off-by: Roman Gorbatko <romangorbatko@gmail.com>