The purpose of this research is to predict failures (corrosion, cracks, laminations, joins or other) in pipelines carrying natural gas. Using the Bees Algorithm based on the behavior that perform in nature. The obtained results show the systematic occurrence of faults, which implies the need for preventive maintenance in pipelines to keep infrastructure and population security.Key words: Pipelines failures, Bees Algorithm, preventive maintenance.