Using http_check for 2 OR more strings


how can I get check_http to check for say either “Ready” or “paper” strings. This is, assume OK if either of the strings are present, but not necessarily at the same time.

The use - I want to check if my Xerox printers are “ok”. I can do a http check for the word “Ready” meaning all ok, or if it’s just out of paper “Paper out”. I don’t care to know if a machine has only run out of paper. The user will fix that when they get there to collect their printout.
I was trying 2 -s options, but that doesn’t appear to work. So I need an OR option. On the flip side, what if I wanted an AND operation it seems that I can put 2 -s strings to check and that does work OK.



wouldn’t it be better to do it the other way? looking for warning or error? Don’t know if it could work, depends from what strings could appear… :frowning:

If not it becomes regex stuff… can’t help you much there as i have problems myself with them… :slight_smile: there’s a software, regex coach, which may help you out finding the right regex you need in your check.