I wish to monitor windows services on other servers and would like to configure alerts if any service is stopped
e.g. Oracle, SQL Server Agent services
How to configure such a tag?
@Pradyumna: You have essentially 2 approaches. You can use the PI TCP Response interface or the PIPerfmon interface to track the status of your services. Both are part of the MCH Health Monitor interface package that comes with the PI System. You can find the package easily in the download center. You'll find the documentation on how to configure the tags to capture the state/performance counter of your services.
Thereafter, you'll need to decide how do you report your alerts. Several solutions are possible such as:
Does it answer your question?
Thanks for your response.
But am still unable to config the required PI Tags.
Requirement: (Heartbeat) Tags for (Windows Server 2008 OS) services like SQL Server Instance, Agent, Oracle etc.
I checked PIPerfmon interface but it shows options same as Windows PerfMon,
i.e. there is an option to check health of any running process (as in Task Manager >> Processes)
but not the Services.
Regarding, the alert part, I can configure via PI System Explorer >> Notifications, once I am able to configure the PI tags.
When a service becomes started a corresponding process will be created in memory. You do not monitor services but process counters. For a heartbeat you can use the Elapsed Time counter of a process. In case the service is not running, the correspondent tag serviced by PI Performance Monitor interface will report "I/O Timeout" like for all other process counters too. This is the behavior if a process cannot be found in memory. The Elapsed Time counter reports the amount of seconds since process (service) start. A stale Elapsed Time counter indicates a hanging process.
There are ways to query the status of a service e.g. using Get-Service PowerShell command but this just gives you the information showing within services console (services.msc). To get detailed information, please monitor the process.
Ok, is there a work around to ping a service at a particular port,
e.g. MS SQL Server communicates at port 1433
According to the web page whose link is below, you cannot ping ports since ping and ports belongs to different transport layer protocols. Nevertheless, there are other alternatives as nmap. If you search on google, you will find more information about it.
The link is: http://serverfault.com/questions/309357/ping-a-specific-port
Hope it helps!
Pradyumna ParidaOk, is there a work around to ping a service at a particular port,
Your question for a workaround indicates an issue but I don't get what your issue is. If I am interested to monitor the health of a process - no matter if the process is a service or something else - I start with just record 3 counters:
a) "Elapsed Time" is a kind of heartbeat, a continuously increasing value indicates a healthy process.b) "% Processor Time" indicates the usage of CPU resourcesc) "Private Bytes" shows the memory usage. The value can increase but you should also see that memory becomes freed up again. If this is not the case, the process may be leaking memory.
Can you please explain why monitoring processes is an issue for you?
If you are just interested to remotely query service statuses like "Running", "Stopped", "Starting and similar, Windows Management Instrumentation (WMI) could be a solution for you. PowerShell cmdlet Get-Service is to my knowledge as well based on WMI but you can also create an application in Visual Studio. Here are some resources you may want to look into:
See the post earlier from @Mathieu regarding how to get the PI Interface for TCP Response. This interface can attempt a TCP connection to a specified port. Worth noting that there is a PI System Management Tools plug-in to help configure TCP Response tags.
In addition there is a PI Interface for Windows Management Instrumentation which could monitor services however this is not part of MCN Health Monitor mentioned by @Mathieu
Retrieving data ...