Search code examples
zabbix

Verify content of pdf with Zabbix web monitoring


Is there any way to verify the content of pdf file in the step of Zabbix web scenario?
I need to compare text in pdf with variable from the previous step.


Solution

  • No, you can use the Required string parameter with HTML content only and with some limitations, from the 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.

    The behavior, based on libcurl, is almost the same with the native http agent, I think that you have to use an external script to download, parse/render and extract text from the pdf.