Forum Discussion

Fab_46677's avatar
Fab_46677
Icon for Nimbostratus rankNimbostratus
Mar 23, 2016

Monitor regex

How do I interpret multiple lines returned as a regex?

 

I need a passing health check for all of the return conditions below...

 

  • About to connect() to x.x.x.x port 5000 (0)
  • Trying x.x.x.x... connected
  • Connected to x.x.x.x (x.x.x.x) port 5000 (0)

GET /healthcheck HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8Ä zlib/1.2.3 libidn/0.6.5 Host: x.x.x.x:5000 Accept: <5e8b83e0-cc61-4440-b2dd-20fb6ab3a303>/

 

  • HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Content-Type: text/html; charset=utf-8 < Content-Length: 85 < Server: Werkzeug/0.11.5 Python/2.7.5 < Date: Wed, 23 Mar 2016 17:51:51 GMT <

APP: OK

 

TOMCAT: OK

 

MAINTENANCE: False

 

HOSTNAME: healthcheck-dev

 

  • Closing connection 0

Can I use the & operator? And what would i use to designate a new line?

 

Appreciate any help.

 

1 Reply

  • Hi, what if you do something like this:

    Receive String:
    .*APP: OK.*TOMCAT: OK.*MAINTENANCE: False

    Regards.