Creating Custom Splunk Applications
1. Creating a Custom Splunk Application
Step 1: Access Splunk Web
Open your web browser and log in to Splunk Web.
Step 2: Go to Manage Apps
Navigate to the Apps menu at the top of the page, then select Manage Apps.
Step 3: Create a New App
On the Apps page, click Create app.
Complete the following fields:
Name: Enter the app name, e.g.,
Active Directory Attack Detection.Folder name: This should be similar to the app name, e.g.,
AD_Attack_Detection. This folder will be created under$SPLUNK_HOME/etc/apps/.Version: Enter the initial version, e.g.,
1.0.0.Description: Add a brief description, e.g.,
Application for detecting Active Directory attacks.Template: Choose
barebonesfrom the dropdown.
Click Save to create the app. Your new app should now appear under Apps.
2. Understanding the Directory Structure
After creating the app, navigate to $SPLUNK_HOME/etc/apps/AD_Attack_Detection. Inside, you’ll find directories, each serving a specific purpose:
/bin: Store custom scripts here./default: Store default configuration files, views, dashboards, and navigation./local: Store user-modified configurations for views, dashboards, and navigation./metadata: Contains permission files.
3. Editing the Navigation File
Open the file
$SPLUNK_HOME/etc/apps/AD_Attack_Detection/default/data/ui/nav/default.xmlin a text editor.The XML structure defines app navigation, with each
<view>tag representing a view in the app bar. Here’s an example:
search_view: Specifies the default view.
default='true': Sets the default app homepage, e.g., the search view.
4. Creating a Dashboard
Navigate to Dashboards in your Splunk app.
Click Create New Dashboard and provide:
Dashboard Name: e.g.,
AD Attack DashboardDescription: (optional)
Permissions: Set according to needs.
Dashboard Type: Choose
Classic Dashboards.
Configure the dashboard with panels, inputs, and time range settings.
To reference inputs, use tokens enclosed in
$, e.g.,$user$.
Dashboard Storage
The XML configuration for each dashboard is stored in <AppPath>/local/data/ui/views/dashboard_title.xml.
Adding Dashboards to Navigation
Open
$SPLUNK_HOME/etc/apps/AD_Attack_Detection/default/data/ui/nav/default.xml.Add the dashboard title in the
<nav>section to make it accessible in the app's navigation.
5. Restart Splunk
Restart Splunk to apply the changes and see the new dashboard listed in the app’s navigation bar.
6. Grouping Dashboards in the Navigation Bar
To group multiple dashboards, use the <collection> tag in default.xml:
7. Updating an Existing App
To update the app with a pre-configured application file:
Download the
Detection-of-Active-Directory-Attacks.tar.gzfile from the Resources section.Go to Apps -> Manage Apps and click Install app from file.
Browse for the file, check Upgrade app to overwrite the existing app, then click Upload.
Last updated