aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-02-12README: simplify the license sectionHEADmaindevShulhan
Mention only license name and the file to look for full license information.
2025-12-29Release haminer v0.3.0 (2025-12-29)v0.3.0Shulhan
**💧 Group documentation into _doc/ directory**. This is so we can serve the documentation under https://kilabit.info/project/haminer. In the Makefile, we add task `serve-doc` to preview the documentation. **💧 Replace module "share" with "pakakeh.go"** The "share" module has been renamed to "pakakeh.go" and moved to different git repository. **💧 Realign struct HttpLog and questdbClient** The HttpLog realign from 304 to 288 bytes. The questdbClient realign from 56 to 24 bytes. **🪵 Comply with all linters recommendations** Some of breaking changes, * Field [Config.HttpUrl] renamed to [Config.HTTPURL] * Field [ConfigForwarder.Url] renamed to [ConfigForwarder.URL] * Struct [HttpLog] renamed to [HTTPLog] **💧 _ops/haminer-test: setup container for development using mkosi** The container run HAProxy and PostgreSQL servers. We also create new dummy backend to test backend in HAProxy. The haminer-dummy-backend run in container and serve two ports in HTTP and TCP modes. **🌱 all: implement forwarder for Postgresql** The Postgresql forwarder accept single option "URL", [forwarder "postgresql"] url = postgres://<user>:<pass>@<host>/<database>?sslmode=<> The user and database must already created first, manually. **🌼 Do not log ServerName with invalid connection '<NOSRV>'** **🌼 _AUR: fix installation of binary in package function** **Add linter gocheck** Program gocheck implement go static analysis using [Analyzer] that are not included in the default go vet. See package [lib/goanalysis] for more information. [Analyzer]: https://pkg.go.dev/golang.org/x/tools/go/analysis#hdr-Analyzer + [lib/goanalysis]: https://pkg.go.dev/git.sr.ht/~shulhan/pakakeh.go/lib/goanalysis/
2025-12-29all: add missing SPDX license to all filesShulhan
Convert the old ".reuse/dep5" format to REUSE.toml format using "reuse convert-dep5" command. For generated files, add the ".license" file. Using "reuse annotate ..." it automatically add empty line after "SPDX-FileCopyrightText:", and it also put "SPDX-FileCopyrightText" above the "SPDX-License-Identifier". Now, this project is compliant with version 3.3 of the REUSE Specification.
2025-12-29make: replace external linter with gocheckShulhan
The fieldalignment and shadow is a linter from golang.org/x/tools. This program actually have an API that can be used. The pakakeh.go/lib/goanalysis wrap those APIs into a single function call that can be run inside a main. This minimize and simplified our tools dependencies.
2025-06-30_AUR: fix installation of binary in package functionShulhan
2025-06-30_doc: merge index.md into README.mdShulhan
Also, make the README as index for project page.
2025-01-08all: replace golangci-lint with go vetShulhan
Golangci-lint does not works when working with gotip, use too much memory, and become red herring and subjective instead of correctness.
2025-01-08go.mod: update all dependenciesShulhan
2024-09-08go.mod: update all dependenciesShulhan
2024-04-01all: do not log ServerName with invalid connection '<NOSRV>'Shulhan
2024-03-19[wip] _wui: implement web user interfaceShulhan
2024-03-18all: auto migrate the database when using postgresql forwarderShulhan
2024-03-18all: implement forwarder for PostgresqlShulhan
The Postgresql forwarder accept single option "URL", [forwarder "postgresql"] url = postgres://<user>:<pass>@<host>/<database>?sslmode=<> The user and database must already created first, manually.
2024-03-18all: rename some fields in HTTPLog for readabilityShulhan
2024-03-18all: add unit test for ParseUDPPacketShulhan
The function signature to parse the UDP packet changes to return HTTPLog instead of as receiver.
2024-03-18all: rename the forwarder files by using prefix "forwarder_"Shulhan
2024-03-18all: create new dummy backend to test backend in HAProxyShulhan
The haminer-dummy-backend run in container and serve two ports in HTTP and TCP modes.
2024-03-18_ops/haminer-test: setup container for development using mkosiShulhan
The container run HAProxy and PostgreSQL servers.
2024-03-17all: reformat the README to markdownShulhan
Our primary host for the repository in sourcehut, unfortunately they do not support AsciiDoc format, unlike GitHub. To make both repositories can render README we changes it to markdown format.
2024-03-17Makefile: run tests with coverageShulhan
2024-03-16all: comply with all linters recommendationsShulhan
Some of breaking changes, * Field [Config.HttpUrl] renamed to [Config.HTTPURL] * Field [ConfigForwarder.Url] renamed to [ConfigForwarder.URL] * Struct [HttpLog] renamed to [HTTPLog]
2024-03-16all: realign struct HttpLog and questdbClientShulhan
The HttpLog realign from 304 to 288 bytes. The questdbClient realign from 56 to 24 bytes.
2024-03-16all: add linter fieldalignment and shadowShulhan
2024-03-16all: replace module "share" with "pakakeh.go"Shulhan
2023-03-05all: update dependenciesShulhan
2022-09-06_doc: add some introduction in the README and indexShulhan
Show what the HTTP log looks like, how it stored, and how it can be used.
2022-09-06go.mod: update all dependenciesShulhan
2022-09-06all: add task to preview the documentationShulhan
2022-09-06all: add symlink for READMEShulhan
Without symlink, GitHub will render repository page as plain text instead of AsciiDoc.
2022-08-25all: group all documents into directory _docShulhan
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