With my change you format a web page response like Nagios plugin output, put the numeric exit code in the X-NRPE-Status header, set the Content-Type to text/nagios and the check_http plugin behaves like check_nrpe.
Instead of having to parse the output of your own web applications to suit Nagios, why not have them output the status in that format already. You can view, comment on, or merge this pull request online at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1355 -- Commit Summary -- * Added NRPE like funtionality to check_http * Removed old get_content_length -- File Changes -- M plugins/check_http.c (66) -- Patch Links -- https://github.com/monitoring-plugins/monitoring-plugins/pull/1355.patch https://github.com/monitoring-plugins/monitoring-plugins/pull/1355.diff -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1355