mirror of
https://github.com/moudsen/mailGraph
synced 2025-01-30 20:01:38 +01:00
Added ability to configure HTTP proxy (v1.24)
This commit is contained in:
parent
78061964c4
commit
fb51354649
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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');
|
||||
|
@ -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: {} };
|
||||
|
||||
// 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');
|
||||
@ -188,4 +191,4 @@ itemId: {ITEM.ID]</message>
|
||||
</message_templates>
|
||||
</media_type>
|
||||
</media_types>
|
||||
</zabbix_export>
|
||||
</zabbix_export>
|
Loading…
x
Reference in New Issue
Block a user