Hello,
I am using the latest version of Sensu 6.4 ee
Since yesterday I try to marry sensu with vault.
Unfortunately without success.
I use a vault KV v2
vault kv get monitoring/d03/ttza/prod/00001.01
====== Metadata ======
Key Value
--- -----
created_time 2021-08-12T15:08:20.997820358Z
deletion_time n/a
destroyed false
version 1
====== Data ======
Key Value
--- -----
name 00001.01
password TOPSECRET
In sensu I have configured the following.
---
type: Secret
api_version: secrets/v1
metadata:
labels:
sensu.io/workflow: sensu-flow
name: 00001_password
spec:
provider: vault
id: monitoring/d03/ttza/prod#00001.01#password
---
type: VaultProvider
api_version: secrets/v1
metadata:
labels:
sensu.io/workflow: sensu-flow
name: vault
spec:
client:
address: https://vault.domain.example:8200
token: s.12343535345345345345
version: v2
tls:
insecure: true
max_retries: 2
timeout: 20s
rate_limiter:
limit: 10
burst: 100
---
type: CheckConfig
api_version: core/v2
metadata:
annotations:
fatigue_check/occurrences: "3"
labels:
sensu.io/workflow: sensu-flow
name: sensu-check-client
spec:
command: echo "$USERNAME $PASSWORD"
secrets:
- name: PASSWORD
secret: 00001_password
env_vars:
- USERNAME={{ .labels.username }}
handlers:
- opsgenie
high_flap_threshold: 60
interval: 120
low_flap_threshold: 20
output_metric_format: ""
proxy_entity_name: check-client
proxy_requests:
entity_attributes:
- entity.entity_class == 'proxy'
- entity.labels.proxy_type == 'check-client'
splay: true
splay_coverage: 90
publish: true
round_robin: true
runtime_assets:
- sensu-check-client
stdin: false
subscriptions:
- proxy
timeout: 80
ttl: 0
The output always looks like this:
00001.01 PASSWORD
So not the password is used but the variable name.
In logs I also don’t see any attempt or error message
Also I don’t see any request from Vault Server
The Sensu server is set to debug logging.
sensu-backend start --insecure-skip-tls-verify --log-level debug --debug