Services metrics

Hey, I want to get metrics of windows services (like get-services command data) .
I have not seen any metric module that doing so.
Does someone know any?

Thanks

Is it something specific to get-services command that you want to monitor, like the running state of a specific service? Or are you really interested in knowing the running state of all services of a host?

A state of specific service ..

Does this services responds in a specific tcp port?

I want to illustrate the Get-services "service name" command to get his status - running or not, thats all.

Yes, I understand. I don't think there is a way of invoking that command using metricbeat. The reason I asked about the open port is because if your final objective is to monitor if a service is running or not then I recommend that you use heartbeat instead. But heartbeat will require that the target service responds in an open port.

I really prefer to monitor specific service by metricbeat.
My only option is to develop a new metricsuite for that ?
Or there is an opensource for a module or something..

Yes, I think you will need to develop one. But IMO what you are trying to collect is not really suitable as a metricset.

Have you looked into execbeat? It allows running commands and collect output. I don't if it works with Windows commands thought...

The thing is I want to make just 1 "agent" that is collecting metrics from servers, and not to split it...

You mean that you are already running metricbeat and would not like to run another beat?

Yes. I want it to be by 1 service, "1 agent ", modulary and agily. I thought that this is kind of obvious that if the System module collects metrics on processes anf cpu, it might be option to collect metrics on services status ...

The thing is that everything related to uptime goes into heartbeat. Metricbeat is used for collecting counters, gauges, etc...

As I saw and used, there are modules that are collecting status, like apache in generally.
In my opinion, the system module should have the option to collect metrics - status from a services.
There is a way to offer this idea to be developed by elastic team?

This doesn't directly solve your requirement but I thought that I'd mention that in a future version of Metricbeat there will be a Windows Module:
https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-windows.html

which will start with a PerfMon metricset initially:
https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-metricset-windows-perfmon.html

So what you could do is have your own script poke a metric into a counter visible to PerfMon and have MetricBeat read that value out with the Windows Module using PerfMon metricset.

For example:
(Get-Service | Where-Object -Property Status -eq Running | Measure).count

Though a native metricset for the Windows Module that's able to measure service status would be a much better solution.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.