Skip to content

Commit fa0c846

Browse files
authored
Merge pull request #2 from devinslick/copilot/add-caca-admin-dashboard
Add CACA Admin Dashboard for centralized dashboard management with private dashboard support and load time analysis
2 parents dd73650 + 0993b8e commit fa0c846

File tree

6 files changed

+736
-8
lines changed

6 files changed

+736
-8
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,22 @@ The `caca_metrics` index should be created automatically. Verify by running:
116116
Run the registry update search to populate the dashboard registry:
117117

118118
```spl
119-
| rest /services/data/ui/views splunk_server=local count=0
119+
| rest /services/data/ui/views splunk_server=local count=0 search="sharing=*"
120120
| search isDashboard=1 OR isVisible=1
121121
| eval dashboard_uri="/app/".eai:acl.app."/".title
122122
| eval pretty_name=coalesce(label, title)
123123
| eval app=eai:acl.app
124124
| eval owner=eai:acl.owner
125+
| eval sharing=eai:acl.sharing
125126
| eval description=coalesce(eai:data, "")
126127
| eval status="active"
127-
| table dashboard_uri pretty_name app owner description status
128+
| table dashboard_uri pretty_name app owner sharing description status
128129
| outputlookup dashboard_registry.csv
129130
```
130131

131-
This will scan your Splunk environment and populate the `dashboard_registry.csv` lookup with all discovered dashboards.
132+
This will scan your Splunk environment and populate the `dashboard_registry.csv` lookup with all discovered dashboards, including private dashboards.
133+
134+
**Note on Private Dashboards:** The `search="sharing=*"` parameter ensures that dashboards with all sharing levels (global, app, and user/private) are included in the registry. To see private dashboards owned by other users, the scheduled search must run with appropriate permissions (typically as admin or with the `list_storage_passwords` capability).
132135

133136
**Verify the registry:**
134137

@@ -169,6 +172,18 @@ Navigate to **CACA → Dashboard Leaderboard** to view:
169172
- **Trending Charts**: Views, errors, and load time trends over time
170173
- **Top Dashboards**: Most viewed, most edited, and slowest dashboards
171174

175+
### CACA Admin Dashboard
176+
177+
Navigate to **CACA → CACA Admin Dashboard** for centralized dashboard administration:
178+
179+
- **Multi-Dimensional Filtering**: Filter dashboards by name, app, owner, health status, and performance
180+
- **Management View**: Sortable table with all key metrics (views, errors, load time, health)
181+
- **Quick Actions**: Direct links to edit, change ownership, move between apps, delete, and manage permissions
182+
- **Bulk Recommendations**: Prioritized list of dashboards needing attention (fix, optimize, archive)
183+
- **Workflow Guides**: Step-by-step instructions for common administrative tasks
184+
185+
See the [CACA Admin Dashboard README](default/data/ui/views/CACA_ADMIN_README.md) for detailed usage instructions and examples.
186+
172187
### Dashboard Details
173188

174189
Click any dashboard in the leaderboard to view detailed metrics:
@@ -443,17 +458,20 @@ Edit `lookups/dashboard_registry.csv` and set `status=inactive` for specific das
443458

444459
Run the registry update search manually:
445460
```spl
446-
| rest /services/data/ui/views splunk_server=local count=0
461+
| rest /services/data/ui/views splunk_server=local count=0 search="sharing=*"
447462
| search isDashboard=1 OR isVisible=1
448463
| eval dashboard_uri="/app/".eai:acl.app."/".title
449464
| eval pretty_name=coalesce(label, title)
450465
| eval app=eai:acl.app
451466
| eval owner=eai:acl.owner
467+
| eval sharing=eai:acl.sharing
452468
| eval status="active"
453-
| table dashboard_uri pretty_name app owner status
469+
| table dashboard_uri pretty_name app owner sharing status
454470
| outputlookup dashboard_registry.csv
455471
```
456472

473+
**For Private Dashboards:** If private dashboards still don't appear, ensure the search is running with appropriate permissions. Private dashboards owned by other users require admin privileges or specific capabilities to be discovered via REST API.
474+
457475
Or add it manually to `lookups/dashboard_registry.csv`.
458476

459477
### Metrics Showing Zero

default/data/ui/nav/default.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<nav search_view="search" color="#0877a6">
22
<view name="dashboard_leaderboard" default='true' />
33
<view name="poop_deck" />
4+
<view name="caca_admin" />
45
<view name="dashboard_details" />
56
<view name="search" />
67
<view name="dashboards" />
Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
# CACA Admin Dashboard
2+
3+
## Overview
4+
5+
The **CACA Admin Dashboard** is a comprehensive administrative control panel designed to streamline dashboard management tasks in Splunk. It consolidates filtering, analysis, and administrative actions into a single, unified interface.
6+
7+
## Purpose
8+
9+
Administrative tasks in the Splunk UI can be cumbersome, requiring navigation between multiple views to:
10+
- Edit dashboards
11+
- Change ownership
12+
- Move objects between apps
13+
- Delete dashboards
14+
- Change permissions
15+
16+
The CACA Admin Dashboard solves this by providing:
17+
1. **Multi-dimensional filtering** to quickly find the dashboards you need to manage
18+
2. **Comprehensive dashboard listing** with health and performance metrics from CACA
19+
3. **Quick access** to all common administrative functions
20+
4. **Actionable recommendations** based on dashboard health and usage data
21+
22+
## Key Features
23+
24+
### 1. Advanced Filtering
25+
26+
Filter dashboards by multiple criteria simultaneously:
27+
28+
- **Dashboard Name**: Wildcard search (e.g., "sales*" or "*report*")
29+
- **App**: Select one or more apps
30+
- **Owner**: Select one or more owners
31+
- **Sharing Level**: Global, App, or Private
32+
- **Health Status**: Healthy, Warning, Critical, or Stale
33+
- **Performance**: Fast (<1s), Good (1-3s), Slow (3-5s), or Very Slow (>5s)
34+
- **Load Time Analysis Period**: Select time range (24h, 7d, 30d, 90d) for analyzing average total dashboard load time
35+
- **Metrics Time Range**: Configurable metrics window for views, edits, and errors (default: 7 days)
36+
37+
**Use Cases:**
38+
- Find all stale dashboards in the "search" app
39+
- Identify all dashboards owned by a departing team member
40+
- List all dashboards with critical health issues
41+
- Find slow-performing dashboards with high usage
42+
- Analyze load time trends over different time periods
43+
44+
### 2. Dashboard Management Table
45+
46+
The main table displays all dashboards matching your filters with:
47+
48+
- **Dashboard Name** (clickable to open)
49+
- **App** - Which app contains the dashboard
50+
- **Owner** - Current owner
51+
- **Sharing** - Sharing level (🌐 Global, 📦 App, 🔒 Private)
52+
- **Views (7d)** - Number of views in the selected time range
53+
- **Edits (7d)** - Number of edits
54+
- **Errors (7d)** - Error count
55+
- **Avg Load (ms)** - Average load time (from last 7 days)
56+
- **Avg Total Load Time (ms)** - Average total load time for the selected Load Time Analysis Period
57+
- **Performance** - Visual performance rating (⚡ Fast, ✓ Good, ⚠ Slow, ✗ Very Slow)
58+
- **Health** - Visual health status (✓ Healthy, ⚠ Warning, ✗ Critical, ☾ Stale)
59+
60+
**Note:** The "Avg Total Load Time (ms)" column dynamically updates based on the "Load Time Analysis Period" dropdown selection (24h, 7d, 30d, or 90d), allowing you to analyze performance trends over different time ranges.
61+
62+
**Interactions:**
63+
- Click any dashboard name to open it directly
64+
- Click any other cell to view detailed analytics
65+
- Sort by any column
66+
- Paginated display (50 per page)
67+
68+
### 3. Quick Access Buttons
69+
70+
Direct links to common administrative pages:
71+
- **Manage All Dashboards** - Access Splunk's dashboard management interface
72+
- **Create New Dashboard** - Start creating a new dashboard
73+
- **Settings** - System settings and configuration
74+
- **Search** - Open the search interface
75+
76+
### 4. Administrative Workflows Guide
77+
78+
Built-in documentation for common tasks:
79+
80+
#### Change Dashboard Ownership
81+
1. Click "Manage All Dashboards"
82+
2. Find the dashboard
83+
3. Click "Edit" → "Edit Permissions"
84+
4. Change the "Owner" field
85+
5. Save
86+
87+
#### Move Dashboard Between Apps
88+
1. Click "Manage All Dashboards"
89+
2. Find the dashboard
90+
3. Click "Move" in the Actions column
91+
4. Select destination app
92+
5. Move
93+
94+
#### Delete Dashboards (Bulk)
95+
1. Use filters to narrow down candidates (e.g., stale dashboards)
96+
2. Review the filtered list
97+
3. Click "Manage All Dashboards"
98+
4. Select and delete dashboards
99+
100+
#### Change Permissions
101+
1. Click dashboard name to open it
102+
2. Click "Edit" → "Edit Permissions"
103+
3. Modify read/write permissions
104+
4. Set sharing scope (app or global)
105+
5. Save
106+
107+
### 5. Bulk Action Recommendations
108+
109+
Automated analysis that identifies dashboards requiring attention:
110+
111+
- **Priority Levels**: URGENT, HIGH, MEDIUM, CONSIDER
112+
- **Action Types**:
113+
- Fix/Debug - Critical or warning health issues
114+
- Optimize - Performance improvements needed
115+
- Archive/Delete - Stale or unused dashboards
116+
- Review - General attention needed
117+
118+
**Recommendations:**
119+
- "URGENT: Fix errors AND optimize performance" - Dashboard with critical health AND slow performance
120+
- "HIGH: Fix critical errors" - Dashboard with critical health issues
121+
- "HIGH: Optimize performance (very slow)" - Dashboard taking >10 seconds to load
122+
- "MEDIUM: Review and fix warnings" - Dashboard with warnings
123+
- "MEDIUM: Optimize performance" - Dashboard taking >5 seconds to load
124+
- "CONSIDER: Archive or delete if not needed" - Stale dashboard with zero views
125+
126+
## Usage Examples
127+
128+
### Example 1: Clean Up Stale Dashboards
129+
1. Set **Health Status** filter to "☾ Stale"
130+
2. Review the list of dashboards not viewed in 30+ days
131+
3. Check the "Bulk Action Recommendations" panel for specific guidance
132+
4. Use "Manage All Dashboards" to delete or archive them
133+
134+
### Example 2: Transfer Ownership for Departing Team Member
135+
1. Set **Owner** filter to the departing user's username
136+
2. Review all their dashboards
137+
3. Note the apps and usage patterns
138+
4. Follow the "Change Dashboard Ownership" workflow for each dashboard
139+
140+
### Example 3: Identify and Fix Performance Issues
141+
1. Set **Performance** filter to "✗ Very Slow"
142+
2. Review dashboards with >5 second load times
143+
3. Check "Views (7d)" to prioritize high-traffic dashboards
144+
4. Click dashboard name to open and investigate/optimize
145+
146+
### Example 4: Analyze Load Time Trends
147+
1. Select **Load Time Analysis Period** to "Last 24 Hours" for recent performance
148+
2. Review the **Avg Total Load Time (ms)** column to see current performance
149+
3. Change period to "Last 30 Days" to compare with longer-term trends
150+
4. Identify dashboards with increasing load times for proactive optimization
151+
152+
### Example 5: Find All Broken Dashboards in Production App
153+
1. Set **App** filter to your production app name
154+
2. Set **Health Status** filter to "✗ Critical"
155+
3. Review error counts and view the recommendations
156+
4. Click each dashboard to view error details and fix
157+
158+
### Example 6: Audit Dashboard Permissions
159+
1. Set **App** filter to specific app(s)
160+
2. Review the owner column
161+
3. Click each dashboard name to check permissions
162+
4. Follow the "Change Permissions" workflow to adjust as needed
163+
164+
## Integration with Other CACA Views
165+
166+
The CACA Admin Dashboard integrates seamlessly with other CACA dashboards:
167+
168+
- **Dashboard Leaderboard** - High-level overview of all dashboards
169+
- **Poop Deck** - Deep-dive analytics for gems, crap, broken, and slow dashboards
170+
- **Dashboard Details** - Detailed metrics and history for individual dashboards
171+
172+
Navigate between these views using the navigation menu or the links at the bottom of each dashboard.
173+
174+
## Best Practices
175+
176+
1. **Regular Audits**: Use the admin dashboard weekly or monthly to identify stale content
177+
2. **Performance Monitoring**: Set up a routine to check for slow dashboards and optimize them
178+
3. **Health Checks**: Regularly review dashboards with critical or warning status
179+
4. **Ownership Management**: Ensure all dashboards have active owners
180+
5. **Bulk Operations**: Use filters to batch similar administrative tasks
181+
6. **Documentation**: Update dashboard descriptions to help identify purpose during cleanup
182+
183+
## Access Requirements
184+
185+
To use the CACA Admin Dashboard effectively, you need:
186+
187+
- Read access to the CACA metrics index (`caca_metrics`)
188+
- Read access to the dashboard registry lookup
189+
- Appropriate Splunk role permissions to:
190+
- View dashboards across apps
191+
- Edit dashboards (for modifications)
192+
- Manage dashboards (for delete/move operations)
193+
- Change permissions (for ownership and permission changes)
194+
195+
## Troubleshooting
196+
197+
### No Dashboards Appearing
198+
- Verify the dashboard registry is populated: `| inputlookup dashboard_registry`
199+
- Check that metrics are being collected: `| mstats count WHERE index=caca_metrics`
200+
- Ensure filters aren't too restrictive (try resetting to defaults)
201+
- **For private dashboards**: Ensure the "Dashboard Registry - Auto Update" scheduled search runs with appropriate permissions to discover private dashboards owned by other users
202+
203+
### Filters Not Working
204+
- Click the "Submit" button after changing filters
205+
- Check for typos in the name filter (use wildcards: *)
206+
- Verify app/owner names match exactly what's in the registry
207+
208+
### Private Dashboards Not Appearing
209+
- Private dashboards require the registry update search to run with admin privileges
210+
- Verify the search includes `search="sharing=*"` parameter in the REST call
211+
- Check if the user running the scheduled search has permissions to view other users' private content
212+
- Manually verify private dashboard exists: `| rest /services/data/ui/views search="sharing=*" | search owner="username" sharing="user"`
213+
214+
### Links Not Working
215+
- Ensure you have appropriate permissions to access management pages
216+
- Some links require admin or power user roles
217+
- Check that you're logged into Splunk with sufficient privileges
218+
219+
## Technical Details
220+
221+
**File Location**: `default/data/ui/views/caca_admin.xml`
222+
223+
**Dependencies**:
224+
- `dashboard_registry.csv` lookup
225+
- `caca_metrics` index
226+
- Search macro: `get_all_dashboards_summary`
227+
228+
**Private Dashboard Support**:
229+
- The dashboard registry includes dashboards with all sharing levels: global, app, and user/private
230+
- The registry update search uses `search="sharing=*"` parameter to discover private dashboards
231+
- Viewing private dashboards owned by other users requires appropriate permissions
232+
- The scheduled search should run with admin privileges to capture all private dashboards across users
233+
- The `sharing` field in the registry indicates the sharing level of each dashboard
234+
235+
**Performance Considerations**:
236+
- Initial load may take a few seconds if you have many dashboards
237+
- Filters are applied on submit to improve performance
238+
- Time range affects query performance (shorter = faster)
239+
240+
## Future Enhancements
241+
242+
Potential future improvements:
243+
- Bulk permission changes
244+
- Scheduled cleanup workflows
245+
- Dashboard cloning functionality
246+
- Export filtered list to CSV
247+
- Custom action templates
248+
- Integration with change management systems
249+
250+
## Support
251+
252+
For issues or feature requests, please open a GitHub issue in the CACA repository.

0 commit comments

Comments
 (0)