Comment 1 for bug 1989032

Revision history for this message
Aliaksandr Vasiuk (valexby) wrote :

Hey Linda, thanks for reporting the issue! Would you elaborate on the expected behavior?
That how I tried to set proxy for pagerduty and seems like it works for me
1. I deployed charm-nagios revision 49
2. Did `juju config central-monitor enable_pagerduty=true`
3. Checked that no --proxy switch in `/etc/cron.d/nagios-pagerduty-flush`
 $ cat /etc/cron.d/nagios-pagerduty-flush
 #------------------------------------------------
 # This file is juju managed
 #------------------------------------------------

 # Flush the nagios pagerduty alerts every minute as per
 # http://www.pagerduty.com/docs/guides/nagios-perl-integration-guide/
 * * * * * nagios /usr/local/bin/pagerduty_nagios.pl flush --queue-dir /var/lib/nagios3 /pagerduty
4. Then set proxy for juju `juju model-config juju-https-proxy=http://squid.internal:3128`
5. Disabled and enabled pagerduty to reconfigure it:
 $ juju config central-monitor enable_pagerduty=false
 $ juju config central-monitor enable_pagerduty=true
6. Once charm is ready check pagerduty cronjob again
 $ cat /etc/cron.d/nagios-pagerduty-flush
 #------------------------------------------------
 # This file is juju managed
 #------------------------------------------------

 # Flush the nagios pagerduty alerts every minute as per
 # http://www.pagerduty.com/docs/guides/nagios-perl-integration-guide/
 * * * * * nagios /usr/local/bin/pagerduty_nagios.pl flush --proxy http://squid.internal:3128 --queue-dir /var/lib/nagios3/pagerduty

As you see the --proxy switch is added to the cronjob configuration.
Maybe I'm reproducing it in the wrong way. Should I set JUJU_CHARM_HTTPS_PROXY somehow another way? Or should the charm be reconfigured right after `juju model-config juju-https-proxy=http://squid.internal:3128` without manipulations with the charm configuration (maybe in such a case makes sense to add proxy to charm's configurable params list...)
I am looking forward to your reply!