Wiki¶
The wiki is the central place for "how we do things", runbooks, service docs, and notes.
Concept¶
- Folders (categories) group articles — every tenant has its own. If you have access to several tenants, you switch between them in the wiki; an article can only be filed in a folder of its own tenant.
- Articles in Markdown, one language per article (default German) — with full-text index + vector embeddings
- Service linking — an article can attach to a specific profile check, a check type, or individual hosts
- AI RAG source — the AI chat draws from the wiki as its first source
Create an article¶
/wiki → New article.
| Field | Meaning |
|---|---|
| Title | required |
| Category | from list or new |
| Tags | optional |
| Content | Markdown, with toolbar and live preview |
| Service links | n:m with profile checks / check types / hosts |
Editor toolbar: H1/H2/H3, bold, italic, code, link, lists, table, code block.
Service linking¶
An article can be linked to:
- a specific profile check (e.g. exactly this SNMP check on this profile)
- a check type in general (e.g. all
agent_diskchecks, regardless of profile) - a single host (for quirks that don't apply to every host)
Effect: on the host detail page, the affected check's quick-lookup gets access to the linked articles; AI service analysis prioritizes linked articles in its RAG context.
Example: an article "Disk-full runbook" is bound to the agent_disk check type — once a disk-full alert fires, the runbook is right there, regardless of the specific host.
Search¶
/wiki searches title + content with three combined methods:
- Full-text search (German FTS index)
- ILIKE fallback for partial strings (e.g. "backup" also finds "backup-script")
- Vector search (pgvector + embeddings) for semantically similar content
Embeddings¶
On article save, an embedding is computed in the background (asynchronously, so saving isn't blocked):
- Model: the embedding model configured under AI provider (e.g.
nomic-embed-textvia Ollama) - Storage:
wiki_articles.embedding, as an unconstrainedvectorcolumn type — it adapts to whatever dimension the configured embedding model produces (different models return different vector lengths, e.g. 768 fornomic-embed-text)
Missing embeddings (e.g. after a bulk import, or if no provider was configured at save time) are backfilled periodically by a background job.
asyncpg cast for vector
For custom SQL queries with pgvector: use CAST(:emb AS vector) instead of ::vector — asyncpg interprets :: as a bind parameter and breaks the cast.
Quick lookup on service detail¶
A quick wiki suggestion is available right on a host's service row — without any LLM call, purely deterministic and typically under 100 ms:
- Direct hit via linked articles (check type, profile check, or host)
- Fallback: full-text search over the service name
The suggestions can be hidden per user in preferences if they get in the way.
Soft delete¶
Articles are soft-deleted (see Trash) — deleted means hidden first, physically removed after 30 days. Service links survive a soft delete and are fully back after a restore.
Deep links¶
| URL | Effect |
|---|---|
/wiki |
overview |
/wiki?article=<id> |
open an article directly |
/wiki?new=1 |
new article with an empty modal |
Permissions¶
| Permission | Effect |
|---|---|
wiki.view |
view articles |
wiki.edit |
edit |
wiki.create |
create new |
wiki.delete |
soft delete |
Permanently deleting from trash goes through the general trash permissions, not a dedicated wiki permission.
Next¶
- AI chat & analysis — the wiki as a RAG source
- AI provider setup — what the embedding model is for