Use this guide to forward Cloud Secure Edge (CSE) events into your ELK (Elasticsearch, Logstash, Kibana) stack for centralized monitoring and troubleshooting. CSE emits detailed security and policy events through the CSE Events API. Using our Filebeat integration, you can:
Following the outlined steps, you'll create an API key in CSE, configure Filebeat using the API key, and validate that CSE events appear in Kibana.
filebeat.yml1.1 In the Command Center, navigate from Settings > API Keys.
1.2 Add a new API Key and configure the following details:
Filebeat IntegrationReadOnly
Copy and save the generated API Secret securely; you'll use it in Step 2.
2.1 Log into your Filebeat server.
2.2 Run the following command in your CLI:
filebeat keystore create
2.3 Run the following command in your CLI:
filebeat keystore add <CSE_API_KEY> # Replace <CSE_API_KEY> with your API key name
2.4 When prompted, paste the API key Secret (saved from Step 1) in the CLI.
3.1 Enter the following into the filebeat.inputs section:
- type: httpjson
config_version: 2
interval: 1m
request.url: 'https://net.banyanops.com/api/v1/events' # If using the European EUCC Command Center, then replace `net.banyanops.com` with `eucc.console.banyanops.com`.
request.transforms:
- set:
target: header.Authorization
value: 'Bearer ${CSE_API_KEY}' # Uses keystore variable
- append:
target: url.params.after
value: '[[ .cursor.last_created_at ]]'
default: '[[ (now (parseDuration "-5m")).UnixMilli ]]'
- append:
target: url.params.order
value: 'ASC'
- append:
target: url.params.severity
value: 'INFO'
- append:
target: url.params.limit
value: '1000'
response.split:
target: body.data
cursor:
last_created_at:
value: '[[ printf "%d" (add (toInt (index .last_event "created_at")) 1) ]]'
fields_under_root: true
fields:
event.dataset: cse
3.2 Save your changes.
3.3 Restart Filebeat:
sudo systemcl restart filebeat
For more information on how to start Filebeat on each platform type, visit here.
4.1 Run a quick query in Elasticsearch to confirm events are flowing in:
curl -s "http://localhost:9200/filebeat-*/_search?q=event.dataset"cse&size=1&pretty"
4.2 In Kibana, search for event.dataset:cse to view and filter CSE events.