使用 Zabbix web 监控验证 pdf 的内容

Verify content of pdf with Zabbix web monitoring

在Zabbix web场景的步骤中,有没有办法验证pdf文件的内容?
我需要将 pdf 中的文本与上一步中的变量进行比较。

不,您只能将 Required string 参数与 HTML 内容一起使用,但有一些限制,来自 documentation:

Required regular expression pattern. Unless retrieved content (HTML) matches the required pattern the step will fail. If empty, no check on required string is performed. For example: Homepage of Zabbix Welcome.*admin Note: Referencing regular expressions created in the Zabbix frontend is not supported in this field.

基于 libcurl 的行为与本机几乎相同 http agent,我认为您必须使用外部脚本来下载,parse/render 并从 pdf 中提取文本。