项目作者: AdysTech

项目描述 :
A C# console application to parse log files (in delimited file format) and push data to Influx for later visualization.
高级语言: C#
项目地址: git://github.com/AdysTech/Influxer.git
创建时间: 2015-08-18T03:24:23Z
项目社区:https://github.com/AdysTech/Influxer

开源协议:

下载


Influxer

A C# console application to parse log files (currently only Windows Perfmon format) and push data to Influx for later visualization. It uses InfluxDB.Client.Net to interact with Influx.

InfluxDB is a very nice time series database, and is supported by many data visualizers (mainly grafana). But if you have other tools which are producing the data in csv format (mainly PerfMon in windows, or enterprise reporting tools) which are not designed for Influx era, you will have to develop own tools to pull from one tool and to push to other.

Meet Influxer, a small C# console application, which will take any text files with time series and upload it to any Influx instance.
It has special handling for Microsoft Windows Perfmon file format. It can be configured (via command line or by configuration files) to handle any type of text files.

Steps to generate configuration file
  1. Find out the time format for the input file
  2. Run the Influxer with -timeformat
  3. Once you see the configuration output on screen, rerun with output redirect (> somefile) to save the configuration

Build Status

Build status

Download Latest

  1. Supported command line arguments
  2. --help /? or /help shows this help text
  3. /export to print possible config section, pipe it to a file to edit and reuse the config
  4. -config <configuration file path> to load the config file.
  5. Any configuration entries can be overridden by command line switches shown below
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. Required flags
  8. -format <format> Input file format. Supported: Perfmon, Generic -input <file name> Input file name ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  9. InfluxDB related flags
  10. -dbName <name> Influx database Name, will be created if not present Default:InfluxerDB
  11. -influx <Url> Influx DB Url including port Default:http://localhost:8086
  12. -table <table name> Measurement name in InfluxDB Default:InfluxerData
  13. -pass <password> Password for InfluxDB
  14. -batch <number of points> No of points to send to InfluxDB in one request Default:128
  15. -retentionDuration <number of minutes> No of minutes that the data will be retained by InfluxDB, if noneof the plcies match, a new one will be created
  16. -retention <policy name> Name of the InfluxDB retention policy where the taget measurements will be created. RetentionDuration takes precedence over this
  17. -uname <username> User name for InfluxDB
  18. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  19. Perfmon file format related flags
  20. -columns <column list> Comma seperated list of Columns to import Default:
  21. -splitter <regex> RegEx used for splitting rows into columns Default:,(?=(?:[^"]*"[^"]*")*[^"]*$)
  22. -tags <tag=value,tag2=value> Tags to be passed with every value,Comma seperated key value pairs Default:
  23. -filter <filter> Filter input data file, Supported:Measurement (import preexisting measurements), Field (import preexisting fields), Columns (import specified columns) Default:
  24. -MultiMeasurements Push each Performance counter into their own Measurements Default:
  25. -Precision <precision> Supported:Hours<1>,Minutes<2>,Seconds<3>,MilliSeconds<4>,MicroSeconds<5>,NanoSeconds<6> Default:Seconds
  26. -TimeFormat <format> Time format used in input files Default:MM/dd/yyyy HH:mm:ss.fff
  27. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  28. Generic delimited file format related flags
  29. -ignore <char> Lines starting with <char> are considered as comments, and ignored
  30. -noheader Input file does not have column headers, configuration file should provide a column header mapping Default:
  31. -header <Row No> Indicates which row to use to get column headers Default:1
  32. -ignoreerrors Ignore too many errors due to invalid data or config file Default:
  33. -skip <Row No> Indicates how may roaws should be skipped after header row to get data rows Default:
  34. -timetype <type> Type of Time format used in input files, String, Epoch or Binary Default:String
  35. -utcoffset <No of Minutes> Offset in minutes to UTC, each line in input will be adjusted to arrive time in UTC Default:
  36. -validate <No of Rows> Validates n rows for consistent column data types Default:10
  37. -columns <column list> Comma seperated list of Columns to import Default:
  38. -splitter <regex> RegEx used for splitting rows into columns Default:,(?=(?:[^"]*"[^"]*")*[^"]*$)
  39. -tags <tag=value,tag2=value> Tags to be passed with every value,Comma seperated key value pairs Default:
  40. -filter <filter> Filter input data file, Supported:Measurement (import preexisting measurements), Field (import preexisting fields), Columns (import specified columns) Default:
  41. -MultiMeasurements Push each Performance counter into their own Measurements Default:
  42. -Precision <precision> Supported:Hours<1>,Minutes<2>,Seconds<3>,MilliSeconds<4>,MicroSeconds<5>,NanoSeconds<6> Default:Seconds
  43. -TimeFormat <format> Time format used in input files Default:MM/dd/yyyy HH:mm:ss.fff