Forum Discussion

jjh_43454's avatar
jjh_43454
Icon for Nimbostratus rankNimbostratus
Jun 09, 2009

how to add owa form-based monitor for Exchange 2007

Haven't seen anyone do this, so decided to share:

 

 

1. this is a modified version of code found on DevCentral - the line near the end of "curl_adex" that invokes curl is the only line changed

 

2. sftp attached file "curl_adex" to /usr/bin/monitors on your F5

 

3. chmod 700 curl_adex and chown root:root curl_adex

 

4. modify FOOUSER and FOOPASSWORD in curl_adex so that it's a valid user/password for your environment - make sure this password does not expire so your monitor doesn't break and mark your nodes down when they're really not down

 

5. setup monitor - see attached screenshot image

 

6. apply monitor to pool

 

7. test

7 Replies

  • That's very helpful. Thanks for posting the configuration. For future reference, here is the curl command used in the script:

     

     

    send request & check for expected response

     

    curl -fNs -L -c /tmp/cookies.txt -b /tmp/cookies.txt --connect-timeout 5 -d "destination=http://${IP}/owa/&flags=1&forcedownlevel=0&trusted=0&username=FOOUSER&password=FOOPASSWORD&isUtf8=1" http://${IP}:${PORT}${URI} | grep -i "${RECV}" 2>&1 > /dev/null

     

     

    Aaron
  • Will this work with https? We force SSL on the /owa virtual directory in IIS? I tried substituting https for the http URLS and it didnt work.

     

     

    Just wondering, do I need to do something different in that case?

     

     

    Thanks

     

     

    Dave
  • Will this work with https? We force SSL on the /owa virtual directory in IIS? I tried substituting https for the http URLS and it didnt work.

     

     

    Just wondering, do I need to do something different in that case?

     

     

    Thanks

     

     

    Dave
  • Hi Dave,

     

     

    For HTTPS pool members, try adding the -k flag to curl:

     

     

    curl -kfNs

     

     

    That will tell curl to ignore any insecure cert warnings.

     

     

    Aaron
  • Hi guys,

     

    I apologize for resurrecting this very old thread, but we have a current need to keep our 2007 Exchange environment online for a subset of users, and thus I'd like to implement this curl_adex forms-based monitor for OWA 2007. I searched on DevCentral and wasn't able to locate the script file. I am also unable to view the screenshot posted within this thread which shows the proper parameters/values to define when configuring this external monitor. I'm hoping one of you, or perhaps the legendary Hoolio, may be able to point me in the right direction.

     

    Thanks! Brian

     

    • Brian_Mayer_841's avatar
      Brian_Mayer_841
      Icon for Nimbostratus rankNimbostratus
      If the curl_adex external script is formatted the same as some of the other built-in Exchange iApp external/script health monitor templates (for 2010/2013), please let me know. Maybe I can merge what Aaron provided above with what I see in those monitors.
    • Brian_Mayer_841's avatar
      Brian_Mayer_841
      Icon for Nimbostratus rankNimbostratus
      Surprised no one can help with this... So I know the format of the 'typical' external monitor templates I've seen within iApps essentially looks for the presence (e.g. 0 or 1 return code) of a string pattern variable (defined as RECV). To take the RECV string comparison match out of the equation, I am manually running the curl command against the pool members. However, the curl command line Aaron provided above, when run directly against the pool members, only results in an HTTP 440 Login Timeout error. So it seems to me that my URI variable must be invalid. I am able to login to OWA directly on each pool member using the account credentials so I know those are good. I don't see any mention of the correct URI variable in this entire thread, so I tried using /owa/. No such luck. Does anyone know the correct values for URI and RECV for the curl line above? If I can get the right URI, I'll find a RECV to grep for in the output. Any help is much appreciated.