|
| 1 | +# Splunk Plugin for Perses |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The Splunk plugin enables Perses to connect to Splunk instances and query data using Splunk Processing Language (SPL). It supports both time series visualizations and log queries. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **Splunk Datasource**: Connect to Splunk Enterprise or Splunk Cloud instances |
| 10 | +- **Time Series Queries**: Execute SPL queries for time series data visualization |
| 11 | +- **Log Queries**: Retrieve and display log data from Splunk |
| 12 | +- **Variable Support**: Use Perses variables in your SPL queries |
| 13 | +- **Flexible Authentication**: Support for direct URL or proxy-based connections |
| 14 | + |
| 15 | +## SPL Query Examples |
| 16 | + |
| 17 | +### Time Series Examples |
| 18 | + |
| 19 | +```spl |
| 20 | +# Count events over time |
| 21 | +search index=main | timechart count |
| 22 | +
|
| 23 | +# Average response time by service |
| 24 | +search index=web | timechart avg(response_time) by service |
| 25 | +
|
| 26 | +# Error rate over time |
| 27 | +search index=main error | timechart count |
| 28 | +``` |
| 29 | + |
| 30 | +### Log Query Examples |
| 31 | + |
| 32 | +```spl |
| 33 | +# Recent errors |
| 34 | +search index=main error | head 100 |
| 35 | +
|
| 36 | +# Specific application logs |
| 37 | +search index=app sourcetype=application:log level=ERROR |
| 38 | +
|
| 39 | +# Search with filters |
| 40 | +search index=main host=server01 status=500 |
| 41 | +``` |
| 42 | + |
| 43 | +## API Endpoints |
| 44 | + |
| 45 | +The plugin uses the following Splunk REST API endpoints: |
| 46 | + |
| 47 | +- `/services/search/jobs` - Create search jobs |
| 48 | +- `/services/search/jobs/{sid}` - Get job status |
| 49 | +- `/services/search/jobs/{sid}/results` - Get search results |
| 50 | +- `/services/search/jobs/{sid}/events` - Get search events |
| 51 | +- `/services/search/jobs/export` - Export search results |
| 52 | +- `/services/data/indexes` - Get index information |
| 53 | + |
| 54 | +## Authentication |
| 55 | + |
| 56 | +Splunk authentication can be configured through: |
| 57 | + |
| 58 | +- HTTP headers (Authorization token) |
| 59 | +- Proxy settings with credentials |
| 60 | +- Direct URL with embedded credentials (not recommended for production) |
0 commit comments