Pipeline safety and monitoring