Commit Graph

52 Commits

Author SHA1 Message Date
kirill reshke 2241255353
Fix changelog generation script (#439) 2022-06-22 13:20:39 +03:00
Тимофей Шляпников 33647f5750
Better prometheus support (#414)
* fix collector init

* Added promhttp server

* Fix memory leak

* Fix memory leak

* Minimum viable server

* Port is now set via config

* Port is now set via config

* Port is now set via config

* Better code organisation & config procession

* Fix docs

* Fix old typo in label_count

* More reliable init

* Shuffle metrics by label for more appropriate collection

* Done with shuffling

* Done, not tested

* Done, now rebase

* Format

* Fix port

Co-authored-by: tim-shlyap <tim-shlyap@yandex-team.ru>
2022-03-25 21:21:59 +05:00
reshke 63b981e8c0 Deb fixes for https://www.postgresql.org/message-id/flat/YOMyXyErQ50je0zh%40msg.df7cb.de#c997486f4403d814ff6d1967772e58eb 2021-12-03 21:52:33 +00:00
reshke 2b261db9d3 Use Postgresql Version number from pg_config.h 2021-12-03 17:47:09 +00:00
kirill reshke 763862ac8c
fix tests and drop travis ci (#358)
* Fix test

* replace clang-format-9 with clang-format

* Drop travis
2021-11-12 16:54:50 +05:00
Yury Frolov 02f3144265
Enabled writing stats in Prometheus format. (#346)
* Early implementation

* Added description for gauges

* Added prometheus lib finding to Cmake

* Fixed FindProm comments

* Small changes

* free to prom_free

* Moved metrics to separate file

* Refactored & added new methods to prom_metrics

* Refactored cron.c to use prom_metrics.h

* Refactored CMake & odyssey.h

* Added new metrics

* Small refactoring

* Small method renaming

* Small fix in init

* Added methods for use in od_cron_stats_cb

* Small fixes

* Refactored metrics to use separate collectors

* Small fix

* Passing metrics to od_cron_stat_cb now.

* Removed unused imports

* Removed old od_log calls

* Removed TODO

* Revert "Removed old od_log calls"

This reverts commit 60000c8321.

* Uncommented od_log calls

* Added processed clients field to metrics

* Refactored metrics init

* Fixed write_stat

* Added method for worker stats

* Added method for worker stat to metrics header file

* Refactored worker stat method

* Reverted changes in odyssey.h

* Added writing metrics to od_worker

* Added new method to logger

Method provides writing big strings to log without formatting.

* Fixed prometheus log writing

* More fixes

* Fixed log writing

* Fixed log calls

* Added TODO

* Added assertion whether prom.h found

* Fixed no format logger method

Now logs follow log format

* Fixed logger

* Added log_stats_prom option to config

* Renamed od_logger_write_no_fmt to od_logger_write_plain

* Formatted

* More ifdefs

* Added memory deallocating in od_cron_stop

* Updated configuration.md

* Removed outdated TODO

* Changed label

* Formatted
2021-08-17 17:07:16 +05:00
reshke 74623edfb5 LDAP auth in od 2021-04-28 17:54:56 +05:00
Marc Rechté cee665fb45 Allow link to dynamic libpq (.so). Builds OK on ArchLinux. 2021-02-09 13:57:07 +01:00
rechtem 40fd90eb7f
Fix Makefile in order to build on RHEL8/CentOS8 (#264) 2021-01-18 15:11:07 +05:00
kirill reshke 23dafccc95
save config file name value on start (#260) 2021-01-12 15:18:24 +05:00
kirill reshke 919c5c188a
debian infrastructure better + cmake fixes (#258)
* change debian build version

* some cmake lists fixes

Co-authored-by: reshke <Kirill Reshke>
2021-01-11 15:32:56 +05:00
kirill reshke 34847780e3
cmake fix: use UTC time in RFC 5322 format (#255)
Co-authored-by: reshke <Kirill Reshke>
2021-01-11 13:07:46 +05:00
reshke 91b56831ee fix cmake tabulation 2020-12-30 22:25:40 +05:00
reshke 0933d1ebb3 better 2020-12-30 18:49:34 +05:00
Daniil Zakhlystov e6781e8a4e
Rename OD_ escaping to MM_ && fix indentation for cmakelists (#235) 2020-11-23 18:57:56 +05:00
Daniil Zakhlystov e97f7e1f1c
Add compression toggle to config, cmake && Add dependencies to BuildDebian (#234)
* Add compression option to config

* Add BUILD_COMPRESSION option to cmake

* Escape identifiers

* Add preprocessing directives for OD_BUILD_COMPRESSION

* Add dependencies for BuildDebian

* apply fmt

Co-authored-by: root <root@ubuntu-build-machine.ru-central1.internal>
2020-11-23 16:55:42 +05:00
Daniil Zakhlystov 222da0c70a
Implement libpq compression (#230)
* Add zlib and zstd to cmake

* Add zpq_stream to machinarium

--
zpq_stream is used for streaming compression/decompression of Postgres protocol

* Add zpq_stream-related functions to machinarium

* Add compression set/free/read/write logic to machinarium

* Add startup packet compression var to kiwi

* Add compression_ack backend message support for kiwi

* Add compression setup logic for main odyssey project

* apply fmt

* fix format #2

Co-authored-by: root <root@ubuntu-build-machine.ru-central1.internal>
2020-11-23 13:22:17 +05:00
kirill reshke eaae0eff47
fix debian & cmake (#226)
Co-authored-by: reshke <Kirill Reshke>
2020-11-03 12:24:48 +05:00
kirill reshke a5f716025c
fix coveirty issues + remove legacy (#224)
* fix a couple of severity issues

* emove lagacy

* zero cost debug macros on release

* dbg macro fix

* apply fmt

Co-authored-by: reshke <Kirill Reshke>
2020-10-26 17:29:05 +05:00
kirill reshke 129ec0be83
fix scram, use postgresql 13 in build & tests (#223)
* fix scram, use postgresql 13 in build & tests

* move scram test inside docker

Co-authored-by: reshke <Kirill Reshke>
2020-10-26 10:00:17 +05:00
kirill reshke 7135f2f0c8
fix CI (#213)
Co-authored-by: reshke <Kirill Reshke>
2020-10-16 21:30:45 +05:00
Andrey Borodin 5f7e3ea546 Upgrade dependency to PG11 and fix CI 2020-02-28 15:10:38 +05:00
Dmitry Dolgov d0be26bf75 Fix build on ubuntu (#90)
Ubuntu pg_config packaged a bit differently, and required libraries
actually can be found in pkglibdir. Search anyway for libdir, then
pkglibdir. Another catch is that pg_config add a new line at the end,
which breaks stuff, so strip it.
2019-12-27 16:57:26 +05:00
Andrey Borodin 155938d3a8 Use more hints to find PG libs 2019-12-24 15:31:22 +05:00
Dmitry Dolgov 4a09b5b7e9 Modifications to build on PG12 (#86)
Build seems to fail with PostgreSQL 12 version, due to incompatibility
after [1], and required presence of libpgport (to expose pg_sprintf for
scram implementation).

To improve the situation, introduce couple of changes:

* Rely on pg_config to get lib/include directories
* Add libpgport.a into linking
* Provide different versions of pg_b64_decode/encode depending on
PG_VERSION_NUM

[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=cfc40d384ae51ea2886d599d2008ae57b529e6ea
2019-12-18 14:39:24 +05:00
Andrey Borodin 2262362349 Fix PostgreSQL linkage 2019-11-21 16:54:59 +05:00
Dima Starkov a8ca664a63 Implements SCRAM Authentication (#73) 2019-11-11 12:28:50 +03:00
Dmitry Simonenko c6542d7003 odyssey: post merge fixes 2019-09-27 16:47:45 +03:00
reshke debfd09d8e Add PAM auth support 2019-09-26 13:54:53 +05:00
Dmitry Simonenko 9e37d1eff8 odyssey: add support for BoringSSL 2018-11-23 17:07:39 +03:00
Dmitry Simonenko 82e6c1a7a6 odyssey: remove shapito library 2018-08-23 16:24:07 +03:00
Dmitry Simonenko 02662c95ed kiwi: introduce 2018-08-23 13:09:03 +03:00
Dmitry Simonenko e17d0a184c odyssey: support OPENSSL_ROOT_DIR. #4 2018-06-06 18:11:56 +03:00
Dmitry Simonenko 8c6c97d085 odissey: fix out-of-source shapito build 2017-10-03 17:07:19 +03:00
Dmitry Simonenko efe142999a odissey: add -DBUILD_DEBIAN to support Debian build 2017-08-21 17:23:50 +03:00
Dmitry Simonenko 717de6124d odissey: major shapito api update 2017-07-06 16:36:14 +03:00
Dmitry Simonenko 87bd137618 odissey: move submodules from lib/ to third_party/ 2017-07-04 16:36:32 +03:00
Dmitry Simonenko 6ce1a2ee4d odissey: update shapito build 2017-06-28 15:15:43 +03:00
Dmitry Simonenko 8619ddc589 odissey: update machinarium (openssl pthread locking) 2017-06-27 17:42:04 +03:00
Dmitry Simonenko 608c45976a odissey: shapito: no need for -DBUILD_STATIC=ON 2017-06-15 16:34:25 +03:00
Dmitry Simonenko bd9575f088 odissey: update shapito submodule 2017-06-07 14:50:58 +03:00
Dmitry Simonenko 7dda4bb57c odissey: add shapito submodule 2017-06-07 14:24:18 +03:00
Dmitry Simonenko f11f115006 odissey: update machinarium submodule 2017-05-15 15:34:08 +03:00
Dmitry Simonenko 49af835451 odissey: set io readahead; update machinarium 2017-04-18 16:28:43 +03:00
Dmitry Simonenko c6150f1b33 odissey: pass cmake build type to soprano submodule 2017-02-07 18:50:36 +03:00
Dmitry Simonenko 5b0a38b775 odissey: pass build type to machinarium 2017-02-07 18:43:36 +03:00
Dmitry Simonenko 0d0baac876 odissey: do not pass cflags to submodules 2017-02-07 18:39:55 +03:00
Dmitry Simonenko 87123a4783 odissey: fix soprano build 2017-01-18 15:13:59 +03:00
Dmitry Simonenko 9c1de142db odissey: always use bundled static libraries 2017-01-18 15:00:33 +03:00
Dmitry Simonenko 07f4193cad odissey: update soprano path 2017-01-17 17:19:16 +03:00