Send Slack logs to LogPulse
The Slack audit logs of an Enterprise Grid org: sign-ins, admin and role changes, app installs, file sharing and exports.
Configure → Sources → Cloud. LogPulse reads the Slack Audit Logs API itself, without an agent. Events land in the audit index with source slack and fill the Change data model.Overview
- Slack Audit Logs API to Integration poller
- Integration poller to index=audit
LogPulse signs in to Slack with the credential you give it and fetches new events every five minutes by default. You can set the interval per integration, from one minute to 24 hours.
What you need
- Slack Enterprise Grid
- A user token of the org owner with the auditlogs:read scope
- In LogPulse: a role that may manage API keys. Cloud integrations fall under that right.
1. Create a credential in Slack
| Field in LogPulse | Where you find it |
|---|---|
| User token | Create a Slack app with the user scope auditlogs:read and install it on the org as the org owner. Copy the user OAuth token (xoxp-…). Stored encrypted and never shown again. |
2. Add the integration in LogPulse
Go to Configure → Sources → Cloud and choose Slack. Fill in the fields, tick the data sources you want and save. LogPulse first tests the connection with your credential and tells you what is wrong when it fails.
What arrives
| Data source | Index | Source | Sourcetype | What it holds |
|---|---|---|---|---|
| Audit logs | audit | slack | slack:audit | Who did what in Slack, from where: user, action, the channel, file, app or workspace, IP address and user agent. |
The index is the kind of data and the source is the product, so detection rules for that kind of data find Slack without changes.
Fields and data models
| Data model | What you get |
|---|---|
| Change | Who did what, on which user, channel, file or app, from which IP. |
Field names follow the CIM field names. These are the fields LogPulse sets on Slack events; a field is left out when Slack did not send a value.
actiondestdest_typedest_userhttp_user_agentidobjectobject_categoryobject_idsession_idsrc_ipstatususeruser_iduser_nameuser_typevendor_action
The original record of Slack is kept with each event under raw, so nothing the vendor sent is lost.
3. Check the data
The first events arrive within a few minutes. Check what came in:
earliest=-1h index IN (audit) source IN (slack)
| stats count by index, source, sourcetypeThe integration page in LogPulse shows when it last read events and the last error, if any.
Troubleshooting
The connection test names what is wrong. These are the answers you are most likely to see.
| What you see | What to do |
|---|---|
| The token needs the auditlogs:read scope. | Add the user scope auditlogs:read to the Slack app, install it on the org again as the org owner and copy the new user OAuth token (xoxp-…). |
| Audit logs need an Enterprise Grid org. | The Slack audit logs API exists only on Enterprise Grid. On other plans there is nothing to read. |
| The test passes but no events arrive. | Run the search above over a longer time. No results: check on the integration page that the data source is switched on and when it last read events. Slack may also simply have had nothing new. |
Frequently asked questions
- How do I send Slack logs to LogPulse?
- Add the Slack cloud integration under Configure, Sources, Cloud in LogPulse and fill in User token. LogPulse reads the Slack Audit Logs API itself, every five minutes by default; there is nothing to install.
- Which permissions does LogPulse need in Slack?
- Slack Enterprise Grid. A user token of the org owner with the auditlogs:read scope. Read access is enough for collecting logs.
- Which index does Slack data go to?
- The index is the kind of data: audit. The source is the product: slack. Each data source has its own sourcetype, listed on this page.
- Which data models does Slack fill?
- Change. Detection rules and dashboards written for a data model work on Slack without changes.