|
@@ -98,7 +98,7 @@ def check_printer_queue(output_printer_queue):
|
|
|
printers.append( printer )
|
|
|
lidx += 1
|
|
|
|
|
|
- plugin.remember_check('All Printers', 0, '%d printer%s found' % (len(printers), len(printers) != 0 and 's' or ''), perfdata=[ {'label':'printers', 'value':len(printers), 'unit':''}, ] )
|
|
|
+ plugin.remember_check('All Printers', 0, '%d printer%s found' % (len(printers), len(printers) != 1 and 's' or ''), perfdata=[ {'label':'printers', 'value':len(printers), 'unit':''}, ] )
|
|
|
|
|
|
for p in printers_bad:
|
|
|
plugin.remember_check('%s' % p[0], 1, p[1])
|
|
@@ -137,7 +137,7 @@ def check_job_queue(output_job_queue):
|
|
|
perfdata = []
|
|
|
perfdata.append( { 'label':'jobs', 'value':'%d' % jobs, 'unit':'', } )
|
|
|
perfdata.append( { 'label':'jobs_old', 'value':'%d' % jobs_old, 'unit':'', } )
|
|
|
- plugin.remember_check('Jobs', 0, '%d job%s found' % (jobs, jobs != 0 and 's' or ''), perfdata=perfdata )
|
|
|
+ plugin.remember_check('Jobs', 0, '%d job%s found' % (jobs, jobs != 1 and 's' or ''), perfdata=perfdata )
|
|
|
|
|
|
for j in jobs_crit:
|
|
|
plugin.remember_check('Job %s' % j.split(' ')[0], 2, m.search(j).group(0) )
|