stohrendorf / csv-prometheus-exporter Goto Github PK
View Code? Open in Web Editor NEWPrometheus Exporter for CSV-based files over SSH
License: GNU Lesser General Public License v3.0
Prometheus Exporter for CSV-based files over SSH
License: GNU Lesser General Public License v3.0
Hello there,
So I have the exact same issue as this one #14 (comment)
I installed the tool in a container and connected it to prometheus, now I can see the default metrics "connected", "exposed metrics", etc. in grafana but none of mine. The thing is, I found out that the exporter doesn't even try to read my file because if I put a wrong path in the "file" parameter in the scrapeconfig.yml, it still shows the exact same messages :
First
2023-02-13 14:34:19.0057|INFO|csv_prometheus_exporter.Parser.SSHLogScraper|Scraper thread for /path/inexistantfile.bla on ip_address became alive
Which is weird, then :
2023-02-13 14:27:05.5284|INFO|csv_prometheus_exporter.Parser.SSHLogScraper|Starting tailing /path/inexistantfile.bla on ip_address
and then the error :
2023-02-13 14:28:05.5867|WARN|csv_prometheus_exporter.Parser.SSHLogScraper|SSH stream starvation for /path/inexistantfile.bla on ip_address
I understand from the other issues that the tool isn't supposed to gather data that didn't change from the last time they were put into metrics, but in the first place, shouldn't it collect the data the very first time it reads the file? Otherwise how could it know if it changed, if it tries to compare data to nothing?
My CSV is updated with new data every 24h, what I want to do is to gather those changes when they occur. So even if the changes are not fast, it should still work for this purpose right?
Thanks!
Makes #5 obsolete.
Is there any way to specify a metric as a gauge or are there any plans to add that functionality?
When I run the docker container I see this message for all the metrics I have defined. Can you help troubleshoot, please? I'm not sure what I'm doing wrong. I have attached my scrapeconfig.yml, as well as output from the docker command and a sample log file.
Currently (as of 8076f94) the CSV parser format is hardcoded for access log parsing. Other software might expose metrics in a different format, so the ability to configure the CSV format could be useful.
Otherwise the config script may redirect itself to other scripts and overwrite the reload interval, eventually leading to confusion about why the configuration is not as expected.
Related to #6
Problem is that when loading configuration from scripts, several things may occur:
In all these cases, the scraper will get confused and not work properly anymore. This needs to be fixed.
Thread.Abort()
is not supported on dotnet core.connected
metric.Possible problem when trying to use a flag to signal a request to abort: SSH output stream does not seem to support timeouts, thread may be stuck and never removed unless either the command exits or the connection is closed.
I'm trying to use your csv-prometheus exporter to get csv-formatted metrics into a prometheus/alertmanager monitoring solution. However, when I run the docker command to start the exporter I get the following error:
`# docker run stohrendorf/csv-prometheus-exporter
2020-05-20 16:57:01.0187|INFO|csv_prometheus_exporter.Scraper.Scraper|Current threadpool min threads: worker=2, completionPort=2
2020-05-20 16:57:01.0401|INFO|csv_prometheus_exporter.Scraper.Scraper|New threadpool min threads: worker=128, completionPort=64
Unhandled Exception: System.IO.FileNotFoundException: Could not find file '/etc/scrapeconfig.yml'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func 2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at csv_prometheus_exporter.Scraper.Scraper.ReadCoreConfig(IList 1& readers) in /app/Scraper/Scraper.cs:line 30
at csv_prometheus_exporter.Scraper.Scraper.Main(String[] args) in /app/Scraper/Scraper.cs:line 205`
But the file /etc/scrapeconfig.yml exists:
# ls -l /etc/scrapeconfig.yml -rwxr-xr-x 1 root root 1380 May 18 18:19 /etc/scrapeconfig.yml
I'm not very familiar with Docker. I would appreciate any assistance you can provide.
Currently (as of 8076f94) the only configurable auth method for SSH is user/password. Additionally, some public/private key pair auth should be implemented.
Hello, I have a csv file in a container. I would like to log that data inside Grafana.
Is this the right tool to use? Do you know any alternative? I cannot see any .csv
value in the configuration of the README.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.