Hello,
I'm facing a challenge with Zabbix and could use some guidance. I'm currently using an Item of type "HTTP Agent" to retrieve the content of a webpage. My goal is to perform checks on the retrieved content to ensure that specific HTML elements exist on the page, effectively verifying that the page hasn't been corrupted or altered incorrectly.
Here's what I'm trying to achieve in a nutshell:
I've attempted to use both "Regular expressions" and the "Matches regular expression" preprocessing step for this purpose. However, I'm facing a couple of issues:
I'm seeking advice on the best approach to achieve my goal. Is there a recommended way to use the "HTTP Agent" item along with preprocessing to validate the presence of specific HTML elements? Ideally, I would like to have a clear indication (1 or 0) whether the tests have passed or failed.
If anyone has experience or insights into this situation, I would greatly appreciate your help.
Thanks!
I'm facing a challenge with Zabbix and could use some guidance. I'm currently using an Item of type "HTTP Agent" to retrieve the content of a webpage. My goal is to perform checks on the retrieved content to ensure that specific HTML elements exist on the page, effectively verifying that the page hasn't been corrupted or altered incorrectly.
Here's what I'm trying to achieve in a nutshell:
- Use a "HTTP Agent" item to fetch the content of a webpage.
- Perform validations on the fetched content to check if specific HTML elements exist.
- Ideally, return a simple numeric value (1 for success, 0 for failure) based on whether all tests succeed or fail.
- Discard the rest of the data.
I've attempted to use both "Regular expressions" and the "Matches regular expression" preprocessing step for this purpose. However, I'm facing a couple of issues:
- With regular expressions, it seems that the value is altered during the validation process, causing the second test to fail.
- With "Matches regular expression," I can't figure out how to return a numeric value (1 or 0) on success or failure.
I'm seeking advice on the best approach to achieve my goal. Is there a recommended way to use the "HTTP Agent" item along with preprocessing to validate the presence of specific HTML elements? Ideally, I would like to have a clear indication (1 or 0) whether the tests have passed or failed.
If anyone has experience or insights into this situation, I would greatly appreciate your help.
Thanks!
Comment