Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Env proxy (#5)
Browse files Browse the repository at this point in the history
* added https /http proxy support

* version prep

* Update README.md
  • Loading branch information
v-zhuravlev authored Dec 15, 2016
1 parent 74da9a6 commit c470286
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Here is the idea in brief:
**All:**
- All configuration is done in Zabbix web-interface(no config files anywhere)
- UTF8 supported
- HTTPS/HTTP proxy supported(see how at the end)

**Slack:**
- Color coding events depending on Trigger Status and Severity
Expand Down Expand Up @@ -599,3 +600,11 @@ zabbix_server --runtime-control log_level_increase=alerter
```
now tail you log to see what the problem might be:
`tail -f /var/log/zabbix-server/zabbix_server.log`

##HTTP(S) Proxy
If you need to use proxy to connect to services, make sure that environment variables
`http_proxy` and `https_proxy` are set under user `zabbix`, for example:
```
export http_proxy=http://proxy_ip:3128/
export https_proxy=$http_proxy
```
4 changes: 2 additions & 2 deletions lib/HipChatBot.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package HipChatBot;
use strict;
use warnings;
our $VERSION = '0.6';
our $VERSION = '0.7';
use parent 'ZabbixNotify';
use LWP;
use URI;
Expand Down Expand Up @@ -208,7 +208,7 @@ sub post_with_retries {
my $ua = LWP::UserAgent->new();

if ( defined( $self->mock_url ) ) { $url = $self->mock_url; } #mock replace:

$ua->env_proxy;
$ua->show_progress(1) if $self->debug;

ATTEMPT: {
Expand Down
4 changes: 2 additions & 2 deletions lib/PagerDutyBot.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package PagerDutyBot;
use strict;
use warnings;
our $VERSION = '0.6';
our $VERSION = '0.7';
use parent 'ZabbixNotify';
use LWP;
use URI;
Expand Down Expand Up @@ -154,7 +154,7 @@ sub post_with_retries {
my $ua = LWP::UserAgent->new();

if ( defined( $self->mock_url ) ) { $url = $self->mock_url; } #mock replace:

$ua->env_proxy;
$ua->show_progress(1) if $self->debug;

ATTEMPT: {
Expand Down
4 changes: 2 additions & 2 deletions lib/SlackBot.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package SlackBot;
use strict;
use warnings;
our $VERSION = '0.6';
our $VERSION = '0.7';
use parent qw(ZabbixNotify);
use LWP;
use URI;
Expand Down Expand Up @@ -365,7 +365,7 @@ sub get_with_retries {
my $ua = LWP::UserAgent->new();

if ( defined( $self->mock_url ) ) { $url = $self->mock_url; } #mock replace:

$ua->env_proxy;
$ua->show_progress(1) if $self->debug;

ATTEMPT: {
Expand Down
2 changes: 1 addition & 1 deletion lib/ZabbixNotify.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ZabbixNotify;
use strict;
use warnings;
our $VERSION = '0.6';
our $VERSION = '0.7';

use Carp;
use Data::Dumper;
Expand Down

0 comments on commit c470286

Please sign in to comment.