Diagnosis, prognosis and treatment of ecosystems under stress