Giter Club home page Giter Club logo

csv-prometheus-exporter's People

Contributors

fossabot avatar stohrendorf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

csv-prometheus-exporter's Issues

Impossible to gather data

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!

Support for Gauges?

Is there any way to specify a metric as a gauge or are there any plans to add that functionality?

"of 0 metrics, 0 were retained"

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.

files.zip

Configuration of CSV format

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.

Proper error handling when loading external scripts

Problem is that when loading configuration from scripts, several things may occur:

  • The script may return a non-zero exit status.
  • The script may produce invalid output.
  • The script may hang forever.

In all these cases, the scraper will get confused and not work properly anymore. This needs to be fixed.

Buggy scraper thread removal

  1. Thread.Abort() is not supported on dotnet core.
  2. The host ist not removed from the 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.

Could not find file '/etc/scrapeconfig.yml' but the file exists

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.

Allow use of SSH key pairs

Currently (as of 8076f94) the only configurable auth method for SSH is user/password. Additionally, some public/private key pair auth should be implemented.

Export csv file content

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.