vss-manage-alerts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
用途
Operate the VSS alert pipeline (mode detection, Alert-Bridge subscriptions, Slack notifications, queries, camera onboarding, verifier-prompt customization).
操作VSS告警流水线(模式检测、Alert-Bridge订阅、Slack通知、查询、摄像头接入、验证器提示自定义)。
Prerequisites
前置条件
- Active VSS deployment reachable on (see
$HOST_IPandvss-deploy-profile).references/ - NGC credentials in and
$NGC_CLI_API_KEYfor any image pulls.$NVIDIA_API_KEY - ,
curl, and Docker available on the caller.jq
- 可通过访问的活跃VSS部署(参见
$HOST_IP和vss-deploy-profile目录)。references/ - 用于镜像拉取的和
$NGC_CLI_API_KEY格式的NGC凭证。$NVIDIA_API_KEY - 调用端需安装、
curl和Docker。jq
Instructions
操作说明
Follow the routing tables and step-by-step workflows below. Each section that ends in workflow, quick start, or flow is intended to be executed top-to-bottom. Detailed reference material lives in and helper scripts live in — call them via when the skill points to a script by name.
references/scripts/run_script遵循下方的路由表和分步工作流。所有以workflow、quick start或flow结尾的章节都需要从上到下执行。详细参考资料位于目录,辅助脚本位于目录——当技能指向某个脚本名称时,通过调用它们。
references/scripts/run_scriptExamples
示例
Worked end-to-end examples are kept under (each manifest contains a runnable scenario) and inline in the per-workflow blocks below. Run a Tier-3 evaluation with to replay them.
evals/*.jsoncurlnv-base validate <this-skill-dir> --agent-eval完整的端到端示例保存在目录下(每个清单包含一个可运行场景),同时内嵌在下方各工作流的代码块中。运行即可重放这些示例,完成Tier-3评估。
evals/*.jsoncurlnv-base validate <this-skill-dir> --agent-evalLimitations
限制条件
- Requires the matching VSS profile / microservice to be deployed and reachable from the caller.
- NGC-hosted models and NIMs may be subject to rate-limits, GPU memory requirements, and license restrictions.
- Concurrency, GPU memory, and storage limits depend on the host hardware and the profile's compose file.
- 要求匹配的VSS配置文件/微服务已部署,且调用端可访问。
- NGC托管的模型和NIM可能受速率限制、GPU内存要求和许可证限制约束。
- 并发数、GPU内存和存储限制取决于主机硬件和配置文件的compose文件。
Troubleshooting
故障排查
- Error: REST call returns connection refused. Cause: target microservice not running. Solution: probe or
/docs; redeploy via/healthor the matchingvss-deploy-profileskill.vss-deploy-* - Error: HTTP 401/403 from NGC pulls. Cause: missing/expired . Solution:
NGC_CLI_API_KEYand re-export the key before retrying.docker login nvcr.io - Error: container OOM or model fails to load. Cause: insufficient GPU memory for the selected profile. Solution: switch to a smaller variant or free GPUs via .
docker compose down
- 错误:REST调用返回连接拒绝。原因:目标微服务未运行。解决方案:探测或
/docs端点;通过/health或对应的vss-deploy-profile技能重新部署。vss-deploy-* - 错误:NGC拉取时返回HTTP 401/403。原因:缺失或过期。解决方案:执行
NGC_CLI_API_KEY并重新导出密钥后重试。docker login nvcr.io - 错误:容器内存不足(OOM)或模型加载失败。原因:所选配置文件的GPU内存不足。解决方案:切换到更小的变体,或通过释放GPU资源。
docker compose down
VSS Alert Management
VSS告警管理
The alerts profile is deployed in one of two modes at a time. The mode is chosen at .
/vss-deploy-profile -p alerts -m {verification,real-time}- CV (verification) mode runs the static CV pipeline (RT-CV + Behavior Analytics + VLM verifier) and the dynamic
alert-bridgereal-time service. Workflow A (static CV alerts) and Workflow B (VLM monitoring) are available; Workflows D and E require VLM real-time mode.rtvi-vlm - VLM (real-time) mode runs only for dynamic real-time alerts. CV pipeline (RT-CV, Behavior Analytics) is not running, so Workflow A is unavailable.
rtvi-vlm
This skill routes by deployed mode + user intent (monitoring vs subscription CRUD vs Slack webhook operations).
告警配置文件一次仅能以两种模式之一部署。模式通过选择。
/vss-deploy-profile -p alerts -m {verification,real-time}- CV(验证)模式运行静态CV流水线(RT-CV + Behavior Analytics + VLM验证器)以及动态
alert-bridge实时服务。支持工作流A(静态CV告警)和工作流B(VLM监控);工作流D和E需要VLM实时模式。rtvi-vlm - VLM(实时)模式仅运行以实现动态实时告警。CV流水线(RT-CV、Behavior Analytics)未运行,因此工作流A不可用。
rtvi-vlm
本技能根据部署模式 + 用户意图(监控 vs 订阅增删改查 vs Slack webhook操作)进行路由。
When to Use
使用场景
- Start or stop a real-time alert on a sensor ("Start real-time alert for boxes dropped on sensor warehouse_sample")
- Create, list, or stop realtime subscription rules on Alert Bridge ("List active realtime rules on warehouse-dock-1")
- Set up or manage Slack incident notifications ("Start alert Slack webhook and send test notification")
- List or query detected incidents / alerts
- Add a new camera to the alerts pipeline
- Customize the VLM-verifier prompts (CV mode)
- Check verdicts (confirmed / rejected / unverified)
- 启动或停止传感器上的实时告警("为warehouse_sample传感器启动实时告警,检测掉落的箱子")
- 在Alert Bridge上创建、列出或停止实时订阅规则("列出warehouse-dock-1上的活跃实时规则")
- 设置或管理Slack事件通知("启动告警Slack webhook并发送测试通知")
- 列出或查询已检测到的事件/告警
- 将新摄像头添加到告警流水线
- 自定义VLM验证器提示(CV模式)
- 查看判定结果(已确认/已拒绝/未验证)
Deployment prerequisite
部署前置条件
Requires the VSS alerts profile on in either (CV) or (VLM) mode.
$HOST_IPverificationreal-timebash
undefined要求上的VSS alerts配置文件处于(CV)或(VLM)模式之一。
$HOST_IPverificationreal-timebash
undefinedEither perception-alerts (CV mode) OR rtvi-vlm (VLM mode) must be present.
必须存在perception-alerts(CV模式)或rtvi-vlm(VLM模式)其一。
curl -sf --max-time 5 "http://${HOST_IP}:8000/docs" >/dev/null
&& docker ps --format '{{.Names}}'
| grep -qE '^(perception-alerts|rtvi-vlm)$'
&& docker ps --format '{{.Names}}'
| grep -qE '^(perception-alerts|rtvi-vlm)$'
If the probe fails, ask the user which mode to deploy and hand off to
`/vss-deploy-profile -p alerts -m <mode>`. If the user declines, stop. If the
caller pre-authorized autonomous deploy, run it directly with mode
`verification` by default. If it passes, detect the mode per Step 1.
---curl -sf --max-time 5 "http://${HOST_IP}:8000/docs" >/dev/null
&& docker ps --format '{{.Names}}'
| grep -qE '^(perception-alerts|rtvi-vlm)$'
&& docker ps --format '{{.Names}}'
| grep -qE '^(perception-alerts|rtvi-vlm)$'
如果探测失败,请询问用户要部署哪种模式,并转交至`/vss-deploy-profile -p alerts -m <mode>`。如果用户拒绝,则停止操作。如果调用者预先授权自动部署,则默认以`verification`模式直接运行。如果探测通过,请按照步骤1检测模式。
---The Two Modes (Deploy-Time Choice)
两种模式(部署时选择)
| Mode | Deploy flag | Env ( | What runs | What is available |
|---|---|---|---|---|
| CV (verification) | | | RT-CV (Grounding DINO) + Behavior Analytics + | Both static CV pipeline (Workflow A) and dynamic VLM real-time alerts (Workflows B/D) |
| VLM (real-time) | | | | Only dynamic VLM real-time alerts (Workflows B/D) and |
Switching modes requires the teardown and deploy flow with the other flag. Going from VLM → CV adds the static CV pipeline; going from CV → VLM tears down the CV pipeline. is present in both modes.
vss-deploy-profile-mrtvi-vlm| 模式 | 部署参数 | 环境变量( | 运行组件 | 可用功能 |
|---|---|---|---|---|
| CV(验证) | | | RT-CV(Grounding DINO) + Behavior Analytics + | 同时支持静态CV流水线(工作流A)和动态VLM实时告警(工作流B/D) |
| VLM(实时) | | | | 仅支持动态VLM实时告警(工作流B/D)和 |
切换模式需要使用的销毁和部署流程,并搭配另一个参数。从VLM切换到CV会添加静态CV流水线;从CV切换到VLM会销毁CV流水线。在两种模式下均会运行。
vss-deploy-profile-mrtvi-vlmStep 1 — Detect the Currently Deployed Mode
步骤1 — 检测当前部署模式
Before running any alert workflow, check which mode is live. Use CV-only containers as the signal — is not a reliable mode signal anymore because it runs in both modes.
rtvi-vlmbash
undefined在运行任何告警工作流之前,请检查当前处于哪种模式。以仅CV模式的容器作为判断信号——不再是可靠的模式信号,因为它在两种模式下都会运行。
rtvi-vlmbash
undefinedCV verification mode (behavior analytics + perception-alerts are CV-only)
CV验证模式(behavior analytics + perception-alerts为仅CV组件)
docker ps --format '{{.Names}}' | grep -qx vss-behavior-analytics-alerts && echo "mode=CV"
docker ps --format '{{.Names}}' | grep -qx vss-behavior-analytics-alerts && echo "mode=CV"
VLM real-time mode (no CV pipeline; only rtvi-vlm)
VLM实时模式(无CV流水线;仅运行rtvi-vlm)
docker ps --format '{{.Names}}' | grep -qx vss-behavior-analytics-alerts ||
docker ps --format '{{.Names}}' | grep -qx rtvi-vlm && echo "mode=VLM"
docker ps --format '{{.Names}}' | grep -qx rtvi-vlm && echo "mode=VLM"
If `vss-behavior-analytics-alerts` is present → **CV mode** (which also has `rtvi-vlm`).
If only `rtvi-vlm` is present (and no CV pipeline) → **VLM mode**.
If neither matches, the alerts profile is not deployed — direct the user to the `vss-deploy-profile` skill.
Alternative signal (preferred when `docker ps` isn't accessible): check the profile's `.env`:
```bash
grep -E '^MODE=' deployments/developer-workflow/dev-profile-alerts/.envdocker ps --format '{{.Names}}' | grep -qx vss-behavior-analytics-alerts ||
docker ps --format '{{.Names}}' | grep -qx rtvi-vlm && echo "mode=VLM"
docker ps --format '{{.Names}}' | grep -qx rtvi-vlm && echo "mode=VLM"
如果存在`vss-behavior-analytics-alerts` → **CV模式**(同时包含`rtvi-vlm`)。
如果仅存在`rtvi-vlm`(且无CV流水线) → **VLM模式**。
如果两者都不匹配,则告警配置文件未部署——引导用户使用`vss-deploy-profile`技能。
替代判断信号(当无法访问`docker ps`时优先使用):检查配置文件的`.env`文件:
```bash
grep -E '^MODE=' deployments/developer-workflow/dev-profile-alerts/.envMODE=2d_cv → CV mode (full superset)
MODE=2d_cv → CV模式(完整功能集)
MODE=2d_vlm → VLM real-time mode (rtvi-vlm only)
MODE=2d_vlm → VLM实时模式(仅rtvi-vlm)
---
---Step 2 — Route by Deployed Mode
步骤2 — 根据部署模式路由
| Deployed mode | User asks about… | Action |
|---|---|---|
| VLM real-time | Slack webhook setup/status/test/stop | Run Workflow E (Slack Notifications) — follow |
| VLM real-time | subscription / rule CRUD, or set up / create / watch / flag a realtime alert on a specific sensor with a detection condition | Run Workflow D (Alert Subscriptions) — follow |
| CV verification | subscription/rule CRUD or Slack/notification setup | Refuse — see Canonical refusal text below |
| CV or VLM | generic start/stop monitoring via VSS Agent without a specific detection condition (e.g. "start real-time alert for sensor warehouse_sample") | Run Workflow B (VLM) — call the VSS Agent with a detection prompt. |
| CV or VLM | incident lookup / list / query (recent alerts, time-range queries) | Run Workflow C (Query) — |
| CV | static CV alert onboarding (just add the camera and let CV pipeline emit alerts) / verdict prompts customization | Run Workflow A (CV) — onboard RTSP via |
| VLM | specifically a CV / behavior-analytics / PPE-rule alert that requires the static CV pipeline | Redeployment required. Confirm with the user first, then point to the |
Always confirm before triggering a redeploy. A mode switch stops all currently-running monitoring and restarts services.
| 部署模式 | 用户需求… | 操作 |
|---|---|---|
| VLM实时 | Slack webhook设置/状态/测试/停止 | 运行工作流E(Slack通知)——遵循 |
| VLM实时 | 订阅/规则增删改查,或为特定传感器设置/创建/监控/标记带检测条件的实时告警 | 运行工作流D(告警订阅)——遵循 |
| CV验证 | 订阅/规则增删改查或Slack/通知设置 | 拒绝——参见下方标准拒绝文本 |
| CV或VLM | 通过VSS Agent进行通用启动/停止监控,无特定检测条件(例如"为warehouse_sample传感器启动实时告警") | 运行工作流B(VLM)——调用VSS Agent并传入检测提示。 |
| CV或VLM | 事件查询/列出/检索(最近告警、时间范围查询) | 运行工作流C(查询)—— |
| CV | 静态CV告警接入(仅添加摄像头,让CV流水线自动生成告警)/判定提示自定义 | 运行工作流A(CV)——通过 |
| VLM | 明确需要静态CV流水线的CV/行为分析/PPE规则告警 | 需要重新部署。先与用户确认,然后引导至 |
触发重新部署前务必确认。模式切换会停止所有当前运行的监控,并重启服务。
Intent precedence (first match wins)
意图优先级(匹配即生效)
- Workflow E (Slack) — Slack-specific keywords (,
slack+webhook,slack,bot token).slack channelalone is not sufficient.notify - Workflow D (Subscriptions) — sensor name plus a detection condition, or rule CRUD keywords (,
rule, rule ID).subscription - Workflow B (VLM monitoring) — generic start/stop on a sensor with no detection condition.
- Workflow C (Query) — incident lookup (,
show/list incidents, time-range queries).recent alerts - Workflow A (CV) — CV deployment handling for anything not matched above.
Disambiguation (B vs D): if a sensor is named with start/monitor language but the detection condition is unclear, ask:
"Do you want me to (a) create a persistent alert rule on Alert Bridge that keeps running until you delete it, or (b) start a one-time monitoring session via the VSS Agent?"
If a prompt mixes workflows ("start monitoring and send to Slack"), ask one clarifying question to split execution order.
- 工作流E(Slack)——包含Slack特定关键词(、
slack+webhook、slack、bot token)。仅slack channel一词不足以触发。notify - 工作流D(订阅)——包含传感器名称以及检测条件,或规则增删改查关键词(、
rule、规则ID)。subscription - 工作流B(VLM监控)——针对传感器的通用启动/停止操作,无检测条件。
- 工作流C(查询)——事件查询(、
show/list incidents、时间范围查询)。recent alerts - 工作流A(CV)——CV部署下未匹配上述情况的操作。
歧义处理(B vs D):如果请求包含传感器名称和启动/监控表述,但检测条件不明确,请询问:
"请问您需要我(a)在Alert Bridge上创建持久化告警规则,该规则会持续运行直至您删除;还是(b)通过VSS Agent启动一次性监控会话?"
如果请求混合多个工作流(例如"启动监控并发送至Slack"),请提出一个澄清问题以拆分执行顺序。
CV-mode refusal text for D and E intents
CV模式下针对D和E意图的标准拒绝文本
When the deployed mode is CV verification and the user asks for an alert-subscription or Slack/notification intent, refuse with this message verbatim:
"Alert subscriptions and Slack notifications are only supported in VLM real-time mode. Your current deployment is. To use these features, redeploy with<CV verification | not deployed>(note: switching tears down current CV monitoring)."/vss-deploy-profile -p alerts -m real-time
No auto-redeploy. The user decides whether to switch modes.
当部署模式为CV验证,且用户请求告警订阅或Slack/通知相关操作时,请逐字使用以下消息拒绝:
"告警订阅和Slack通知仅在VLM实时模式下支持。您当前的部署为。如需使用这些功能,请通过<CV验证 | 未部署>重新部署(注意:切换模式会销毁当前CV监控)。"/vss-deploy-profile -p alerts -m real-time
禁止自动重新部署。由用户决定是否切换模式。
Prereq for Either Mode: Sensor Must Be in VIOS
两种模式的共同前置条件:传感器必须已加入VIOS
Both modes require the camera to be registered in VIOS first.
- If the user hands you only an RTSP URL (or an IP camera) — defer to the skill to add it via
vss-manage-video-io-storage(seePOST /sensor/addskill Section 6). Record the returnedvss-manage-video-io-storage/ name.sensorId - If the user names an existing sensor — confirm it is listed by via the
GET /sensor/listskill before proceeding.vss-manage-video-io-storage
On a CV deployment, adding the RTSP is the entire onboarding step — the pipeline picks up the stream automatically once it is in VIOS. On a VLM deployment, adding the RTSP is a prerequisite to Workflow B.
两种模式都要求摄像头先在VIOS中注册。
- 如果用户仅提供RTSP URL(或IP摄像头)——转交至技能,通过
vss-manage-video-io-storage添加(参见该技能第6节)。记录返回的POST /sensor/add/名称。sensorId - 如果用户指定现有传感器——在继续操作前,通过技能的
vss-manage-video-io-storage确认该传感器已列出。GET /sensor/list
在CV部署中,添加RTSP就是完整的接入步骤——一旦传感器在VIOS中注册并上线,流水线会自动获取流。在VLM部署中,添加RTSP是工作流B的前置条件。
The Agent /generate
Endpoint
/generateAgent /generate
端点
/generateAll VLM-flow actions and all query actions go through the VSS Agent's natural-language endpoint:
bash
AGENT="http://<AGENT_ENDPOINT>" # default http://localhost:8000 on the alerts profile
curl -s -X POST "$AGENT/generate" \
-H "Content-Type: application/json" \
-d '{"input_message": "<natural-language request>"}' | jq .Endpoint resolution: use the agent endpoint from the active VSS deployment context. If unavailable, ask the user. Do not discover via filesystem.
Availability check: .
curl -sf --connect-timeout 5 "$AGENT/docs"Do not call the microservice endpoints directly — always go through the agent. The agent internally dispatches to , , and .
rtvi-vlmrtvi_vlm_alertrtvi_prompt_genvideo_analytics_mcp.get_incidents所有VLM流操作和查询操作都通过VSS Agent的自然语言端点完成:
bash
AGENT="http://<AGENT_ENDPOINT>" # 告警配置文件的默认地址为http://localhost:8000
curl -s -X POST "$AGENT/generate" \
-H "Content-Type: application/json" \
-d '{"input_message": "<自然语言请求>"}' | jq .端点解析:使用活跃VSS部署上下文的agent端点。如果不可用,请询问用户。不要通过文件系统查找。
可用性检查:。
curl -sf --connect-timeout 5 "$AGENT/docs"请勿直接调用微服务端点——始终通过agent调用。agent会内部调度至、和。
rtvi-vlmrtvi_vlm_alertrtvi_prompt_genvideo_analytics_mcp.get_incidentsWorkflow A — CV Mode (-m verification
/ MODE=2d_cv
)
-m verificationMODE=2d_cv工作流A — CV模式(-m verification
/ MODE=2d_cv
)
-m verificationMODE=2d_cvCV alerts are deployment-driven, not request-driven — there is no agent
call to "create" one.
- Check if the sensor is already in VIOS via 's
vss-manage-video-io-storage(idempotent — never blindlyGET /sensor/list).POST /sensor/add - If missing, onboard via
vss-manage-video-io-storage(see that skill's Section 6). The CV pipeline picks up the stream automatically once it is registered and online.POST /sensor/add - Confirm online:
curl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/status" | jq . - Wait for alerts to land in Elasticsearch (Behavior Analytics → VLM verification per
alert-bridge). Query results with Workflow C.alert_type_config.json
If the user asks for a static-CV-pipeline alert on a VLM-only deployment, that is a mode mismatch — see the routing table above.
CV告警是部署驱动,而非请求驱动——无需调用agent来"创建"告警。
- 通过的
vss-manage-video-io-storage检查传感器是否已加入VIOS(幂等操作——请勿盲目执行GET /sensor/list)。POST /sensor/add - 如果缺失,通过的
vss-manage-video-io-storage接入(参见该技能第6节)。一旦传感器注册并上线,CV流水线会自动获取流。POST /sensor/add - 确认在线:
curl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/status" | jq . - 等待告警写入Elasticsearch(Behavior Analytics → VLM验证,遵循
alert-bridge)。通过工作流C查询结果。alert_type_config.json
如果用户在仅VLM部署中请求静态CV流水线告警,属于模式不匹配——参见上方路由表。
Workflow B — VLM Real-time Monitoring (CV or VLM mode)
工作流B — VLM实时监控(CV或VLM模式)
Generic start / stop intents through the VSS Agent for a named sensor
without a detection condition (if a condition is present, route to
Workflow D). runs in both modes.
rtvi-vlmbash
undefined通过VSS Agent对指定传感器执行通用启动/停止操作,无检测条件(如果存在检测条件,请路由至工作流D)。在两种模式下均运行。
rtvi-vlmbash
undefinedstart: input_message = "Start real-time alert for sensor <id>"
启动:input_message = "为传感器<id>启动实时告警"
stop: input_message = "Stop real-time alert for sensor <id>"
停止:input_message = "为传感器<id>停止实时告警"
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "<start|stop> real-time alert for sensor <id>"}' | jq .
-d '{"input_message": "<start|stop> real-time alert for sensor <id>"}' | jq .
Under the hood the agent calls `rtvi_prompt_gen` then
`rtvi_vlm_alert action="start"`. Alert semantics: every chunk is
captioned; a chunk whose VLM response contains `yes` / `true`
(case-insensitive) publishes an incident to `mdx-vlm-incidents`.
Prompts must force a Yes/No answer. A static-CV-pipeline request on a
VLM-only deployment is a mode mismatch — see the routing table.
---curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "<start|stop> real-time alert for sensor <id>"}' | jq .
-d '{"input_message": "<start|stop> real-time alert for sensor <id>"}' | jq .
底层逻辑为agent先调用`rtvi_prompt_gen`,再调用`rtvi_vlm_alert action="start"`。告警规则:每个片段都会被标注;如果VLM响应包含`yes`/`true`(不区分大小写),则会向`mdx-vlm-incidents`发布事件。提示必须强制返回Yes/No答案。在仅VLM部署中请求静态CV流水线属于模式不匹配——参见上方路由表。
---Workflow D — Alert Subscriptions (VLM real-time mode only)
工作流D — 告警订阅(仅VLM实时模式)
Create / list / delete persistent realtime alert rules on Alert Bridge.
Route here when the prompt has rule keywords (, , a rule
ID) or when it pairs a specific sensor with a specific detection
condition (e.g. "Set up a realtime alert on warehouse-dock-1 for PPE
violations", "Watch sensor entrance-1 for tailgating", "Stop rule
496aebd1-…").
rulesubscriptionNot here: generic start/stop without a condition (→ Workflow B) or Slack
operations (→ Workflow E).
Load and follow as the authoritative
playbook for subscription CRUD. VLM real-time mode only; refuse with the
canonical refusal text on CV.
references/alert-subscriptions.md在Alert Bridge上创建/列出/删除持久化实时告警规则。当请求包含规则关键词(、、规则ID)或将特定传感器与特定检测条件配对时(例如"为warehouse-dock-1设置实时告警,检测PPE违规"、"监控entrance-1传感器的尾随行为"、"停止规则496aebd1-…"),路由至此。
rulesubscription不路由至此的情况:无检测条件的通用启动/停止(→工作流B)或Slack操作(→工作流E)。
加载并遵循作为订阅增删改查的权威指南。仅支持VLM实时模式;在CV模式下请求时使用标准拒绝文本拒绝。
references/alert-subscriptions.mdWorkflow E — Slack Notifications (VLM real-time mode only)
工作流E — Slack通知(仅VLM实时模式)
Use when the user explicitly mentions Slack or the webhook relay (start/stop webhook server, check status/health, send a test message, set Slack channel/token). The word alone is not enough.
notify(port 9090) ≠alert-notify(vss-alert-bridge). Do NOT touch/api/v1/realtimefor Slack ops.vss-alert-bridge
Examples that route here: "Set up Slack notifications for alerts", "Check if
alert-notify is running", "Send a test alert notification to Slack", "Start
the alert webhook for Slack".
Examples that do NOT route here: "Notify me when someone enters the zone" (→
Workflow D/B), "Alert and notify on my phone" (ambiguous — ask).
Load and follow . Code lives in
. VLM real-time mode only.
references/alert-notify.mdscripts/alert-notify/当用户明确提及Slack或webhook中继时使用(启动/停止webhook服务器、检查状态/健康、发送测试消息、设置Slack频道/令牌)。仅一词不足以触发。
notify(端口9090)≠alert-notify(vss-alert-bridge)。 请勿为Slack操作调用/api/v1/realtime。vss-alert-bridge
路由至此的示例:"为告警设置Slack通知"、"检查alert-notify是否运行"、"向Slack发送测试告警通知"、"启动告警Slack webhook"。
不路由至此的示例:"当有人进入区域时通知我"(→工作流D/B)、"告警并通知我的手机"(歧义——请询问)。
加载并遵循。代码位于目录。仅支持VLM实时模式。
references/alert-notify.mdscripts/alert-notify/Workflow C — Query / List Alerts (works on either mode)
工作流C — 查询/列出告警(两种模式均支持)
Both CV- and VLM-generated alerts land in Elasticsearch and are
queryable via the agent's tool. POST
natural-language requests to — "Show me recent alerts
for sensor X", "List confirmed alerts from the last hour", "Show
collision incidents from Camera_02 between and ". For
richer / non-natural-language filtering (sensor-level, time-series,
counts) use the skill (VA-MCP on port 9901).
video_analytics_mcp.get_incidents$AGENT/generate<ISO><ISO>vss-query-analyticsCV和VLM生成的告警都会写入Elasticsearch,并可通过agent的工具查询。向发送自然语言请求——"显示传感器X的最近告警"、"列出过去一小时内已确认的告警"、"显示Camera_02在至时间段内的碰撞事件"。如需更丰富的非自然语言过滤(传感器级别、时间序列、统计数),请使用**技能**(VA-MCP,端口9901)。
video_analytics_mcp.get_incidents$AGENT/generate<ISO><ISO>vss-query-analyticsVerdict interpretation (CV mode only)
判定结果解读(仅CV模式)
Verified alerts carry an extended block:
info | Meaning |
|---|---|
| VLM determined the alert is real |
| VLM determined it is a false positive |
| Verification could not complete (error) |
Check (200 = success) and for
the VLM's explanation. VLM-mode incidents are always "confirmed" at
source (the trigger itself is a Yes/No VLM answer), so there is no
separate verdict field.
verification_response_codereasoning已验证的告警包含扩展块:
info | 含义 |
|---|---|
| VLM判定告警真实有效 |
| VLM判定为误报 |
| 验证无法完成(错误) |
查看(200=成功)和字段获取VLM的解释。VLM模式下的事件在源头上始终为"已确认"(触发本身就是VLM的Yes/No回答),因此无单独的判定字段。
verification_response_codereasoningCustomize CV Verifier Prompts (CV mode only)
自定义CV验证器提示(仅CV模式)
CV-path verifier prompts live in
.
Each entry maps a CV (the field emitted by
Behavior Analytics) to the VLM / / optional
prompts.
deployments/developer-workflow/dev-profile-alerts/vlm-as-verifier/configs/alert_type_config.jsonalert_typecategorysystemuserenrichmentKey rules:
- must match the
alert_typeemitted by Behavior Analytics.category - is the display name in Elasticsearch / UI.
output_category - triggers a second VLM call for a richer description; requires
enrichment.alert_agent.enrichment.enabled: true - Edits require an container restart to take effect.
alert-bridge
VLM real-time prompts are not configured in a file — they are
per-request, shaped by from the user's
natural-language detection description.
rtvi_prompt_genCV路径的验证器提示位于。每个条目将CV的(Behavior Analytics输出的字段)映射到VLM的//可选提示。
deployments/developer-workflow/dev-profile-alerts/vlm-as-verifier/configs/alert_type_config.jsonalert_typecategorysystemuserenrichment关键规则:
- 必须与Behavior Analytics输出的
alert_type匹配。category - 是Elasticsearch/UI中的显示名称。
output_category - 会触发第二次VLM调用以生成更丰富的描述;需要
enrichment。alert_agent.enrichment.enabled: true - 修改后需要重启容器才能生效。
alert-bridge
VLM实时提示不通过文件配置——它们是逐请求的,由根据用户的自然语言检测描述生成。
rtvi_prompt_genCross-Skill Links
跨技能链接
| Task | Skill |
|---|---|
| Deploy, redeploy, or switch alert mode | |
| Add an RTSP / IP camera to VIOS | |
| List sensors, take a snapshot, download a clip | |
| Time-range incident / occupancy / PPE metrics from Elasticsearch | |
| Generate a detailed incident report from an alert | |
| Alert subscriptions (create/list/delete rules) | Sub-workflow: |
| Forward incidents to Slack webhook | Sub-workflow: |
| 任务 | 技能 |
|---|---|
| 部署、重新部署或切换告警模式 | ** |
| 将RTSP/IP摄像头添加至VIOS | ** |
| 列出传感器、拍摄快照、下载片段 | ** |
| 从Elasticsearch获取时间范围事件/占用率/PPE指标 | ** |
| 根据告警生成详细事件报告 | ** |
| 告警订阅(创建/列出/删除规则) | 子工作流: |
| 将事件转发至Slack webhook | 子工作流: |
Gotchas
注意事项
- (port 9090) ≠
alert-notify. "Slack webhook" → Workflow E (vss-alert-bridge). Never route Slack intents toalert-notify'svss-alert-bridge./api/v1/realtime - Workflow scope by mode: Workflow A is CV-only. Workflows B and C work on either mode. Workflows D and E (subscriptions and Slack) are VLM real-time only — refuse with the canonical refusal text if attempted on CV.
- Don't use container presence as a mode signal. It runs in both modes. Use
rtvi-vlm(CV-only) or thevss-behavior-analytics-alertsenv var instead.MODE - A mode switch tears down the current deployment. Any running VLM monitoring streams and any CV alert state not already in Elasticsearch will be lost.
- Don't call the microservice directly from this skill. Always go through
rtvi-vlm. The agent handles sensor→RTSP lookup, stream registration, and teardown.$AGENT/generate - Sensor must already be in VIOS for either mode. If the user hands you only an RTSP URL, use the skill first.
vss-manage-video-io-storage - VLM alert trigger is a /
"yes"token match on the VLM response (case-insensitive)."true"enforces the Yes/No pattern — don't hand-craft prompts that break it.rtvi_prompt_gen - Stopping a VLM alert is one agent call ("Stop real-time alert…"); the agent handles both the caption-stream and the stream-registration teardown.
- Prompt changes to need an
alert_type_config.jsonrestart.alert-bridgeis required for thealert_agent.enrichment.enabled: trueprompt to fire.enrichment
bump:1
- (端口9090)≠
alert-notify。 "Slack webhook" → 工作流E(vss-alert-bridge)。请勿将Slack意图路由至alert-notify的vss-alert-bridge。/api/v1/realtime - 工作流范围取决于模式:工作流A仅支持CV模式。工作流B和C支持两种模式。工作流D和E(订阅和Slack)仅支持VLM实时模式——在CV模式下请求时使用标准拒绝文本拒绝。
- 请勿将容器的存在作为模式信号。它在两种模式下均运行。请使用
rtvi-vlm(仅CV组件)或vss-behavior-analytics-alerts环境变量。MODE - 模式切换会销毁当前部署。所有正在运行的VLM监控流以及未写入Elasticsearch的CV告警状态都会丢失。
- 请勿直接调用微服务。始终通过
rtvi-vlm调用。agent会处理传感器→RTSP查找、流注册和销毁。$AGENT/generate - 传感器必须已加入VIOS才能在两种模式下使用。如果用户仅提供RTSP URL,请先使用技能。
vss-manage-video-io-storage - VLM告警触发条件是VLM响应中匹配/
"yes"令牌(不区分大小写)。"true"会强制Yes/No格式——请勿手动编写破坏该格式的提示。rtvi_prompt_gen - 停止VLM告警只需一次agent调用("停止实时告警…");agent会处理字幕流和流注册的销毁。
- 修改中的提示需要重启
alert_type_config.json。alert-bridge是alert_agent.enrichment.enabled: true提示生效的必要条件。enrichment
bump:1