Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ca4a5a5
docs: Add docs for tracking policy activity
tianfeng92 Jan 7, 2026
4308962
chore: nitpicking
tianfeng92 Jan 7, 2026
a0b9f25
chore: nitpicking
tianfeng92 Jan 7, 2026
a993a09
chore: remove configuration part since it is impossible for customer
tianfeng92 Jan 7, 2026
a4a1e6a
docs: add more query examples
tianfeng92 Jan 7, 2026
58b98c6
docs: add more detailed query samples
tianfeng92 Jan 7, 2026
ffdfe3e
chore: polish the sample query
tianfeng92 Jan 7, 2026
e4b1817
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
6b0e53a
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
cedf0c4
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
c1d4711
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
359ce91
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
4686146
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
006003d
docs: rewrite according to suggestions
tianfeng92 Jan 8, 2026
6a88102
docs: add limitations
tianfeng92 Jan 8, 2026
d17e2d9
chore: format note section
tianfeng92 Jan 8, 2026
289817a
chore: nit
tianfeng92 Jan 8, 2026
a24b0d8
chore: describe generation
tianfeng92 Jan 8, 2026
e50743a
Update calico-enterprise/observability/elastic/policy-activity.mdx
tianfeng92 Jan 8, 2026
46f9e42
fix: set max size of the returned log
tianfeng92 Jan 9, 2026
868a562
docs: add notes for query large size of data
tianfeng92 Jan 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You can find links to these preview builds as comments from Netlify.
* Deploy preview. A full build with our production configuration.
* Deploy preview for _calico-docs-preview-next_. This builds the site based on the current state of our unversioned development directories:
* `calico/`
* `calico-enteprise/`
* `calico-enterprise/`
* `calico-cloud/`

If you're making changes to an upcoming version of any of the products, review your changes in _calico-docs-preview-next_.
Expand Down
59 changes: 59 additions & 0 deletions calico-enterprise/observability/elastic/policy-activity.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
description: Learn how to use Policy Activity Logs to gain visibility into policy and rule activity.
---

# Policy Activity Logs

:::note

This feature is tech preview. Tech preview features may be subject to significant changes before they become GA.

:::

## Big picture

Policy Activity Logs provide granular visibility into network policy behavior within your cluster.

## Value

Track exactly which rules are evaluated and triggered, offering policy-centric context that complements standard Flow Logs.

## How it works

- **Collection**: The Calico Enterprise automatically monitors policy and rule evaluations across your cluster.
- **Storage**: These events are securely forwarded and indexed in your Elasticsearch cluster for analysis.
- **Analysis**: You can query the logs to audit network policy and rules and validate policy enforcement history.

## Accessing the data

You can access Policy Activity Logs by querying Elasticsearch directly or visualizing them in Kibana (if configured).

### Log structure

Each log entry contains the following key fields:

| Field | Description | Example |
| ----------------- | -------------------------------------------------------------------------------------------- | -------------------------------- |
| `policy.kind` | The type of the policy (e.g., `NetworkPolicy`, `GlobalNetworkPolicy`). | `NetworkPolicy` |
| `policy.namespace`| The namespace where the policy is defined. | `my-test` |
| `policy.name` | The unique name of the policy. | `my-tier.my-networkpolicy` |
| `rule` | The identifier for the specific rule that was triggered, formatted as `{generation}-{direction}-{rule_index}`. | `2-ingress-4` |
| `cluster` | The name of the cluster where the activity occurred. | `cluster` |
| `last_evaluated` | The timestamp when the rule was last evaluated. | `2025-12-01T23:09:28.384714204Z` |

### Sample query in Elasticsearch

To find policies unused for 90 days:

```
GET tigera_secure_ee_policy_activity*/_search
{
"query": {
"range": {
"last_evaluated": {
"lte": "now-90d"
}
}
}
}
```
1 change: 1 addition & 0 deletions sidebars-calico-enterprise.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ module.exports = {
link: { type: 'doc', id: 'observability/elastic/l7/index' },
items: ['observability/elastic/l7/configure', 'observability/elastic/l7/datatypes'],
},
'observability/elastic/policy-activity',
'observability/elastic/troubleshoot',
],
},
Expand Down