Skip to content

[cisco_meraki] Replace rsa2elk pipeline and add webhook input #2897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 69 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e721129
Update data stream and pipeline for webhook based integration
r00tu53r Mar 10, 2022
080ce7b
fix title desc
r00tu53r Mar 10, 2022
9d18070
Add support for syslog and webhook
r00tu53r Mar 18, 2022
a2ec877
Add pipeline tests for syslog flow, ipflow logs; Add sample_events fo…
r00tu53r Mar 21, 2022
8c0c54a
Fix ip_flow_end pipeline for tsi or tdi case
r00tu53r Mar 21, 2022
b0fbf8b
Add support for airmarshal events
r00tu53r Mar 21, 2022
059cc9d
Add support for security_event ids_alerted
r00tu53r Mar 22, 2022
5cc4249
Add support for security_event security_filtering_file_scanned type
r00tu53r Mar 22, 2022
f5ad6e6
Add support for security_event security_filtering_disposition_change
r00tu53r Mar 22, 2022
686d7f3
Refactor
r00tu53r Mar 23, 2022
07bc059
Add support for site-to-site vpn event type
r00tu53r Mar 24, 2022
6cdee00
Add support for vpn_connectivity_change and refactor field groups
r00tu53r Mar 24, 2022
36b8a6d
Add support for dhcp lease and no offers
r00tu53r Mar 24, 2022
c3f9a38
Add support for client_vpn_connect log messages
r00tu53r Mar 25, 2022
30d5bfd
Add support for urls type
r00tu53r Mar 26, 2022
f90f099
Add pipeline for ids-alerts
r00tu53r Mar 26, 2022
68d96c1
Update ECS version; add sub types for MR events
r00tu53r Mar 27, 2022
094d2ba
Add system tests
r00tu53r Mar 27, 2022
293fe35
set meraki device type for flows log messages
r00tu53r Mar 28, 2022
f5184d1
Update README; Disable webhook events by default; only enable syslog …
r00tu53r Mar 28, 2022
db5cdb2
script to create event.category, type and action
r00tu53r Mar 28, 2022
3d0910a
fix formatting
r00tu53r Mar 28, 2022
67c2517
regenerate README
r00tu53r Mar 28, 2022
8556769
Update README
r00tu53r Mar 29, 2022
9ef3fbe
Update changelog
r00tu53r Mar 29, 2022
35c5d15
rename: test-events file
r00tu53r Mar 29, 2022
e587ef0
Add dashboards and anonymize data
r00tu53r Mar 29, 2022
dd29325
Add dashboard screenshots
r00tu53r Mar 29, 2022
eec69f0
remove event.ingested
r00tu53r Apr 1, 2022
38cd8e6
use observer.mac to set wired_mac
r00tu53r Apr 1, 2022
ec1c7c9
use threat.indicator.* instead of threat.enrichments.indicator.*
r00tu53r Apr 1, 2022
cde66fc
refactor
r00tu53r Apr 1, 2022
ef185c0
convert timestamp to date format in threat.indicator.last_seen
r00tu53r Apr 1, 2022
9ea18ea
add missing processors to logfile input
r00tu53r Apr 1, 2022
7f7685f
change dissect to grok for airmarshal events
r00tu53r Apr 4, 2022
5748b24
convert last_seen to date
r00tu53r Apr 4, 2022
811ed78
add cloud and container field decls
r00tu53r Apr 4, 2022
63cb292
resolve conflicts
r00tu53r Apr 4, 2022
de6aad3
events: pipeline for top-level fields and event handling
r00tu53r Apr 5, 2022
1e1f157
support for alert types
r00tu53r Apr 5, 2022
02026bc
update readme
r00tu53r Apr 5, 2022
d819401
update readme heading
r00tu53r Apr 6, 2022
e0b1dd0
events: support for all documented event types
r00tu53r Apr 6, 2022
4f57cfe
Fixes, add support for subtypes
r00tu53r Apr 19, 2022
efb5411
use templating to avoid copying code
r00tu53r Apr 19, 2022
63e4bc2
normalize mac address
r00tu53r Apr 19, 2022
827104f
update readme
r00tu53r Apr 19, 2022
709ef5c
Update flow_allowed event.type to connection,start
r00tu53r Apr 21, 2022
464427b
Remove session from event.type for ip_session_initiated
r00tu53r Apr 21, 2022
23b36f0
Remove device type detection
r00tu53r Apr 21, 2022
4a4e612
Update packages/cisco_meraki/_dev/build/docs/README.md
r00tu53r Apr 23, 2022
6218ec8
remove duplicated log.file.path field
r00tu53r Apr 23, 2022
9f5d58a
fix ecs field references
r00tu53r Apr 23, 2022
65f30e9
set tag for painless script
r00tu53r Apr 23, 2022
ed315c3
replace set and remove with rename
r00tu53r Apr 23, 2022
5a6b7c9
set cisco_meraki.event_type directly instead of setting it into temp
r00tu53r Apr 23, 2022
f021c46
remove conversion from nanos to millis
r00tu53r Apr 23, 2022
57865f3
refactor painless script
r00tu53r Apr 23, 2022
97af528
convert to ip and set to source/destination.ipinstead of rename
r00tu53r Apr 23, 2022
6b94eec
convert to ip type; not dissect directly to source.ip
r00tu53r Apr 23, 2022
d1dd45c
consolidate geoip to main pipeline; convert to ip type
r00tu53r Apr 23, 2022
4ef708a
move fields one level up from airmarshal to cisco_meraki group
r00tu53r Apr 24, 2022
5bc8efe
update readme
r00tu53r Apr 24, 2022
2c2a036
move airmarshal.ssid to ecs field network.name
r00tu53r Apr 24, 2022
567ee08
consolidate more instances of geoip processing to default
r00tu53r Apr 24, 2022
c97807d
Merge branch 'main' into feat/replace-cisco-meraki
r00tu53r Apr 26, 2022
9857c5b
fix conflict; update to ecs 8.2
r00tu53r Apr 26, 2022
ad2a76f
handle ipv4 and ipv6 data; add convert to all places
r00tu53r Apr 26, 2022
62aaa69
remove IPV6NOCOMPRESS grok pattern for ip with no port values
r00tu53r Apr 26, 2022
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
60 changes: 54 additions & 6 deletions packages/cisco_meraki/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,64 @@
# Cisco Meraki Integration

This integration is for Cisco Meraki device's logs. It includes the following
datasets for receiving logs over syslog or read from a file:
Cisco Meraki offers a centralized cloud management platform for all Meraki devices such as MX Security Appliances, MR Access Points and so on. Its out-of-band cloud architecture creates secure, scalable and easy-to-deploy networks that can be managed from anywhere. This can be done from almost any device using web-based Meraki Dashboard and Meraki Mobile App. Each Meraki network generates its own events.

- `log` dataset: supports Cisco Meraki logs.
Cisco Meraki offers [several methods for device reporting](https://documentation.meraki.com/General_Administration/Monitoring_and_Reporting/Meraki_Device_Reporting_-_Syslog%2C_SNMP%2C_and_API). This integration supports gathering events via the Cisco Meraki syslog and via API reporting webhooks. The integration package allows you to search, observe, and visualize the events through Elasticsearch.

## Compatibility

A syslog server can be configured to store messages for reporting purposes from MX Security Appliances, MR Access Points, and MS switches. This package collects events from the configured syslog server. The integration supports collection of events from "MX Security Appliances" and "MR Access Points". The "MS Switch" events are not recognized.

## Configuration

### Enabling the integration in Elastic

1. In Kibana go to **Management > Integrations**
2. In "Search for integrations" search bar type **Meraki**
3. Click on "Cisco Meraki" integration from the search results.
4. Click on **Add Cisco Meraki Integration** button to add the integration.

### Cisco Meraki Dashboard Configuration

#### Syslog

Cisco Meraki dashboard can be used to configure one or more syslog servers and Meraki message types to be sent to the syslog servers. Refer to [Syslog Server Overview and Configuration](https://documentation.meraki.com/General_Administration/Monitoring_and_Reporting/Syslog_Server_Overview_and_Configuration#Configuring_a_Syslog_Server) page for more information on how to configure syslog server on Cisco Meraki.

#### API Endpoint (Webhooks)

Cisco Meraki dashboard can be used to configure Meraki webhooks. Refer to the [Webhooks Dashboard Setup](https://documentation.meraki.com/General_Administration/Monitoring_and_Reporting/Meraki_Device_Reporting_-_Syslog%2C_SNMP%2C_and_API#Webhooks_Dashboard_Setup) section.

### Configure the Cisco Meraki integration

#### Syslog

Depending on the syslog server setup in your environment check one/more of the following options "Collect syslog from Cisco Meraki via UDP", "Collect syslog from Cisco Meraki via TCP", "Collect syslog from Cisco Meraki via file".

Enter the values for syslog host and port OR file path based on the chosen configuration options.

### API Endpoint (Webhooks)

Check the option "Collect events from Cisco Meraki via Webhooks" option.

1. Enter values for "Listen Address", "Listen Port" and "Webhook path" to form the endpoint URL. Make note of the **Endpoint URL** https://{AGENT_ADDRESS}:8686/meraki/events.
2. Enter value for "Secret value". This must match the "Shared Secret" value entered when configuring the webhook from Meraki cloud.
3. Enter values for "TLS". Cisco Meraki requires that the webhook accept requests over HTTPS. So you must either configure the integration with a valid TLS certificate or use a reverse proxy in front of the integration.

### Log Events

Enable to collect Cisco Meraki log events for all the applications configured for the chosen log stream.

## Logs

### Meraki
### Syslog

The `cisco_meraki.log` dataset provides events from the configured syslog server. All Cisco Meraki syslog specific fields are available in the `cisco_meraki.log` field group.

The `log` dataset collects Cisco Meraki logs.
{{fields "log"}}

{{event "log"}}

{{fields "log"}}
### API Endpoint (Webhooks)

{{fields "events"}}

{{event "events"}}
35 changes: 27 additions & 8 deletions packages/cisco_meraki/_dev/deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
version: "2.3"
version: '2.3'
services:
cisco-logfile:
meraki-webhook-http:
image: docker.elastic.co/observability/stream:v0.6.2
volumes:
- ./sample_events:/sample_events:ro
environment:
- STREAM_PROTOCOL=webhook
- STREAM_ADDR=http://elastic-agent:8686/meraki/events
- STREAM_WEBHOOK_HEADER=Authorization=abc123
command: log --start-signal=SIGHUP --delay=5s /sample_events/meraki-mx-ndjson.log
meraki-webhook-https:
image: docker.elastic.co/observability/stream:v0.6.2
volumes:
- ./sample_events:/sample_events:ro
environment:
- STREAM_PROTOCOL=webhook
- STREAM_ADDR=https://elastic-agent:8686/meraki/events
- STREAM_WEBHOOK_HEADER=Authorization=abc123
- STREAM_INSECURE=true
command: log --start-signal=SIGHUP --delay=5s /sample_events/meraki-mx-ndjson.log
cisco_meraki-log-logfile:
image: alpine
volumes:
- ./sample_logs:/sample_logs:ro
- ${SERVICE_LOGS_DIR}:/var/log
command: /bin/sh -c "cp /sample_logs/* /var/log/"
cisco-meraki-udp:
image: docker.elastic.co/observability/stream:v0.5.0
cisco_meraki-log-udp:
image: docker.elastic.co/observability/stream:v0.6.2
volumes:
- ./sample_logs:/sample_logs:ro
command: log --start-signal=SIGHUP --delay=5s --addr elastic-agent:9514 -p=udp /sample_logs/cisco-meraki.log
cisco-meraki-tcp:
image: docker.elastic.co/observability/stream:v0.5.0
command: log --start-signal=SIGHUP --delay=5s --addr elastic-agent:8685 -p=udp /sample_logs/cisco-meraki.log
cisco_meraki-log-tcp:
image: docker.elastic.co/observability/stream:v0.6.2
volumes:
- ./sample_logs:/sample_logs:ro
command: log --start-signal=SIGHUP --delay=5s --addr elastic-agent:9514 -p=tcp /sample_logs/cisco-meraki.log
command: log --start-signal=SIGHUP --delay=5s --addr elastic-agent:8685 -p=tcp /sample_logs/cisco-meraki.log
Loading