Just like Siva, I am using blackbox exporter to monitor a soap endpoint. I was successful in simply getting a 200 back from the soap endpoint, but when we want to call a SOAP method, that's when things don't quite work. If I put the SOAP request envelop in the "body", something like the following:
<s:Body>
<PingResult>SUCCESS</PingResult>
</PingResponse>
</s:Body>
</s:Envelope>
and the
fail_if_not_matches_regexp:
- ".*SUCCESS.*"
I still get an unsuccessful probe saying:
ts=2018-05-02T14:51:18.2425291Z caller=http.go:354 module=http_2xx
If I use method: POST, with Content-Type: text/xml, I get the following error:
I checked in the blackbox code and found the following...
| // These constants cause handlers serving metrics to behave as described if |
| // errors are encountered. |
| const ( |
| // Serve an HTTP status code 500 upon the first error |
| // encountered. Report the error message in the body. |
| HTTPErrorOnError HandlerErrorHandling = iota |
| // Ignore errors and try to serve as many metrics as possible. However, |
| // if no metrics can be served, serve an HTTP status code 500 and the |
| // last error message in the body. Only use this in deliberate "best |
| // effort" metrics collection scenarios. It is recommended to at least |
| // log errors (by providing an ErrorLog in HandlerOpts) to not mask |
| // errors completely. |
| ContinueOnError |
| // Panic upon the first error encountered (useful for "crash only" apps). |
| PanicOnError |
| ) |
I was wondering, is the blackbox exporter not able to parse the SOAP response so it throws a 500? is it possible to parse a soap response or do i need to wrap my SOAP service in REST, which wouldn't be ideal since we want to call a healtchCheck function directly from a SOAP service.
Or does my soap need to expose a `probe_success` metric in a specific format?
Any help would be really appreciated.
Thank you!
Andrée-Anne