Nagios not accepting regex in command

Posted by Creshal on Server Fault See other posts from Server Fault or by Creshal
Published on 2011-12-21T12:25:22Z Indexed on 2012/07/03 15:18 UTC
Read the original article Hit count: 354

Filed under:
|

I have this command defined:

define command{
command_name check_http_sane
command_line $USER1$/check_http -H $HOSTNAME$ -r "HTTP/1.1 (200|301|302|303|304|307|401|418|426)"
}

When I run it manually on command line, it works fine, but nagios (2.6) reports a "pattern not found" error. Do I need to escape something?


Edit: As stated below, I solved it by replacing check_http with my own script which works (good enough for our use case, anyway). Script: http://pastebin.com/hNmz6Wa1

© Server Fault or respective owner

Related posts about nagios

Related posts about regex