import os
def __run__(params):
try:
flag = params.get('file_flag')
if os.path.exists(flag):
return [2, 'CRITICAL - file flag %s please check them problem and remove the file' % flag]
else:
return [0, 'OK']
except Exception as e:
return [2, 'CRITICAL - Problems with check %s' % repr(e)]