turnstone/docs/tautulli-setup.md

63 lines
1.6 KiB
Markdown

# Tautulli Webhook Setup
Tautulli is a Plex Media Server (PMS) monitoring application. This guide shows
how to configure Tautulli to send playback events to Turnstone.
## Triggers to enable
In your notification agent, enable these triggers:
- Playback Start
- Playback Stop
- Playback Pause
- Playback Resume
- Playback Error
- Playback Buffering
## JSON body template
Paste this into the **JSON Data** field of the Tautulli Custom Script / Webhook
notification agent:
```json
{
"action": "{action}",
"timestamp": "{timestamp}",
"user": "{user}",
"player": "{player}",
"media_type": "{media_type}",
"title": "{title}",
"grandparent_title": "{grandparent_title}",
"quality": "{quality}",
"video_decision": "{video_decision}",
"audio_decision": "{audio_decision}",
"error_message": "{error_message}",
"session_key": "{session_key}"
}
```
## Webhook URL
```
http://<turnstone-host>:8534/turnstone/api/ingest/tautulli
```
Replace `<turnstone-host>` with the hostname or IP of the machine running
Turnstone. (8534 is the default port; adjust if you're using a reverse proxy or changed the port)
## Optional token authentication
If you set `tautulli_token` in Turnstone settings, every webhook request must
include a matching header:
```
X-Tautulli-Token: <your-token>
```
Add this header in the Tautulli notification agent's **Headers** section.
Requests with a missing or wrong token are rejected with HTTP 403.
## Searching events
All events are stored under source `tautulli` and are immediately searchable
in Turnstone after each webhook is received.