Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

OEC Proxy Authentication

Tom Russell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2022

Our IT security team is mandating all outbound connections through our proxy servers should be authenticated (BasicAuth or NTLM). I'm not seeing anything in the OEC setup docs about adding this authentication. Has anybody gotten this working?

1 answer

1 vote
Justin Sitarz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2022

Hi Tom!

 

Justin here, from Opsgenie support - happy to help!

 

You should be able to your proxy configuration (with authentication) in the environment variables defined in the OEC service file. So, for basic auth, it might look something like this (examples below for both Windows and Linux OEC service files):

 

Windows

Filename: oecService.json

You can add the HTTP_PROXY and HTTPS_PROXY values with authentication in the 'Env' field in the oecService.json file.

{
"Name": "OEC Service",
"DisplayName": "OEC Service",
"Description": "Run the OEC Service",
"OECPath" : "C:\\opsgenie\\opsgenie-oec\\OpsgenieEdgeConnector32.exe",
"Args" : ["-oec-metrics", "7070"],
"Env": [
"OEC_CONF_LOCAL_FILEPATH=C:\\opsgenie\\opsgenie-oec\\conf\\config.json",
"OEC_CONF_SOURCE_TYPE=local",
"HTTP_PROXY=http://user:password@ProxyServer:port",
"HTTPS_PROXY=http://user:password@ProxyServer:port"
],
"Stderr": "C:\\opsgenie\\opsgenie-oec\\output\\oecErr.log",
"Stdout": "C:\\opsgenie\\opsgenie-oec\\output\\oecOut.log"
}

 

Note - if OEC is already installed then you will need to reinstall OEC. The uninstall command (adjust accordingly for 32 or 64 bit OEC) is:

 oecService<32|64>.exe uninstall 

the install command is:

 oecService<32|64>.exe install

 

 

Linux

Filename: oec.service

You'll add your HTTP/HTTPS_PROXY info as Environment variables called out in the oec.service file:

[Service]
Group=opsgenie
User=opsgenie
Type=simple
Environment="HTTP_PROXY=http://user:password@ProxyServer:port"
Environment="HTTPS_PROXY=http://user:password@ProxyServer:port"
ExecStart=/usr/local/bin/OpsgenieEdgeConnector

 

Once these have been added, you'll need to reload and restart the service:

systemctl daemon-reload
systemctl restart oec.service

 

 

That should get you started, but please let us know if you have any issues getting the proxy working. Thanks!

 

Justin S

Atlassian Cloud Support

Osama Aljassar February 29, 2024

Hi Justin,

I added the environment variables but still didn't work.

Any suggestion of how to debug the issue?

i am using REHL 8.5 and OEC version 1.1.3

John M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 29, 2024

Hi @Tom Russell ,

John from Opsgenie support here - we would need to review the logs and configuration file to see what is going on. Please open a support ticket or a chat so we can help you out - thanks!

Osama Aljassar March 1, 2024

Hi @John M ,

The issue seem to be that in REHL 8.5 the environment variables in the .service file was not being read.

We were able to solve this by creating an "oecenv" file with the environment varaibles

OEC_CONF_SOURCE_TYPE=local
OEC_CONF_LOCAL_FILEPATH=/home/opsgenie/oec/conf/config.json
HTTP_PROXY=http://user:password@ProxyServer:port
HTTPS_PROXY=http://user:password@ProxyServer:port
http_proxy=http://user:password@ProxyServer:port
https_proxy=http://user:password@ProxyServer:port

Then in oec.service file we add "EnvironmentFile" instead

[Unit]
Description=Opsgenie Edge Connector (OEC)
Wants=network-online.target
After=network.target network-online.target

[Service]
Group=opsgenie
User=opsgenie
Type=simple
EnvironmentFile=/etc/oecenv
ExecStart=/usr/local/bin/OpsgenieEdgeConnector

[Install]
WantedBy=multi-user.target

This fixed our problem.

Like John M likes this
John M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2024

Thanks for sharing your solution @Osama Aljassar !

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events