POLICY::rules

Description

Returns the policy rules of the supplied policy that had actions executed.

Syntax

POLICY::rules matched <policy>

POLICY::rules matched <policy>

  • Returns the policy rules of the supplied policy that had actions executed.

Examples

# Log the policy targets for this virtual server
when HTTP_REQUEST {

    log local0. "Looping through \[POLICY::names matched\]: [POLICY::names matched]"
    foreach policy [POLICY::names matched] {
        log local0. "\[POLICY::rules matched $policy\]: [POLICY::rules matched $policy]"
    }
}

# /var/log/ltm output:
<HTTP_REQUEST>: Looping through [POLICY::names matched]: /Common/serverssl_policy /Common/uri_to_pool_policy
<HTTP_REQUEST>: [POLICY::rules matched /Common/serverssl_policy]: serverssl_disable_default_rule
<HTTP_REQUEST>: [POLICY::rules matched /Common/uri_to_pool_policy]: pool2_rule