#!/usr/bin/python
import linecache
def __run__(params):
status_file = params.get("status_file")
qtde = linecache.getline(status_file, 1).rstrip()
value = linecache.getline(status_file, 2).rstrip()
iqtde = int(qtde)
if (iqtde > params.get("qtde")):
return [2, "CRITICAL - %s itens with incorrect status: %s" % (qtde, value)]
else:
return [0, "OK - %s itens with incorrect status (<5)" % qtde]