I have to develop a system that monitors applications runnig in a network. It should collects informations about the status of applications as well as sends alerts in case of problems. I choose to develop this application on .NET. Please indicates me if there is any APIs for that purpose or any ideas that can help me to begin. If you suggest any other framework to develop such project may I know the reasons!
我必须开发一个监视网络中运行的应用程序的系统。它应该收集有关应用程序状态的信息,并在出现问题时发送警报。我选择在.NET上开发这个应用程序。请指出我是否有任何用于此目的的API或任何可以帮助我开始的想法。如果你建议任何其他框架来开发这样的项目我可能知道原因!
Thank you
6 个解决方案
#1
WMI (System.Management namespace) or hooking into the windows performance monitors would give you a good running start. You can also set up your own sort of 'client-server' monitoring infrastructure, where a program runs as a windows service on each of the target machines. Said program would then be able to run whatever monitoring code you want, such as checking that a process with a particular name is running. This program would send reports to the central server (via remoting, or sockets, or a webservice, or whatever you're comfortable with) containing a 'status' report of the given machine. The central server could then aggregate the statuses and send an alert or set off a klaxon or whatever is appropriate for your business needs.
WMI(System.Management命名空间)或挂钩到Windows性能监视器将为您提供良好的运行开始。您还可以设置自己的“客户端 - 服务器”监视基础结构,其中程序作为每台目标计算机上的Windows服务运行。然后,所述程序将能够运行您想要的任何监视代码,例如检查具有特定名称的进程是否正在运行。该程序将向*服务器发送报告(通过远程处理,或套接字,或Web服务,或任何您熟悉的内容),其中包含给定计算机的“状态”报告。然后,*服务器可以聚合状态并发送警报或引发汽车或适合您业务需求的任何内容。
#2
This depends on whether you mean any arbitrary application, without any coding changes or support within the applications themselves? Or do you mean a suite of applications that are custom coded to cooperate with the monitoring system you are building.
这取决于您是否意味着任何应用程序,在应用程序本身内没有任何编码更改或支持?或者你的意思是一套自定义编码的应用程序,以配合你正在构建的监控系统。
In the latter case I would add a remoting channel to the applications, that a monitoring system could connect to on a regular basis, (functionally like a ping) and with a generic GetStatus() method that would report appropriate health stats to the monitoring system... I would add this functionality as a separate dependant assembly to each app I wanted to monitor...
在后一种情况下,我会向应用程序添加一个远程处理通道,监视系统可以定期连接(功能上类似于ping),并使用通用的GetStatus()方法向监视系统报告适当的健康状况...我会将此功能添加为我想要监控的每个应用程序的单独依赖程序集...
In the first case, I believe you will need to hook into OS APIs, especially to communicate with OS's running on other machines on the network (if that is also a requirement) As You mentioned .Net I assume you are talking WIn32 Machines only. I do not know what fuinctionality is exposed by the WIn32 API in this area.
在第一种情况下,我相信您需要连接到OS API,特别是与在网络上的其他机器上运行的OS进行通信(如果这也是一项要求)正如您提到的.Net我假设您只在谈论WIn32机器。我不知道WIn32 API在这个领域暴露了什么功能。
#3
You need to define monitoring. How are you planning to monitor the applications and what kind of information do you plan on recording?
您需要定义监控。您打算如何监控应用程序以及您计划录制哪些类型的信息?
#4
What is your definition of a "problem" for the app? Do you have code control over the app(s) to be monitored? Generally an app having "problems" doesn't announce it, as it's usually due to a bug. How you would detect that is very difficult if the app isn't already designed to send out information specifically for you to look for problems.
您对该应用程序的“问题”的定义是什么?您是否对要监控的应用程序进行代码控制?通常,具有“问题”的应用程序不会公布它,因为它通常是由于错误。如果应用程序尚未设计为专门为您发送信息以查找问题,您将如何检测到这一点非常困难。
The only thing remotely similar I've done in the past was to hook into the scheduler itself(in Windows CE) to monito the amount of quantum threads were getting to look for something consuming too much of the processor, but be forewarned that doing that kind of thing has huge potential for bugs, it uses a lot of the processor itself (and I have no idea if you can even do it on the desktop).
我过去做的唯一远程类似的事情是挂钩调度程序本身(在Windows CE中)以监控量子线程的数量,以寻找消耗过多处理器的东西,但预先警告这样做有些东西有巨大的漏洞潜力,它使用了很多处理器本身(我不知道你是否可以在桌面上做到这一点)。
#5
Well, monitoring applications is not as simple, since you have to look into other pc's and what is going on in them.
那么,监控应用程序并不那么简单,因为您必须查看其他PC以及它们中发生的事情。
Common ways for monitoring a Network are using the SNM-Protocol suite, or going more into Windows world the WMI-Path.
监控网络的常用方法是使用SNM协议套件,或者更多地使用WMI-Path进入Windows世界。
WMI is wrapped in .NET but not at a hole, so you need to know how to handle WMI and build your own wrappers for that.
WMI包含在.NET中,但不包含在漏洞中,因此您需要知道如何处理WMI并为此构建自己的包装器。
SNMP, I bet, is not really helpful, since not all applications support this.
我敢打赌,SNMP并不是真的有用,因为并非所有应用程序都支持这一点。
#6
To be more clear, in my network I have different machines and servers where are running some applications like databases, web applications and many ohers.
更清楚的是,在我的网络中,我有不同的机器和服务器,运行一些应用程序,如数据库,Web应用程序和许多ohers。
The manager of this network need a monitoring application that alerts him if any application was fall down. But I haven't specifications about the kind of problems that may occur!!
该网络的管理员需要一个监控应用程序,以便在任何应用程序崩溃时向他发出警报。但我没有关于可能出现的问题的规格!
May I have more explanations about WMI.
我可以对WMI有更多解释。
Thank you.
#1
WMI (System.Management namespace) or hooking into the windows performance monitors would give you a good running start. You can also set up your own sort of 'client-server' monitoring infrastructure, where a program runs as a windows service on each of the target machines. Said program would then be able to run whatever monitoring code you want, such as checking that a process with a particular name is running. This program would send reports to the central server (via remoting, or sockets, or a webservice, or whatever you're comfortable with) containing a 'status' report of the given machine. The central server could then aggregate the statuses and send an alert or set off a klaxon or whatever is appropriate for your business needs.
WMI(System.Management命名空间)或挂钩到Windows性能监视器将为您提供良好的运行开始。您还可以设置自己的“客户端 - 服务器”监视基础结构,其中程序作为每台目标计算机上的Windows服务运行。然后,所述程序将能够运行您想要的任何监视代码,例如检查具有特定名称的进程是否正在运行。该程序将向*服务器发送报告(通过远程处理,或套接字,或Web服务,或任何您熟悉的内容),其中包含给定计算机的“状态”报告。然后,*服务器可以聚合状态并发送警报或引发汽车或适合您业务需求的任何内容。
#2
This depends on whether you mean any arbitrary application, without any coding changes or support within the applications themselves? Or do you mean a suite of applications that are custom coded to cooperate with the monitoring system you are building.
这取决于您是否意味着任何应用程序,在应用程序本身内没有任何编码更改或支持?或者你的意思是一套自定义编码的应用程序,以配合你正在构建的监控系统。
In the latter case I would add a remoting channel to the applications, that a monitoring system could connect to on a regular basis, (functionally like a ping) and with a generic GetStatus() method that would report appropriate health stats to the monitoring system... I would add this functionality as a separate dependant assembly to each app I wanted to monitor...
在后一种情况下,我会向应用程序添加一个远程处理通道,监视系统可以定期连接(功能上类似于ping),并使用通用的GetStatus()方法向监视系统报告适当的健康状况...我会将此功能添加为我想要监控的每个应用程序的单独依赖程序集...
In the first case, I believe you will need to hook into OS APIs, especially to communicate with OS's running on other machines on the network (if that is also a requirement) As You mentioned .Net I assume you are talking WIn32 Machines only. I do not know what fuinctionality is exposed by the WIn32 API in this area.
在第一种情况下,我相信您需要连接到OS API,特别是与在网络上的其他机器上运行的OS进行通信(如果这也是一项要求)正如您提到的.Net我假设您只在谈论WIn32机器。我不知道WIn32 API在这个领域暴露了什么功能。
#3
You need to define monitoring. How are you planning to monitor the applications and what kind of information do you plan on recording?
您需要定义监控。您打算如何监控应用程序以及您计划录制哪些类型的信息?
#4
What is your definition of a "problem" for the app? Do you have code control over the app(s) to be monitored? Generally an app having "problems" doesn't announce it, as it's usually due to a bug. How you would detect that is very difficult if the app isn't already designed to send out information specifically for you to look for problems.
您对该应用程序的“问题”的定义是什么?您是否对要监控的应用程序进行代码控制?通常,具有“问题”的应用程序不会公布它,因为它通常是由于错误。如果应用程序尚未设计为专门为您发送信息以查找问题,您将如何检测到这一点非常困难。
The only thing remotely similar I've done in the past was to hook into the scheduler itself(in Windows CE) to monito the amount of quantum threads were getting to look for something consuming too much of the processor, but be forewarned that doing that kind of thing has huge potential for bugs, it uses a lot of the processor itself (and I have no idea if you can even do it on the desktop).
我过去做的唯一远程类似的事情是挂钩调度程序本身(在Windows CE中)以监控量子线程的数量,以寻找消耗过多处理器的东西,但预先警告这样做有些东西有巨大的漏洞潜力,它使用了很多处理器本身(我不知道你是否可以在桌面上做到这一点)。
#5
Well, monitoring applications is not as simple, since you have to look into other pc's and what is going on in them.
那么,监控应用程序并不那么简单,因为您必须查看其他PC以及它们中发生的事情。
Common ways for monitoring a Network are using the SNM-Protocol suite, or going more into Windows world the WMI-Path.
监控网络的常用方法是使用SNM协议套件,或者更多地使用WMI-Path进入Windows世界。
WMI is wrapped in .NET but not at a hole, so you need to know how to handle WMI and build your own wrappers for that.
WMI包含在.NET中,但不包含在漏洞中,因此您需要知道如何处理WMI并为此构建自己的包装器。
SNMP, I bet, is not really helpful, since not all applications support this.
我敢打赌,SNMP并不是真的有用,因为并非所有应用程序都支持这一点。
#6
To be more clear, in my network I have different machines and servers where are running some applications like databases, web applications and many ohers.
更清楚的是,在我的网络中,我有不同的机器和服务器,运行一些应用程序,如数据库,Web应用程序和许多ohers。
The manager of this network need a monitoring application that alerts him if any application was fall down. But I haven't specifications about the kind of problems that may occur!!
该网络的管理员需要一个监控应用程序,以便在任何应用程序崩溃时向他发出警报。但我没有关于可能出现的问题的规格!
May I have more explanations about WMI.
我可以对WMI有更多解释。
Thank you.