[ZBXNEXT-2338] Allow HOST.* macros to be used in HTTP Proxy for Web scenarios Created: 2014 Jun 10 Updated: 2022 May 03 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Documentation (D), Server (S) |
Affects Version/s: | 2.2.3 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Minor |
Reporter: | Tim Koopman | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 6 |
Labels: | httpproxy, macros, webmonitoring | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
I have create templates for monitoring our proxy servers but found one thing I could not do on the template. I have had to define 2 web scenario's on each host as you cannot use macros like {$HOST.CONN} in the HTTP proxy fields of a template web scenario. If you add this feature, it would means you can define template web scenarios to test http proxies are actually working. In my case can get a valid page via proxies and get blocked message when trying to access something that should be filtered. I have 12 proxies to monitor so had to create 24 individual web scenarios instead of just 2 if this is available. |
Comments |
Comment by Tim Koopman [ 2014 Jun 10 ] |
Had typo above. {$HOST.CONN} should of been {HOST.CONN1}. For now I am using custom macros added to each host but still would be nice if the standard {HOST.CONN<1-9>}macros would also work. |
Comment by Oleksii Zagorskyi [ 2014 Jun 10 ] |
(1) If it's indeed supported, then this page should be adjusted (footnote #6) : I mean that support of macros for http proxy is not listed there. martins-v Added to https://www.zabbix.com/documentation/2.2/manual/appendix/macros/supported_by_location#footnotes. RESOLVED. zalex_ua I see that 2.4 branch also has been updated. Reviewed, CLOSED. |
Comment by Oleksii Zagorskyi [ 2014 Jun 10 ] |
Tim, your idea is interesting, but it's definitely not a bug. |
Comment by Marc [ 2015 Jan 30 ] |
Why not just using the macro type MACRO_TYPE_HTTPTEST_FIELD instead of MACRO_TYPE_COMMON? --- src/zabbix_server/httppoller/httptest.c.orig 2015-01-29 10:15:02.119787911 +0100 +++ src/zabbix_server/httppoller/httptest.c 2015-01-29 10:15:55.721793291 +0100 @@ -831,8 +831,8 @@ } httptest.httptest.http_proxy = zbx_strdup(NULL, row[11]); - substitute_simple_macros(NULL, NULL, NULL, NULL, &host.hostid, NULL, NULL, - &httptest.httptest.http_proxy, MACRO_TYPE_COMMON, NULL, 0); + substitute_simple_macros(NULL, NULL, NULL, NULL, NULL, &host, NULL, + &httptest.httptest.http_proxy, MACRO_TYPE_HTTPTEST_FIELD, NULL, 0); httptest.httptest.retries = atoi(row[12]); |
Comment by Ender [ 2015 May 19 ] |
add Affects Version/s: 2.4.5 |
Comment by James Cook [ 2022 May 03 ] |
Tried adding {HOST.CONN}into HTTP Proxy setting for Web Scenario and still see it cant be done in V5.4.X |