Added ability to configure HTTP proxy (v1.24)

This commit is contained in:
Mark Oudsen 2021-03-12 16:33:44 +01:00
parent 78061964c4
commit fb51354649
4 changed files with 12 additions and 4 deletions

View File

@ -11,6 +11,7 @@
"cli_period": "30m",
"cli_period_header": "Last 30 minutes",
"cli_debug": 1,
"cli_proxy": "",
"zabbix_user": "alogicalusername",
"zabbix_user_pwd": "astrongpassword",
"zabbix_api_user": "alogicalusername",

View File

@ -11,6 +11,7 @@
"cli_periods": "10m,4h,2d,7d",
"cli_periods_headers": "Last 10 minutes,Last 4 hours,Last 2 days,Last 7 days",
"cli_debug": 1,
"cli_proxy": "",
"zabbix_user": "alogicalusername",
"zabbix_user_pwd": "astrongpassword",
"zabbix_api_user": "alogicalusername",

View File

@ -7,7 +7,10 @@ try {
result = { tags: {} };
// Set HTTP proxy if required
if (typeof params.HTTPProxy === 'string' && params.HTTPProxy.trim() !== '') { req.setProxy(params.HTTPProxy); }
if (typeof params.HTTPProxy === 'string' && params.HTTPProxy.trim() !== '') {
req.setProxy(params.HTTPProxy);
fields.HTTPProxy = params.HTTPProxy;
}
// Declare output type
req.AddHeader('Content-Type: application/json');

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2021-03-10T18:50:24Z</date>
<date>2021-03-12T15:29:06Z</date>
<media_types>
<media_type>
<name>MailGraph</name>
@ -77,7 +77,10 @@
result = { tags: {} };&#13;
&#13;
// Set HTTP proxy if required&#13;
if (typeof params.HTTPProxy === 'string' &amp;&amp; params.HTTPProxy.trim() !== '') { req.setProxy(params.HTTPProxy); }&#13;
if (typeof params.HTTPProxy === 'string' &amp;&amp; params.HTTPProxy.trim() !== '') {&#13;
req.setProxy(params.HTTPProxy);&#13;
fields.HTTPProxy = params.HTTPProxy;&#13;
}&#13;
&#13;
// Declare output type&#13;
req.AddHeader('Content-Type: application/json');&#13;
@ -188,4 +191,4 @@ itemId: {ITEM.ID]</message>
</message_templates>
</media_type>
</media_types>
</zabbix_export>
</zabbix_export>