Managing Kibana Spaces
1. Understanding Spaces
| Property | Description | Default Value | Notes |
|---|---|---|---|
| name | Unique identifier for the space | None | Required field |
| description | Human-readable description of the space | Empty string | Optional field |
| disabled | Flag to disable the space | false | Boolean value |
| icon | Icon to represent the space visually | Default Kibana icon | Optional field |
Example: Creating a Space
{
"name": "Production",
"description": "Space for production environment logs",
"disabled": false,
"icon": "cube"
}
Note: Spaces in Kibana are used to isolate data and visualizations. Each space has its own set of indices, dashboards, and visualizations.
Warning: Spaces are not a security feature. They do not restrict access to data or dashboards based on user roles.
2. Creating Spaces
Example: Create a Space via Kibana UI
// Navigate to Kibana > Management > Spaces
// Click "Create space"
// Fill in the form with:
{
"name": "Production-Environment",
"id": "production-env",
"description": "Space for production monitoring"
}
| Field | Description | Required |
|---|---|---|
| name | Human-readable name for the space | Yes |
| id | Unique identifier for the space (lowercase, no spaces) | Yes |
| description | Optional description of the space's purpose | No |
| icon | Icon to represent the space (e.g., "dashboard") | No |
Note: The space ID must be unique and cannot be changed after creation.
Warning: Spaces are isolated; data in one space does not automatically appear in another.
3. Configuring Space Features
| Feature | Description | Configuration | Status |
|---|---|---|---|
| Space Features | Enables or disables features within a Kibana space | space.features |
NEW |
| Analytics | Enables analytics capabilities in the space | space.features.analytics |
DEPRECATED |
| Canvas | Enables Canvas app in the space | space.features.canvas |
NEW |
| Discover | Enables Discover app in the space | space.features.discover |
NEW |
| Dashboard | Enables Dashboard app in the space | space.features.dashboard |
NEW |
| Visualize | Enables Visualize app in the space | space.features.visualize |
NEW |
| Timelion | Enables Timelion app in the space | space.features.timelion |
DEPRECATED |
| Maps | Enables Maps app in the space | space.features.maps |
NEW |
| Graph | Enables Graph app in the space | space.features.graph |
NEW |
| Security | Enables Security features in the space | space.features.security |
NEW |
Example: Enabling Space Features
{
"space": {
"features": {
"analytics": true,
"canvas": false,
"discover": true,
"dashboard": true,
"visualize": true,
"timelion": false,
"maps": true,
"graph": true,
"security": true
}
}
}
Note: The
space.features configuration is available in Kibana 8.10+.
Warning: Disabling features like
analytics or timelion may cause issues with existing visualizations or dashboards that depend on them.
4. Setting Space Logo
| Property | Value | Description |
|---|---|---|
| spaceId | string |
The unique identifier of the Kibana space |
| logo | object |
Configuration object for the space logo |
| logo.src | string |
URL or path to the logo image |
| logo.alt | string |
Alternative text for accessibility |
Example: Setting Space Logo
{
"spaceId": "my-space",
"logo": {
"src": "/images/my-logo.png",
"alt": "My Company Logo"
}
}
5. Copying Saved Objects
| Property | Description | Values |
|---|---|---|
| sourceSpace | Source space from which to copy saved objects | string |
| targetSpace | Target space where saved objects will be copied | string |
| objects | List of saved object types and IDs to copy | Array<{type: string, id: string}> |
Example: Copying Saved Objects Between Spaces
{
"sourceSpace": "production",
"targetSpace": "staging",
"objects": [
{
"type": "dashboard",
"id": "my-dashboard-123"
},
{
"type": "index-pattern",
"id": "my-index-pattern-456"
}
]
}
Note: Ensure that the target space has appropriate permissions to receive the copied objects.
6. Moving Objects Between Spaces
Workflow to Move Kibana Objects Between Spaces
- Log into Kibana with sufficient privileges to manage spaces and objects
- Navigate to
Stack Management>Spaces - Select the source space from which objects will be moved
- Go to
Objectstab within the source space - Select the objects to move (e.g., visualizations, dashboards, saved searches)
- Click
Move to spacebutton - Choose the destination space from the dropdown list
- Confirm the move operation
| Object Type | Movable? | Notes |
|---|---|---|
| Dashboard | true |
Can be moved between spaces |
| Visualization | true |
Can be moved between spaces |
| Saved Search | true |
Can be moved between spaces |
| Index Pattern | false |
Must be recreated in target space |
| Lens | true |
Can be moved between spaces |
Note: Moving objects between spaces does not alter the underlying data or index patterns. Index patterns must be recreated in the target space if they do not exist.
7. Setting Default Space
| Property | Value | Description |
|---|---|---|
| kibana.default_space.id | default |
Identifier for the default space |
| kibana.default_space.name | Default |
Name of the default space |
| kibana.default_space.description | Default space for Kibana |
Description of the default space |
Example: Configure Default Space in kibana.yml
kibana:
default_space:
id: "default"
name: "Default"
description: "Default space for Kibana"
Note: The default space is used when no space is explicitly specified in the URL or when a user accesses Kibana without a space context.
8. Managing Space Permissions
| Permission | Description | Role Required | Notes |
|---|---|---|---|
| space:read | Read access to space content | Space Reader | Allows viewing dashboards, visualizations, and saved objects |
| space:write | Write access to space content | Space Writer | Allows creating and modifying dashboards, visualizations, and saved objects |
| space:admin | Full administrative control over space | Space Administrator | Allows managing users, roles, and permissions within the space |
Example: Assigning Space Permissions via Kibana UI
POST /api/spaces/spaceId/permissions
{
"users": [
{
"username": "user1",
"permissions": ["space:read", "space:write"]
}
]
}
Note: Space permissions are managed at the Kibana level and do not affect Elasticsearch permissions directly.
9. Organizing Dashboards
| Dashboard Property | Description | Values |
|---|---|---|
| title | Name of the dashboard | string |
| spaceId | Identifier for the Kibana space | string |
| timeFrom | Initial time range start | string |
| timeTo | Initial time range end | string |
| refreshInterval | Auto-refresh interval in seconds | number |
Example: Creating a Dashboard with Space ID
{
"title": "System Metrics Dashboard",
"spaceId": "production",
"timeFrom": "now-1h",
"timeTo": "now",
"refreshInterval": 30
}
Note: Dashboards in Kibana can be organized into different spaces to isolate data and views. Each space has its own set of dashboards, visualizations, and saved searches.
Dashboard Organization Best Practices
- Create dashboards per team or environment (e.g.,
dev,staging,production) - Use descriptive titles to quickly identify dashboard purpose
- Set appropriate refresh intervals for real-time monitoring needs
- Utilize Kibana's space feature to prevent dashboard clutter and maintain data isolation
10. Using Space Selectors
Space selectors in Kibana allow you to filter and view data within specific Kibana spaces. These selectors are essential for managing access and visibility of data across different environments or teams.
| Selector Type | Description | Usage |
|---|---|---|
| Space Selector Dropdown | Dropdown menu to switch between available Kibana spaces. | Located in the top navigation bar, accessible to users with appropriate permissions. |
| Space Selector API | API endpoint to programmatically select or switch spaces. | Used in scripts or integrations to automate space switching. |
Example: Switching Spaces via API
curl -X POST "http://localhost:5601/api/spaces/space-selector" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"spaceId": "my-space"}'
Note: Ensure that the user has appropriate permissions to access the target space. Unauthorized access attempts will be denied.
11. Importing Objects to Space
Example: Importing Saved Objects
{
"objects": [
{
"id": "dashboard-1",
"type": "dashboard",
"space": "marketing"
},
{
"id": "visualization-1",
"type": "visualization",
"space": "marketing"
}
],
"overwrite": true
}
| Field | Description | Values |
|---|---|---|
| objects | List of objects to import | Array of object definitions |
| overwrite | Overwrite existing objects | true or false |
| space | Target space for import | String identifier |
Note: Ensure the target space exists before importing objects.
Warning: Overwriting objects may cause loss of customizations.
12. Deleting Spaces
| Property | Description | Value |
|---|---|---|
| spaceId | Unique identifier of the Kibana space to delete | string |
| force | Flag to force deletion even if space contains data | boolean |
Example: Delete a Kibana Space
const deleteSpace = async (spaceId, force = false) => {
const response = await fetch(\`http://localhost:5601/api/spaces/space/\${spaceId}?force=\${force}\`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your-token>'
}
});
if (response.ok) {
console.log(\`Space \${spaceId} deleted successfully.\`);
} else {
console.error(\`Failed to delete space \${spaceId}.\`);
}
};
Note: Deleting a space is irreversible and will permanently remove all associated data and configurations.
Warning: Use
force: true with caution as it will delete all data within the space without confirmation.