dotnet / dotnet-monitor

This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints
MIT License
640 stars 113 forks source link

Add a configuration to allow disable dotnet monitor from polling all dotnet processes in a machine #2937

Open LaurenceChau opened 1 year ago

LaurenceChau commented 1 year ago

Background and Motivation

Now one dotnet-monitor will try to poll all dotnet processes running in a machine and one dotnet-monitor can only export one dotnet process's metrics in a machine. There is a scenario that we need to export several dotnet processes' metrics in a machine however we are not using docker. In that case, each dotnet process will be polled by several dotnet-monitor which will make the diagnostics port of the dotnet process not responsive. Although listen mode can prevent the dotnet-monitor from polling all processes, it is not applicable to our deployment practice.

Proposed Feature

I am thinking if it is possible to

  1. disable the dotnet monitor to stop polling all processes with a configuration or
  2. allow us to select/filter multiple processes with the process filter and dotnet-monitor will only poll thoses selected processes or
  3. allow one dotnet-monitor to export multiple dotnet processes's metrics.

Usage Examples

This allow us to collect multiple dotnet processes' metrics in a machine without using container.

wiktork commented 1 year ago

Previously reported issues: #2761, #2760

Are you scraping the metrics endpoint with Prometheus, or do you just want metrics for multiple processes?

LaurenceChau commented 1 year ago

Apologize for confusing, it would be perfect if dotnet-monitor can export metrics for multiple processes.

I was afraid that the metrics for multiple processes feature conflict with the default process config purpose, therefore I raised another request.

LaurenceChau commented 1 year ago

Is it possible to use one dotnet monitor in a machine to collect metrics for multiple applications?