如何为AzureKeyvault健康状况添加HealthChecks
我试图将AzureKeykevault的HealthChecks添加到我的项目中,并按照Nuget软件包添加:
<PackageReference Include="AspNetCore.HealthChecks.AzureKeyVault" Version="6.0.2" />
在代码中添加以下内容:
var url = "https://123456.com";
builder.Services
.AddHealthChecks()
.AddAzureKeyVault(new Uri(url), keyVaultCredential,
options => { }, "AKV", HealthStatus.Unhealthy,
tags: new string[] { "azure", "keyvault", "key-vault", "azure-keyvault" });
但是问题是,它显示了每个URL的Healthy
适当的URL。 甚至在keyVaultCredential中,如果添加了一些随机值,它也会显示状态healthy
。
做一个人知道,如何使用此healthcheck
I was trying to add HealthChecks for AzureKeyVault to my project and added following nuget package for that :
<PackageReference Include="AspNetCore.HealthChecks.AzureKeyVault" Version="6.0.2" />
And in code, added following :
var url = "https://123456.com";
builder.Services
.AddHealthChecks()
.AddAzureKeyVault(new Uri(url), keyVaultCredential,
options => { }, "AKV", HealthStatus.Unhealthy,
tags: new string[] { "azure", "keyvault", "key-vault", "azure-keyvault" });
But issue is, its showing healthy
for each and every URL, just it should be proper URL.
and even in keyVaultCredential, if some random values are added, it showing status healthy
.
Do some one know, how can use this HealthCheck
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题,我发现我们需要在选项中添加一个租用一个钥匙保险库秘密,以使其正常工作。例如
options =&gt; {options.addsecret(“ sqlServerConnection--connectionstring”);}
I have the same problem, I found we need to add at lease one key vault secret in the opts to make it work. e.g.
options => { options.AddSecret("SQLServerConnection--connectionString");}
Azure资源的状态或在您的中使用此库的状态
公司VPN网络。
发出或VPN
参考:
(github.com)
status of azure resources or with the use of this library in your
company VPN network .
issue or VPN
References:
(github.com)