简体   繁体   English

如何为C#wcf API编写sensu检查

[英]how to write sensu checks for C# wcf api

Is anyone aware of a general pattern or resource(website,book,presentation?) that lays out a suggested way to instrument a wcf service using sensu checks? 有谁知道一种通用的模式或资源(网站,书本,演示文稿?),它提出了使用sensu检查来检测wcf服务的建议方法? my group is gearing up to start the mandatory move to sensu, but I'm not certain what general format/pattern would be best to instrument our wcf service? 我的小组正在加紧准备开始向sensu强制迁移,但是我不确定哪种通用格式/模式最适合我们的wcf服务?

I'm thinking that I'll just add method(s) to the service that is a 'health check' and have that respond and write checks against that. 我在想,我只是将方法添加到服务中是“运行状况检查”,并对此做出响应并编写检查。

Thanks in advance. 提前致谢。

I wouldn't know about writing anything WCF-specific, but look at it in broader terms: you're hosting a web service in a web server that runs on .NET. 我不会写任何特定于WCF的东西,而是从更广泛的角度来看它:您是在.NET上运行的Web服务器中托管Web服务。

Things you can check if you look at it that way: 如果以这种方式查看,可以检查的事情:

  • Is the webserver responding to requests (perform a GET to the .svc)? Web服务器是否响应请求(对.svc执行GET)?
  • Does the Application Event Log contain error entries for .NET? 应用程序事件日志中是否包含.NET的错误条目?
  • Does your application log contain error entries for the application? 您的应用程序日志中是否包含该应用程序的错误条目?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM