示例#1
0
def getArgs(param) :
	if param != None :	
		warning = param.get('warning')
		critical = param.get('critical')
		check_warning_critical = defaults.getDefaults (param.get('check'), warning, critical )

		if check_warning_critical != None :
			param['warning'] = check_warning_critical.get('warning')
			param['critical'] = check_warning_critical.get('critical') 
			print (monitor.getChecks (param))
		else : 
			getHelpText()
			sys.exit(0)
示例#2
0
def getArgs(param):
    if param != None:
        warning = param.get('warning')
        critical = param.get('critical')
        check_warning_critical = defaults.getDefaults(param.get('check'),
                                                      warning, critical)

        if check_warning_critical != None:
            param['warning'] = check_warning_critical.get('warning')
            param['critical'] = check_warning_critical.get('critical')
            print(monitor.getChecks(param))
        else:
            getHelpText()
            sys.exit(0)
示例#3
0
def getArgs(param) :
	if param != None :	
		warning = param.get('warning')
		critical = param.get('critical')
		check_warning_critical = defaults.getDefaults (param['check'], warning, critical )

		if check_warning_critical != None :
			param['warning'] = check_warning_critical['warning']
			param['critical'] = check_warning_critical['critical'] 
			print (monitor.getChecks (param))
		else : 
			if param['check'] in ['checkpoints','table_size','index_size', 'database_size','table_bloat','index_bloat' ] :
				print ('This check requires warning and/or critical value(s) to be correctly stated.')
			print ('Invalid command line arguments')
			sys.exit(0)