Splunk Connection
The following guide shows you how to manage Splunk connections in your Lumar account. Splunk connections allow Lumar to import log data for log file analysis reports.
Creating a Splunk connection
Provide the Splunk API URL and credentials. Optionally configure a proxy.
CreateSplunkConnectionTry in Explorer
GraphQL
mutation CreateSplunkConnection($input: CreateSplunkConnectionInput!) {
createSplunkConnection(input: $input) {
splunkConnection {
id
isWorking
proxyCode
customProxy
}
}
}
Querying connections
Retrieve all Splunk connections for an account:
GetSplunkConnectionsTry in Explorer
GraphQL
query GetSplunkConnections {
me {
splunkConnections(first: 10) {
nodes {
id
isWorking
customProxy
proxyCode
createdAt
}
totalCount
}
}
}
Updating a connection
Update credentials, URL, or proxy settings:
UpdateSplunkConnectionTry in Explorer
GraphQL
mutation UpdateSplunkConnection($input: UpdateSplunkConnectionInput!) {
updateSplunkConnection(input: $input) {
splunkConnection {
id
isWorking
proxyCode
customProxy
}
}
}
Proxy configuration
If your Splunk instance is behind a firewall, you can configure a proxy:
- Set
proxyCodetoCustom. - Set
customProxyto your proxy URL (e.g.,https://proxy.example.com:8080).
When no proxy is needed, leave both fields as null.
Deleting a connection
Remove a Splunk connection:
DeleteSplunkConnectionTry in Explorer
GraphQL
mutation DeleteSplunkConnection($input: DeleteSplunkConnectionInput!) {
deleteSplunkConnection(input: $input) {
splunkConnection {
id
}
}
}
Project queries
After creating a connection, set up project-level queries to define which Splunk data Lumar should fetch for a specific project:
CreateSplunkProjectQueryTry in Explorer
GraphQL
mutation CreateSplunkProjectQuery($input: CreateSplunkProjectQueryInput!) {
createSplunkProjectQuery(input: $input) {
splunkProjectQuery {
id
query
baseUrl
dateRange
enabled
useLastCrawlDate
}
}
}
You can also retrieve existing project queries:
GetSplunkProjectQueriesTry in Explorer
GraphQL
query GetSplunkProjectQueries($projectId: ObjectID!) {
getProject(id: $projectId) {
splunkProjectQueries(first: 10) {
nodes {
id
query
baseUrl
dateRange
enabled
useLastCrawlDate
splunkConnection {
id
isWorking
}
}
totalCount
}
}
}
Key project query fields:
| Field | Description |
|---|---|
query | The Splunk search query string. |
baseUrl | The base URL to match in log entries. |
dateRange | Number of days of log data to import. |
useLastCrawlDate | When true, uses the last crawl date as the start of the date range. |
enabled | Whether this query is active. |