Editing profiles¶
/profiles is the central page to manage profiles and their profile-checks.
Since v0.19.1
16 UX improvements: capability filters, inline threshold edit, clone, export/import, sort arrows, keyboard shortcuts.
Overview¶
┌──────────────────────────────────────────────────────────────────┐
│ Profiles [+ New] [Import] [Export] │
│ │
│ Search: [/] │
│ Filter: [Agent] [SNMP] [Custom] [Modified] [Empty] │
├──────────────────────────────────────────────────────────────────┤
│ Server │
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
│ │ Generic │ │ Linux Web │ │ Windows │ │
│ │ Linux │ │ Server │ │ Server │ │
│ │ • 12 hosts │ │ • 4 hosts │ │ • 8 hosts │ │
│ │ Agent SNMP │ │ Agent │ │ Agent │ │
│ └────────────┘ └────────────┘ └────────────┘ │
│ Network Devices │
│ ... │
└──────────────────────────────────────────────────────────────────┘
Card pattern¶
Each card shows:
- Profile name + icon
- Host count (or yellow border + „no hosts" if unused)
- Capability pills (Agent, SNMP, Custom, Modified)
- On click: profile modal with all profile-checks
Filters & search¶
| Pill | Shows |
|---|---|
| Agent | Profiles with agent_capable = true |
| SNMP | Profiles with snmp_enabled = true |
| Custom | Profiles with is_builtin = false |
| Modified | Builtins with is_modified = true |
| Empty | Profiles without hosts (cleanup candidates) |
Keyboard shortcuts:
- ++slash++ — focus search
- ++n++ — new profile
- ++esc++ — close modal
Profile modal¶
┌─ Profile 'Generic Linux Server' ────────────── [Clone] [Export] ─┐
│ │
│ Basics │
│ Name: Generic Linux Server │
│ Category: Server │
│ Vendor: Generic │
│ Icon: [server-icon] │
│ │
│ Advanced ▼ │
│ sysOID patterns: [.1.3.6.1.4.1.8072.3.2.10] [+] │
│ sysDescr patterns: [Linux] [+] │
│ Capabilities: [✓] Agent [✓] SNMP [_] IP required │
│ OS family: linux │
│ Visual type: (none) │
│ │
│ Profile-checks (8) [+ Check] │
│ ↑↓ CPU Load agent_cpu 60s W>80 C>95 [Edit] │
│ ↑↓ RAM Usage agent_memory 60s W>85 C>95 [Edit] │
│ ↑↓ Disk Usage / agent_disk 300s W>80 C>95 [Edit] │
│ ... │
└──────────────────────────────────────────────────────────────────┘
Sections¶
- Basics — name, category, vendor, icon (Lucide picker)
- Advanced (collapsible) — patterns, capabilities, visual type, OS
Profile-check list¶
Per check the table shows:
- Sort arrows (
↑↓) for reordering - Name + check type
- Interval in seconds
- Threshold-warn / threshold-crit in notation
W>80 · C>95 - Edit button
Inline threshold edit¶
Instead of opening the edit modal, you can adjust thresholds directly:
- Click the threshold value
- Mini inputs appear
- Enter saves, Escape discards
Useful when you only want to tune thresholds, not the full config.
Edit profile-check (modal)¶
In the edit modal:
| Field | Note |
|---|---|
| Name | Display name |
| Check type | Editable on new only — locked on existing with warning |
| Check mode | Active / Passive / Agent |
| Check config | JSONB editor with schema validation per check type |
| Threshold-warn / -crit | Floats |
| Interval / Retry / Max attempts | Numbers |
| Script-ID | Dropdown with builtin and custom scripts |
auto_add |
Auto-create on profile apply? |
Check-type change
Changing the check type reinterprets the config. A data-loss warning appears before save.
Clone¶
Clones a profile + all profile-checks as a new custom profile with auto-rename:
"Generic Linux Server" → "Generic Linux Server (Copy)"
"Generic Linux Server" → "Generic Linux Server (Copy 2)" (second time)
Clones are is_builtin = false, is_modified = false. Freely editable.
Export¶
JSON bundle with schema version:
Browser-side download, no server state.
Import¶
Accepts JSON bundle or ZIP with multiple bundles.
- Magic-bytes detection (
PKfor ZIP) - One savepoint per bundle — bad bundles don't break the rest
- Auto-rename on name collision:
(Import),(Import 2), … - Schema version check via
PROFILE_BUNDLE_SCHEMA_VERSION
curl -X POST -H "Authorization: Bearer <JWT>" \
-F "file=@my-profiles.zip" \
https://your-domain.tld/api/v1/profiles/import
Reset (builtin)¶
A modified builtin (is_modified = true) shows a Reset button. Restores the profile and all profile-checks to seed defaults.
Confirmation dialog before reset.
Usage preview¶
On profile delete, a pre-modal shows:
Profile 'Generic Linux Server' is in use by:
- 12 hosts
- 86 services
Example hosts:
- web01.acme.local
- db01.acme.local
...
If you proceed, these hosts will be left without a profile.
Really delete?
[Cancel] [Delete]
Backed by GET /profiles/{id}/usage → {host_count, service_count, examples[5]}.
Sort & order¶
Profile-checks have a display_order index. Sort arrows change order — relevant for service list display on the host detail page.
API¶
| Endpoint | Purpose |
|---|---|
GET /api/v1/profiles/ |
List with host_count |
GET /api/v1/profiles/{id} |
Detail |
POST /api/v1/profiles/ |
Create |
PATCH /api/v1/profiles/{id} |
Update |
DELETE /api/v1/profiles/{id} |
Delete |
GET /api/v1/profiles/{id}/usage |
Impact preview |
POST /api/v1/profiles/{id}/clone |
Clone |
GET /api/v1/profiles/{id}/export |
JSON bundle |
POST /api/v1/profiles/import |
Bundle/ZIP import |
POST /api/v1/profiles/{id}/apply |
Apply to host |
GET /api/v1/profiles/{id}/checks |
Profile-checks |
POST /api/v1/profiles/{id}/checks/{check_id}/reset |
Reset builtin check |
Next¶
- Discovery — new device, which profile fits?
- SNMP sensor picker — when defaults miss sensors
- MIB snippets — vendor-specific knowledge