Skip to content

v1.2.2

Choose a tag to compare

@sooua sooua released this 07 Nov 18:23
· 3 commits to main since this release

Before you upgrade

  • 1.2.0 and 1.2.1 installs can update from Settings › Online update; the path we
    rehearsed is 1.2.1 → 1.2.2. 1.1.x installs still have to re-run the installer.
  • Copy the new rst-update.sh before you run it. It restarts only the app; the
    copy installed with 1.2.x also restarts PostgreSQL and Redis whenever the bundle
    brings newer images of them. In our test, where it did, the downtime was 24
    seconds with the old copy and 3 seconds with the new one.
    After Settings › Online update has downloaded 1.2.2, run this in the install
    directory, then run bash rst-update.sh as usual:
    cp "data/release/staging/$(sed -n 's/.*"kind":"updater","sha256":"\([0-9a-f]\{64\}\)".*/\1/p' data/release/current.json)" rst-update.sh
    On offline hosts, take rst-update.sh from the 1.2.2 bundle.
  • The first start runs five migrations: four new tables, two empty columns on
    one of them, one empty column on alerts, and two indexes on the Telegram thread table that are built online
    without locking it. In our test the indexes took under half a second for
    200,000 rows.
  • Group commands only work for people who have linked their Telegram account
    with /bind (get the code under Profile › Account Security).
  • To read replies that are posted in a ticket's topic without replying to a bot
    message, the bot must be a group administrator, or its privacy mode must be off
    (BotFather /setprivacy). Replies to the ticket card work either way.
  • The new comment API needs an API key with the tickets:comment scope, which you
    select separately. Existing keys and the old webhook secret do not get it.
  • The new status API needs an API key with the tickets:update scope. Select it
    explicitly: the full-access scope * does not include it, and a key with only
    * gets 403. Each key can call it 60 times a minute; beyond that it returns
    429.
  • Existing Telegram channels become Interactive channels and behave as before; no
    migration is needed. For a separate alert group, we recommend adding the same
    bot to two groups: set the alert group's channel to "Notify only" and the
    on-call group's channel to "Interactive" under Integrations › Telegram, and
    make the bot an administrator of the on-call group.
  • Going back to 1.2.1: rst-update.sh --rollback refuses because 1.2.2 has run
    database migrations. 1.2.1 runs on the new database unchanged, so no backup
    restore is needed: set APP_IMAGE_TAG=1.2.1 in .env and run
    docker compose up -d --no-deps app. On 1.2.1, replies and commands in the
    group are ignored without an answer, the follow-up, comment and status APIs
    return 404,
    pending AI follow-ups stay pending until you upgrade again, cards go back to
    the old format and the ai field of alerts is not stored, and email links use
    the ticket number again.
    1.2.1 ignores the Telegram channel role, so a notify-only channel goes back to
    receiving everything, including the event notifications it is subscribed to,
    and answers /status, /bind, /ai_pause, /ai_resume and approval buttons
    in its group. Disable notify-only channels before you switch, and enable them
    again after you upgrade. Do not edit a notify-only channel on 1.2.1: saving it
    there drops the role, and it comes back as an interactive channel. Tickets
    created while the alert channel is disabled get no card in the alert group, so
    their status updates do not reach it after you enable the channel again.

New

  • Telegram group commands. Reply to a ticket card, or to any bot message about the
    ticket, to work on it from the group. A plain reply becomes an internal note;
    /public posts a reply to the requester; /ack takes the ticket;
    /resolve and /close take a closure code and a note; /reopen takes a
    reason; /ask asks the AI a follow-up question. Each action is recorded under
    the linked SignalDesk user and needs the same permissions as on the web.
  • AI follow-ups: /ask records the question, and your sync program reads it
    with GET /api/open/followups (tickets:sync), then answers with a comment or
    reports a failure. The answer is posted as a reply to the question.
  • Open API for writing comments: POST /api/open/tickets/:idOrNumber/comments
    and POST /api/open/followups/:id/fail, with the new tickets:comment scope.
    Comments can be internal or public and are signed with the API key's name;
    Idempotency-Key makes retries safe. Comments written this way are also
    posted under the ticket's card in Telegram. See docs/alert-ingestion.md §11.
  • Open API for changing ticket status:
    POST /api/open/tickets/:idOrNumber/status, with the new tickets:update
    scope, so an automated triage program can take a ticket (IN_PROGRESS) and
    resolve it (RESOLVED, with a human closure code and a note, both required).
    Closing and reopening stay with people. Changes go through the same rules as
    on the web and show the API key's name as the operator; the response carries
    currentStatus, and Idempotency-Key makes retries safe. Closure codes set
    this way do not count as human verdicts for AI accuracy. See
    docs/alert-ingestion.md §13.
  • Ticket cards in Telegram use a fixed HTML layout: rule name, severity, ticket
    number, affected object, time, the AI verdict and suggestions when present, and
    a link to the ticket.
  • When another alert is merged into an open ticket, the group gets a "triggered
    again" message with the running count, at most one per ticket every 10 minutes.
  • Alerts can carry a top-level ai object (summary, likely false positive,
    recommended actions and more). It is stored with the alert and shown on the
    card; a malformed field is dropped without rejecting the alert. See
    docs/alert-ingestion.md §12.
  • Telegram channel roles, for running an alert group next to the on-call group.
    A "Notify only" channel receives only ticket cards, status updates and
    "triggered again" messages. Everything posted in its group (messages, commands,
    button presses) is dropped without a reply or a reaction. An "Interactive"
    channel (the default) receives everything, and the work happens there: AI
    investigations, follow-ups, comments from the open API, command confirmations,
    approvals, on-call pages and SLA escalations go only to interactive channels.
    Notify-only channels get no event notifications and no messages from
    automation rules, even when subscribed; choosing "Notify only" in the channel
    editor turns its event subscriptions off. Updating a channel through the API
    without a role keeps its current role. After a role change, messages from the
    group follow the new role right away on a single instance; with several app
    instances, the others follow within a minute.

Changes

  • When a plain reply is saved as a note, the bot adds a ✍ reaction to it instead
    of replying with text.
  • The bot limits how much it talks in a group: each person can send 20 messages a
    minute to it; command answers are capped at 5 per person and 15 per group a
    minute (the action itself still happens); hints such as "link your account
    first" go to the same person at most once every 10 minutes.
  • Cards no longer end with the "SignalDesk on-call assistant (AI)" signature; AI
    content is marked by the 🤖 AI verdict line.
  • Status updates in Telegram say more. The first line reads
    状态:<from> → <to> · <ticket number>, without the [AI] prefix, followed by
    who took the ticket or who made the change, the closure code by name (for
    example 误报 for FALSE_POSITIVE), the first 200 characters of the closure note,
    and the reason for a reopen. A reopen caused by the requester's email reply
    names "客户邮件回信" (customer email reply) instead of the sender.
    AUTO_RECOVERED is shown as 告警已恢复 (alert recovered).
  • Failed sign-ins and permission checks (401 and 403) are no longer logged as
    errors. Opening the sign-in page no longer adds an error to the log. A 403 on
    the open API or the alert webhooks is logged as a warning with the API key's id,
    so a key that lacks a scope is easy to find.

Fixes

  • "View ticket" links in emails open the ticket. They used the ticket number,
    which the ticket page does not accept.
  • Online update restarts only the app, not PostgreSQL and Redis (see Before you
    upgrade for how to get the new rst-update.sh).

Download and install

File Description
SignalDesk-1.2.2.tar.gz Offline bundle (app image and deployment files; Community Edition without a license, Enterprise Edition once one is imported)
SignalDesk-1.2.2.tar.gz.sha256 SHA-256 checksum
install.sh One-line installer
curl -fsSL https://github.com/reallysec/signaldesk/releases/download/v1.2.2/install.sh | sudo bash -s -- --version 1.2.2
中文说明

升级须知

  • 1.2.0、1.2.1 可在 设置 › 在线更新 中直接更新,已演练路径为 1.2.1 → 1.2.2。1.1.x 仍须重跑安装脚本升级。
  • 执行前先换上新的 rst-update.sh:新版只重启应用;1.2.x 装的旧版在交付包带了更新的 PostgreSQL、Redis 镜像时,
    会把它们一起重启。演练中正是这种情况,实测停机:旧版 24 秒,新版 3 秒。在 设置 › 在线更新 下载好 1.2.2 之后,在安装目录执行下面这条命令,
    再照常 bash rst-update.sh:
    cp "data/release/staging/$(sed -n 's/.*"kind":"updater","sha256":"\([0-9a-f]\{64\}\)".*/\1/p' data/release/current.json)" rst-update.sh
    离线主机用 1.2.2 交付包里的 rst-update.sh。
  • 首次启动执行五份迁移:新建四张表,其中一张再加两个空列,告警表加一个空列,Telegram 话题表上在线建两个索引(不锁表)。
    实测 20 万行建索引不到半秒。
  • 群命令只对已用 /bind 绑定 SignalDesk 账号的人生效(绑定码在 个人设置 › 账户安全 生成)。
  • 在工单话题里直接发、没有回复 bot 消息的文字,要 bot 是群管理员或关掉隐私模式(BotFather /setprivacy)才收得到。
    回复工单卡片不受影响。
  • 新的写评论接口要求 API Key 单独勾选 tickets:comment 作用域。已有的 Key 和旧的 Webhook 接入凭据都没有这一项。
  • 新的改状态接口要求 API Key 显式勾选 tickets:update:全量作用域 * 不包含它,只有 * 的 Key 调用返回 403。
    这个接口按 Key 限流,每把 Key 每分钟最多 60 次,超出返回 429。
  • 已有的 Telegram 渠道都按「交互」处理,行为不变,不需要迁移。要另设告警群时,推荐同一个 bot 拉进两个群:
    在 接入 › Telegram 把告警群的渠道设为「仅通知」、值班群的渠道设为「交互」,并把 bot 设为值班群的管理员。
  • 回到 1.2.1:1.2.2 执行过数据库迁移,rst-update.sh --rollback 会拒绝。1.2.1 在新库上照常能跑,不必还原备份:
    把 .env 的 APP_IMAGE_TAG 改成 1.2.1 后执行 docker compose up -d --no-deps app。回到 1.2.1 后:
    群里的回复和命令不再处理、也不回应;追问、写评论与改状态接口返回 404;未处理的 AI 追问保持待处理,重新升级后可以继续写回;
    卡片回到旧格式,告警的 ai 字段不再保存;邮件链接又按工单号生成。
    1.2.1 不认渠道角色,「仅通知」渠道会变回全量收发:订阅了的事件通知照常收,群里的 /status、/bind、/ai_pause、
    /ai_resume 和审批按钮也会响应。所以切换前先停用「仅通知」渠道,升回 1.2.2 后再启用。在 1.2.1 上不要编辑「仅通知」渠道:
    在那里保存会丢掉角色,升级回来就成了交互渠道。停用告警渠道期间新建的工单,告警群里没有卡片,重新启用后这些工单的状态通报也到不了告警群。

新功能

  • Telegram 群命令:回复工单卡片,或回复 bot 在这张单下发的任何一条消息,就能在群里处理工单。直接回复记为内部备注;
    /public 对外回复报单人;/ack 认领;/resolve、/close 带结案码和说明;/reopen 带原因;/ask 发起 AI 追问。
    每个操作都记在绑定的 SignalDesk 用户名下,权限与网页端相同。
  • AI 追问:/ask 只记下问题,客户侧的同步程序用 GET /api/open/followups(tickets:sync)拉取,查完写回评论或报失败,
    结论以回复的方式发到发问的那条消息下。
  • 开放写评论接口:POST /api/open/tickets/:idOrNumber/comments 与 POST /api/open/followups/:id/fail,新作用域
    tickets:comment。评论可选内部或对外,署名带 API Key 的名字;带 Idempotency-Key 重试不会重复写入。
    这样写入的评论也会推到 Telegram 里这张单的卡片下。见 docs/alert-ingestion.md 第 11 节。
  • 开放改工单状态接口:POST /api/open/tickets/:idOrNumber/status,新作用域 tickets:update,给客户侧的自动分诊程序用:
    受理转「处理中」(IN_PROGRESS),处置完转「已解决」(RESOLVED,人工结案码和说明必填)。关闭、重开仍由人来做。
    走的是与网页端同一套流转规则,操作人记为 API Key 的名字;返回带 currentStatus,带 Idempotency-Key 重试不会重复执行。
    这样给的结案码不计入 AI 的人工判定。见 docs/alert-ingestion.md 第 13 节。
  • Telegram 工单卡片改为固定的 HTML 格式:规则名、级别、工单号、对象、时间,有 AI 结论和建议时一并显示,末尾是工单链接。
  • 又有告警并入未结案工单时,群里发一条「同一对象又触发」并带累计次数,同一张单 10 分钟内最多一条。
  • 告警报文可以在顶层带 ai 对象(结论、是否疑似误报、建议动作等),随告警保存并显示在卡片上;某个字段不合格只丢掉这一项,
    不会拒收告警。见 docs/alert-ingestion.md 第 12 节。
  • Telegram 渠道角色,用于在值班群之外再设一个告警群。「仅通知」渠道只收三类消息:工单卡片、状态通报、「同一对象又触发」;
    群里的消息、命令、按钮一律丢弃,不回提示,也不打表情。「交互」渠道(默认)收全部消息,处理过程都在这里:
    AI 调查、追问、开放接口写评论的推送、命令确认、审批、值班呼叫、SLA 升级只发交互渠道。仅通知渠道订阅了事件也不收事件通知,
    也不收自动化规则的「发通知」;在渠道编辑里选了「仅通知」,事件订阅随即禁用。通过接口修改渠道时不传 role,沿用原来的角色。
    改了角色以后,群里发来的消息单实例下立即按新角色处理;多实例部署时其他实例最多一分钟。

行为变化

  • 普通回复记成备注后,bot 改为给原消息打一个 ✍ 表情,不再回文字。
  • bot 控制在群里的发言量:每人每分钟最多给它发 20 条;命令回复每人每分钟最多 5 条、每个群最多 15 条(超出的不回,操作照常生效);
    「请先绑定」之类的提示,同一个人 10 分钟内最多一次。
  • 卡片末尾不再有「— SignalDesk 值班助手(AI)」签名,AI 产出的内容由「🤖 AI 结论」一行标明。
  • Telegram 状态通报更详细:首行是「状态:A → B · 工单号」,去掉了 [AI] 前缀;下面写接手人或操作人、结案码中文名
    (如 FALSE_POSITIVE 写「误报」)、结案说明前 200 字、重开原因。报单人邮件回信触发的重开,操作人写「客户邮件回信」,
    不写发件人。AUTO_RECOVERED 显示为「告警已恢复」。
  • 401、403(未登录、无权限、缺作用域)不再按错误记日志,打开登录页不会再多一条错误日志。开放接口与告警入口的 403
    记为警告并带上 API Key 的 id,方便找到缺作用域的那把 Key。

修复

  • 邮件里的「查看工单」链接能正常打开工单。之前链接用的是工单号,工单页不认。
  • 在线更新只重启应用,不再连带重启 PostgreSQL 和 Redis(新 rst-update.sh 的换法见升级须知)。

下载与安装

文件 说明
SignalDesk-1.2.2.tar.gz 离线一体包(应用镜像 + 部署文件;不导入许可为社区版,导入许可为企业版)
SignalDesk-1.2.2.tar.gz.sha256 SHA-256 校验文件
install.sh 一行安装脚本
curl -fsSL https://github.com/reallysec/signaldesk/releases/download/v1.2.2/install.sh | sudo bash -s -- --version 1.2.2