Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can read custom files TEXTFILE_DIRS="C:\custom_metrics\" #1461

Open
morshaq opened this issue May 5, 2024 · 5 comments
Open

can read custom files TEXTFILE_DIRS="C:\custom_metrics\" #1461

morshaq opened this issue May 5, 2024 · 5 comments

Comments

@morshaq
Copy link

morshaq commented May 5, 2024

I'm encountering an issue with the Prometheus Windows Exporter where metrics aren't being scraped despite configuring the exporter with specific collectors and providing custom metric files.

Here's the command I'm using to install and configure the exporter:

msiexec /i C:\Users\Administrator\Downloads\windows_exporter.msi ENABLED_COLLECTORS="ad,iis,logon,memory,process,tcp,textfile,thermalzone" TEXTFILE_DIRS="C:\custom_metrics"
I've also tried specifying the full path to the custom metric file like so:

C:\custom_metrics\custom.txt
However, even after adding files to the specified directory and ensuring their accessibility, none of the metrics are appearing in the Prometheus scraping.

Could you please assist me in resolving this issue and ensuring that the Prometheus Windows Exporter correctly scrapes the specified metrics?

@jkroepke
Copy link
Member

jkroepke commented May 5, 2024

Sure, please provides logs from event log

@morshaq
Copy link
Author

morshaq commented May 27, 2024

cant find anything in event viewer . can you please share with me a command that can read a log.txt file and collect memory and process ?

@jkroepke
Copy link
Member

log file isn't supported

@morshaq
Copy link
Author

morshaq commented May 27, 2024

Is there a way I can collect default collector data and get custom data from a text file? How can I get data that is not in the default collectors, and what is TEXTFILE_DIRS used for?

@jkroepke
Copy link
Member

jkroepke commented May 27, 2024

You can use the textfile collector to collect metrics from a text file. Ensure that the text file has the OpenMetrics format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants