Share

Nagios Plugin Development

Tracker: Feature Requests

5 check_http needs an option to allow regex to span newlines - ID: 666952
Last Update: Attachment added ( jsellens )

I want to check a web page that has a number of status
entries for
various servers - I'd like to check a regular
expression that
contains all those servers, but they are on multiple
lines.

check_http.c sets REG_NEWLINE which means that regular
expressions
may not span newlines. This means that, in my case, I
must check
the web page multiple times.

Here is a patch that adds an option -l / --linespan
that turns off
REG_NEWLINE, thereby allowing regular expressions to
span newlines,
and allowing me to check only once in my tests.

I've also removed some duplication of error messages if
HAVE_REGEX_H
is not defined, hopefully making the code slightly
clearer.

This is a patch against check_http.c version 1.13
(current in CVS).

Cheers!

John
jsellens@generalconcepts.com


John Sellens ( jsellens ) - 2003-01-13 03:57

5

Open

None

Nobody/Anonymous

None

None

Public


Comments

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
check_http_patch check_http.c patch Download

Change ( 1 )

Field Old Value Date By
File Added 39582: check_http_patch 2003-01-13 18:14 jsellens