-
Type:
New Feature Request
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: None
-
Component/s: Agent (G)
-
None
The web.page.get agent item outputs the raw source of the fetched webpage, including headers. Rather than using regular expressions to split the headers and payload during preprocessing, it would be helpful if there was an alternative output format for web.page.get (or an alternative built-in item) that returns the page output in the format of a JSON object with keys for "status, "headers" and "data".
{
"status": {
"version": "HTTP/1.1"
"status": 200
"reason": "OK"
}
"headers": {
"Host":"support.zabbix.com"
}
"data": "<insert text blob here>"
}
This would allow for simpler preprocessing rules that can extract the desired fields with JSONPath. I see this primarily being useful with agents that interact with APIs that are only exposed on a localhost listener, where web scenarios are not an option. (Elasticsearch, etc.)