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

opsgenie op5 migration

Nivek90 December 13, 2019

I'm very close to get my op5 integration with opsgenie to work. When running the test script 

/usr/bin/nagios2opsgenie -entityType=host -t=PROBLEM -hs=DOWN -hn=test_host

I'm getting this error:

2019-12-13 15:49:07.861 ERROR Error occurred while connecting: dial tcp 10.10.99.33:443: getsockopt: connection refused
2019-12-13 15:49:07.861 ERROR [HostName: test_host, HostState: DOWN]Failed to post data from Nagios. Post https://10.10.99.33/v1/json/op5: dial tcp 10.10.99.33:443: getsockopt: connection refused

 

I'm not sure where it fails or what "  getsockopt" is to referense to

Have anyone faced this problem?

1 answer

0 votes
Kate Clavet
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2019

Hi @Nivek90 what are you using as the source file for your code? In the error message you provide: 

2019-12-13 15:49:07.861 ERROR Error occurred while connecting: dial tcp 10.10.99.33:443: getsockopt: connection refused
2019-12-13 15:49:07.861 ERROR [HostName: test_host, HostState: DOWN]Failed to post data from Nagios. Post https://10.10.99.33/v1/json/op5: dial tcp 10.10.99.33:443: getsockopt: connection refused 

 

The IP address after the word Post is not an Opsgenie IP Address and it should be. 

Thanks,

Kate 

Nivek90 December 15, 2019

What I have done is to have two VMs, one is the OP5(172.25.x.x) and the other (10.10.99.33) is where i have my opsgenie installed. So I'm trying to get my op5 to notify opsgenie. I might have misunderstood opsgenie. It seems like I dont need a dedicated VM for it, I could install it on OP5. Please confirm this

Nivek90 December 16, 2019

I did some modifications in the config file and replaced the 10.10.99.33 opsgenie server with the op5 address:

the apiKey used is the one from op5 integration page in opsgenie

apiKey = xxxxxxxxxxxxxxxxxxxxxxxxx
#if you are using opsgenie from another domain e.g. eu, sandbox etc.
#you should update the line below
opsgenie.eu.api.url = https://172.25.80.11

running the test command gives thie error message in nagios2opsgenie.log:

2019-12-16 09:32:13.757 ERROR [HostName: test_host, HostState: DOWN]Couldn't post data from Nagios to OpsGenie successfully; Response code: 401 Response Body: {"code":2,"error":"RestException[Could not authenticate.]"}

 

it says RestException, meaning Opsgenie couldn't identify the api key

what am I missing?

Kate Clavet
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2019

Hi @Nivek90 are you located in the EU? Also, I'm not clear on why you're installing Opsgenie on multiple VMs either. Can you please explain a bit more about your use case? Are you running multiple OEC integrations? 

I really need more information to assist you, so try to provide as much detail as you can. Or if you prefer, feel free to contact our support team directly using the blue chat bubble in the application. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events