| layout | default |
|---|---|
| title | Installation |
| nav_order | 2 |
This guide will walk you through installing and setting up Dashpub.
Before you begin, ensure you have the following installed:
- Node.js 18+ (Download)
- npm 8+ (comes with Node.js)
- Access to Splunk Enterprise instance
- Git (optional, for cloning the repository)
The easiest way to get started is using the built-in CLI tool:
# Clone the repository
git clone <repository-url>
cd dashpub-v2-testing
# Initialize a new project
node cli/cli.js initThe CLI will:
- Prompt you for Splunk connection details
- Generate dashboard definitions from your Splunk instance
- Create a new
app/directory with all necessary files - Set up environment variables
If you prefer manual setup:
# Clone the repository
git clone <repository-url>
cd dashpub-v2-testing
# Copy the template directory
cp -r template app
cd app
# Install dependencies
npm install
# Copy environment example
cp env.example .env
# Edit .env with your Splunk configuration
nano .env # or use your preferred editorAfter installation, start the development server:
cd app
# Install dependencies (if not already done)
npm install
# Start both backend and frontend servers
npm run dev:fullThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
Create a .env file in the app/ directory with the following:
# Splunk Connection (Required)
SPLUNKD_URL=https://your-splunk-instance:8089
SPLUNKD_USER=admin
SPLUNKD_PASSWORD=your_password
# Or use token authentication
SPLUNKD_TOKEN=your_api_token# Server Configuration
PORT=3000
NODE_ENV=development
# Dashboard Display Settings
NEXT_PUBLIC_DASHPUBTITLE=My Dashboards
NEXT_PUBLIC_HOMETHEME=light
# Screenshot Configuration
NEXT_PUBLIC_DASHPUBSCREENSHOTS=false
NEXT_PUBLIC_BASE_SCREENSHOT_URL=
NEXT_PUBLIC_DASHPUBSCREENSHOTDIR=screenshots
NEXT_PUBLIC_DASHPUBSCREENSHOTEXT=png
# Breadcrumb Navigation
NEXT_PUBLIC_DASHPUBBREADCRUMBS=true
NEXT_PUBLIC_DASHPUBBREADCRUMBSBACKBUTTON=true
# Tab Rotation
REACT_APP_TAB_ROTATION_INTERVAL=15000
REACT_APP_TAB_ROTATION_ENABLED=trueSee the Configuration Guide for a complete list of environment variables.
curl http://localhost:3000/healthExpected response:
{
"status": "healthy",
"timestamp": "2024-01-15T10:30:00Z"
}curl http://localhost:3000/api/splunk/testcurl http://localhost:3000/api/dashboardsIf port 3000 or 5173 is already in use:
# Check what's using the port
lsof -i :3000
lsof -i :5173
# Kill the process or change ports in .env
PORT=3001 # Change backend port- Verify Splunk URL and credentials
- Check network connectivity
- Ensure Splunk REST API is accessible
- Check firewall rules
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm installFor more troubleshooting help, see the Troubleshooting Guide.