简体   繁体   English

WCF服务运行状况监视

[英]WCF service health monitoring

I just implemented a WCF service and I am currently looking at service monitoring options. 我刚刚实现了一个WCF服务,我目前正在寻找服务监控选项。 Our server team that currently hosts only java services wants us to have instances running all the time, so it can gather data in that instance during its lifetime and they said they will use one of our operations with webmon to get statistical information. 我们目前仅托管java服务的服务器团队希望我们一直运行实例,因此它可以在其生命周期内收集该实例中的数据,并且他们表示他们将使用我们的一个操作与webmon获取统计信息。 But we are using per call and I dont think that will work under this architecture. 但我们正在使用每次调用,我认为这不会在这种架构下工作。

I am wondering if there is a way to get the statistics of how an operation in the service did in certain amount of time and provide an another operation for webmon to use that gives an integer value about its performace in certain time period, webmon, then decides weather to alert the admin or not. 我想知道是否有办法获取服务中的操作如何在一定时间内完成的统计数据,并为webmon提供另一个操作,使其在某个时间段内给出关于其性能的整数值,webmon,然后决定天气以提醒管理员。

I was considering parsing of log files to get statistics but that might be an expensive operation if done every 15 mins. 我正在考虑解析日志文件以获取统计信息,但如果每15分钟完成一次,这可能是一项昂贵的操作。

If not what are my options for detailed automatic health monitoring of wcf applications? 如果不是我对wcf应用程序的详细自动健康监测的选择是什么?

My company very recently agreed to open-source (under the GPL License ) the tool that we use internally to monitor our live web services and for producing availability and response time reports. 我公司最近同意开源(根据GPL许可证 )我们在内部使用的工具来监控我们的实时Web服务以及生成可用性和响应时间报告。 It's called ServiceMon and it may meet your needs. 它被称为ServiceMon ,它可能满足您的需求。

It runs on Windows as a standalone application and works by following a simple script of operations that dictate the services to be monitored. 它作为独立的应用程序在Windows上运行,并通过遵循指示要监视的服务的简单操作脚本来工作。 For example, to check a web page contains a particular value, in a similar manner to webmon, you'd use this line: 例如,要检查网页是否包含特定值,与webmon类似,您可以使用以下行:

http-get "http://www.google.com" must-contain "I'm Feeling Lucky"

The frequency at which it executes the script operations can be easily configured as can the order which it processes them. 执行脚本操作的频率可以轻松配置,也可以按照处理它们的顺序进行配置。

In addition to monitoring web pages and web services we use ServiceMon to track availability statistics of each service and to produce response time statistics. 除了监控网页和Web服务之外,我们还使用ServiceMon来跟踪每个服务的可用性统计信息并生成响应时间统计信息。

ServiceMon的统计视图的屏幕截图

ServiceMon is written using a plugin architecture so you can use .NET to add new types of monitoring operations. ServiceMon是使用插件体系结构编写的,因此您可以使用.NET添加新类型的监视操作。 So, for example, if your web service uses funky authentication you can fairly easily plug this in to the utility. 因此,例如,如果您的Web服务使用时髦的身份验证,您可以相当容易地将其插入实用程序。

Full documentation and download instructions here 完整的文档和下载说明

I hope you find it useful and I'd love to hear your thoughts 我希望你觉得它很有用,我很想听听你的想法

Disclaimer : I developed ServiceMon so I may be a little bit biased :) 免责声明 :我开发了ServiceMon所以我可能有点偏见:)

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

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