HTTP monitoring states
Perform an HTTP query and statefully return the result
New in version 2015.5.0.
Perform an HTTP query and statefully return the result
Passes through all the parameters described in the utils.http.query function
:
Specifies the type of pattern matching to use. Default is string
, but can also be set to pcre
to use regular expression matching if a more complex pattern matching is required.
Note
Despite the name of match_type
for this argument, this setting actually uses Python's re.search()
function rather than Python's re.match()
function.
match
setting.If both match
and status
options are set, both settings will be checked. However, note that if only one option is True
and the other is False
, then False
will be returned. If this case is reached, the comments in the return data will contain troubleshooting information.
For more information about the http.query
state, refer to the HTTP Tutorial.
query_example: http.query: - name: 'http://example.com/' - status: 200
Like query but, repeat and wait until match/match_type or status is fulfilled. State returns result from last query state in case of success or if no successful query was made within wait_for timeout.
Note
All other arguments are passed to the http.query state.
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.http.html