Pathogens attack host cells by deploying toxins that perturb core host processes. Recent findings from the nematode C. elegans and other metazoans indicate that surveillance or "effector-triggered" pathways monitor functioning of these core processes and mount protective responses when they are perturbed. Despite a growing number of examples of surveillance immunity, the signaling components remain poorly defined. Here, we show that CEBP-2, the C. elegans ortholog of mammalian CCAAT-enhancer-binding protein gamma, is a key player in surveillance immunity. We show that CEBP-2 acts together with the bZIP transcription factor ZIP-2 in the protective response to translational block by P. aeruginosa Exotoxin A as well as perturbations of other processes. CEBP-2 serves to limit pathogen burden, promote survival upon P. aeruginosa infection, and also promote survival upon Exotoxin A exposure. These findings may have broad implications for the mechanisms by which animals sense pathogenic attack and mount protective responses.