madrisan / hashicorp-vault-monitor

:key: HashiCorp Vault Monitoring Tool
Mozilla Public License 2.0
24 stars 4 forks source link

Address parameter not working #1

Closed Kazyini closed 4 years ago

Kazyini commented 4 years ago

Hi, thanks for this check. I'm trying to use it right now. Unfortunately it is not possible to add the parameter -address. It always takes the 127.0.0.1 default:

./hashicorp-vault-monitor status -output=nagios -address=https://vault.testenv.net:8200 vault UNDEFINED - error checking seal status: Get https://127.0.0.1:8200/v1/sys/seal-status: dial tcp 127.0.0.1:8200: connect: connection refused

Since we use the Icinga Director we can't set any environment variable and therefore need the parameter.

madrisan commented 4 years ago

Hi, are you using the version 0.8.2? This version fixes precisely this bug.

Kazyini commented 4 years ago

Yes I am using the 0.8.2 version which can be downloaded here from GitHub:

# wget https://github.com/madrisan/hashicorp-vault-monitor/releases/download/v0.8.2/linux_amd64.zip
# unzip linux_amd64.zip
# ./hashicorp-vault-monitor status -output=nagios -address=https://vault.testenv.net:8200
vault UNDEFINED - error checking seal status: Get https://127.0.0.1:8200/v1/sys/seal-status: dial tcp 127.0.0.1:8200: connect: connection refused
# ./hashicorp-vault-monitor -version
HashiCorp Vault Monitor v0.8.2 ('7faee4e1b13f9512fed2f16cdf0e8c5e944c8d9c+CHANGES')
madrisan commented 4 years ago

I was able to reproduce the error. It should be fixed by PR#2. I will soon skip a new release with the bugfix. Thanks for the bug report.

If you find this monitoring plugin useful, do not forget to add a star to the GitHub project.

madrisan commented 4 years ago

Fixed in v0.8.3.