Hi,
Tanks for the link. The one you have provided is deprecated, but links to another one:
Having added that with this handler:
type: Handler
api_version: core/v2
metadata:
name: opsgenie
namespace: default
spec:
type: pipe
command: sensu-opsgenie-handler
env_vars:
- OPSGENIE_TEAM=Operations
- OPSGENIE_APIURL=https://api.opsgenie.com
timeout: 10
runtime_assets:
- nixwiz/sensu-opsgenie-handler
filters:
- is_incident
secrets:
- name: OPSGENIE_AUTHTOKEN
secret: opgsgenie_authtoken
And this secret:
---
type: Secret
api_version: secrets/v1
metadata:
name: opsgenie_authtoken
spec:
provider: env
id: OPSGENIE_AUTHTOKEN
I get this in my logfiles now:
sensu sensu-backend[3548980]: {“component”:“secrets”,“error”:“key /sensu.io/api/enterprise/secrets/v1/secrets/default/opgsgenie_authtoken not found”,“level”:“error”,“msg”:“unable to retrieve secret from provider”,“provider”:“”,“secret”:“opgsgenie_authtoken”,“time”:“2023-06-23T10:50:51+02:00”}
sensu sensu-backend[255685]: {“check_name”:“Check”,“check_namespace”:“default”,“component”:“pipeline/legacy”,“entity_name”:“server”,“entity_namespace”:“default”,“error”:“invalid secret info: opgsgenie_authtoken”,“event_id”:“xxxxxxxx-2f73-494e-9977-ccea3fcd0efb”,“handler_name”:“opsgenie”,“handler_namespace”:“default”,“level”:“error”,“msg”:“failed to retrieve secrets for handler”,“pipeline”:“legacy-pipeline”,“pipeline_workflow”:“legacy-pipeline-workflow-opsgenie”,“time”:“2023-06-23T10:43:19+02:00”}
I’ve tried adding the token with both of these two:
echo SENSU_BACKEND_OPSGENIE_AUTHTOKEN=<the token> | tee -a /etc/default/sensu-backend
echo OPSGENIE_AUTHTOKEN=<the token> | tee -a /etc/default/sensu-backend
Any and help is appreciated!