Nagios understands the following exit codes: 0 - Service is OK.; 1 - Service has a WARNING.; 2 - Service is in a CRITICAL status.; 3 - Service status is UNKNOWN.; A program can be written in any language to work as a Nagios check plugin. Based on the condition checked, the plugin can make Nagios aware of a malfunctioning service.