In the present paper, a multilevel approach for the local nanobuckling analysis of carbon nanotube (CNT) based composite materials is proposed and described. The approach comprises four levels, all of them at nanoscale. The first level aims to propose the potential that describes the interatomic forces between carbon atoms. In the second level, molecular dynamics simulations are performed to extract the elastic properties of the CNT. The third level aims to determine the stiffness of the material that surrounds the CNT (matrix), using the annular membrane analysis. In the fourth level, finite strip analysis of the CNT elastically restrained by the matrix is performed to calculate the critical strain at which the CNT buckles locally. In order to achieve accurate results and take the CNT-matrix interaction into account, the $3^{rd}$ and $4^{th}$ steps may be repeated iteratively until convergence is achieved. The proposed multilevel approach is applied to several CNTs embedded in a cylindrical representative volume element and illustrated in detail. It shows that (i) the interaction between the CNT and the matrix should be taken into account and (ii) the buckling at nanoscale is sensitive to several types of local buckling modes.