summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-20Release haminer v0.2.0 (2022-08-20)v0.2.0Shulhan
This release relicensing the software to GPLv3, add support for forwarding logs to InfluxDB v2 and questdb [1]. [1] https://questdb.io. Signed-off-by: Shulhan <ms@kilabit.info>
2022-08-19all: restructure the READMEShulhan
While at it, mention how to install it using pre-build Arch Linux package through build.kilabit.info.
2022-08-19_AUR: add package build for Arch LinuxShulhan
2022-08-19all: relicensing the haminer to GPL v3Shulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2022-08-18all: update READMEShulhan
This changes convert the README to AsciiDoc format, add section about configuring forwarder using questdb.
2022-08-17all: implement forwarder for questdbShulhan
Questdb [1] is one the time-series database. We experiment to forward the HTTP log using Influx Line Protocol (ILP). [1]: https://questdb.io/
2022-08-17all: make the forwarders configuration fields to be genericShulhan
Instead of single forwarder, Influxd, the Config struct now can have one or more forwarders. The kind of forwarders is defined by it subsection name, for example `[forwarder "influxd"]` defined a forwarder for influxd.
2022-08-17all: add task to run test on makeShulhan
2022-08-17all: rename struct InfluxdConfig to ConfigForwarderShulhan
Later we will have multiple forwarders, not only influxd.
2022-08-17all: move handling signal to main programShulhan
It is up to the user of haminer library (in this case the cmd/haminer) on how to Start and Stop the process, not at the library level.
2022-08-17all: rename struct type Halog to HttpLogShulhan
Halog contains parsed HTTP log, so its make more readable if we rename the type name.
2022-08-17all: move repository to git.sr.ht/~shulhan/haminerShulhan
2022-08-17all: remove unused constantsShulhan
2022-08-17all: rename influxdb.go to influxd_client.goShulhan
2022-08-17all: restructure the log that we send to influxdbShulhan
Since the influxdb v2, and since the flux query language introduced, the way the log read and queried kinda changes. Things that we can query on v1, is not possible (or maybe I forgotten) anymore. This changes move all haproxy log fields value that is not number (except HTTP status code) to tags and left all numbers (like time, number of connections, bytes read) in the fields.
2022-08-16all: use fixed []byte for consuming UDP packetShulhan
Instead of using struct UDPPacket to read UDP packet from HAproxy log, simplify it by using fixed, reusable size of []byte directly.
2022-08-16all: remove code that sending heartbeatShulhan
Previously, if no logs received after 15 seconds (or any interval user defined in Config.ForwardInterval), the haminer process send an empty halog to forwarders (empty halog is the one that use "-" for backend, frontend, server name, and HTTP method). This cause bogus traffic and need additional filter when analyzed.
2022-08-15all: add support for influxd API v2Shulhan
This changes replace the "influxdb_api_write" with new section `[forwarder "influxd"]`. The section contains version, url, org, bucket, user, password, and token. The version field define the API version to be used when writing log to Influxd.
2022-08-14all: update the go.modShulhan
Set the minimum Go to 1.18 and update the share modules. When this program written, the ini library does not have the Unmarshal function, so we load the configuration by reading each key and parse it manually. Now that we have Unmarshal function, the way we parse the configuration is simplified so does the way configuration written. This changes the accept_backend, capture_request_header written. Instead of using comma to set multiple values, now it must be written one key and one value on different line.
2022-08-14all: disable option to enable all lintersShulhan
2019-01-25haminer: send heartbeat indicator if logs is emptyv0.1.0Shulhan
An administrator may need to monitor if the haminer service is running or not through kapacitor. With heartbeat, we can tell if haminer is not running if no data is send along, say, one hour.
2019-01-24cmd/haminer: update description of preprocess optionShulhan
2019-01-07Prepare for release haminer v0.1.0Shulhan
2019-01-07influxdb: add tag HTTP methodShulhan
Each endpoint (http_url) may have two or more HTTP methods on them.
2019-01-04doc: update README and format of example configurationShulhan
2019-01-04haminer: change buffered mode from max size to time intervalShulhan
Previously, we forward the logs only if total collected logs in buffer is greater or equal to 10. This commit change the model into using time interval, where the logs will be send every N seconds (default to 15 seconds).
2019-01-04influxdb: use "%q" for print string with quoteShulhan
2019-01-04influxdb: change "http_status_code" in tag to "tag_http_status"Shulhan
2019-01-04influxdb: add http_url to tagShulhan
2019-01-04Add option to preprocess http_urlShulhan
2019-01-04config: change the capture request header separator to commaShulhan
This is to make it consistent with separator on "accept_backend".
2019-01-04config: replace configuration with ini file formatShulhan
2018-11-30all: fix warning from linterShulhan
2018-11-30influxdb: add tag http status codeShulhan
2018-10-29Add option to parse HTTP request headerShulhan
2018-10-29make: replace the linting toolShulhan
2018-10-26Add go moduleShulhan
2018-04-05Add an example of systemd serviceShulhan
2018-04-05README: fix links and haproxy exampleShulhan
2018-04-01haminer: Library and program to parse and forward HAProxy logsShulhan