feat(ulogd): enabling ulogd #121

Merged
rlahfa merged 1 commit from :ulogd into main 2024-09-08 12:21:08 +02:00
Member

ulogd indique qu'il n'arrive pas à parse le fichier de config, mais je ne trouve pas le problème

ulogd indique qu'il n'arrive pas à parse le fichier de config, mais je ne trouve pas le problème
@ -0,0 +28,4 @@
postgresql = {
enable = true;
ensureUsers = [
{
Owner

The root user is unnecessary

The `root` user is unnecessary
Author
Member

I removed the root user in the database.

I removed the root user in the database.
lbailly marked this conversation as resolved
@ -0,0 +32,4 @@
name = "root";
ensureClauses.superuser = true;
}
{
Owner

ulogd user is unnecessary as ulogd may require root privileges for now

`ulogd` user is unnecessary as ulogd may require `root` privileges for now
Author
Member

we need a user to access the database, and I'm not willing to use the 'postgres' user for such operations

we need a user to access the database, and I'm not willing to use the 'postgres' user for such operations
rlahfa marked this conversation as resolved
@ -0,0 +21,4 @@
user = "\"root\"";
table = "\"ulog2_ct\"";
procedure = "\"INSERT_CT\"";
pass = "\"changeme\"";
Owner

connstring = "postgresql:///ulogd?host=/run/postgresql"; should work in principle

`connstring = "postgresql:///ulogd?host=/run/postgresql";` should work in principle
Author
Member

it doesn't want a connection URI, but really a connection string, as in section 31.1.1.1. of the postgres doc. In the end, I just don't give network connection information and it behave as expected.

it doesn't want a connection URI, but really a connection string, as in section 31.1.1.1. of the [postgres doc](https://www.postgresql.org/docs/9.2/libpq-connect.html#LIBPQ-CONNSTRING). In the end, I just don't give network connection information and it behave as expected.
rlahfa marked this conversation as resolved
lbailly force-pushed ulogd from a3c2d3ad10
Some checks failed
Check meta / check_meta (pull_request) Successful in 27s
Check meta / check_dns (pull_request) Successful in 1m6s
build configuration / build_compute01 (pull_request) Successful in 1m42s
build configuration / build_web02 (pull_request) Successful in 1m23s
build configuration / build_storage01 (pull_request) Successful in 1m55s
build configuration / build_vault01 (pull_request) Successful in 1m55s
build configuration / build_web01 (pull_request) Successful in 2m5s
build configuration / build_rescue01 (pull_request) Successful in 1m21s
lint / check (pull_request) Successful in 39s
build configuration / build_geo01 (pull_request) Successful in 1m18s
build configuration / build_geo02 (pull_request) Successful in 1m14s
build configuration / build_bridge01 (pull_request) Successful in 1m37s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m32s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m18s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m23s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m23s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m11s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m14s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m54s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m16s
to 6c77e84cc2
Some checks failed
Check meta / check_meta (pull_request) Successful in 27s
Check meta / check_dns (pull_request) Successful in 1m2s
build configuration / build_compute01 (pull_request) Successful in 1m43s
build configuration / build_storage01 (pull_request) Successful in 1m43s
build configuration / build_web02 (pull_request) Successful in 1m22s
build configuration / build_vault01 (pull_request) Successful in 2m4s
build configuration / build_web01 (pull_request) Successful in 2m17s
build configuration / build_rescue01 (pull_request) Successful in 1m23s
lint / check (pull_request) Successful in 27s
build configuration / build_bridge01 (pull_request) Successful in 1m20s
build configuration / build_geo01 (pull_request) Successful in 1m26s
build configuration / build_geo02 (pull_request) Successful in 1m30s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m29s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m19s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m27s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m17s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m46s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m51s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m12s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m26s
2024-08-28 19:29:31 +02:00
Compare
lbailly force-pushed ulogd from 6c77e84cc2
Some checks failed
Check meta / check_meta (pull_request) Successful in 27s
Check meta / check_dns (pull_request) Successful in 1m2s
build configuration / build_compute01 (pull_request) Successful in 1m43s
build configuration / build_storage01 (pull_request) Successful in 1m43s
build configuration / build_web02 (pull_request) Successful in 1m22s
build configuration / build_vault01 (pull_request) Successful in 2m4s
build configuration / build_web01 (pull_request) Successful in 2m17s
build configuration / build_rescue01 (pull_request) Successful in 1m23s
lint / check (pull_request) Successful in 27s
build configuration / build_bridge01 (pull_request) Successful in 1m20s
build configuration / build_geo01 (pull_request) Successful in 1m26s
build configuration / build_geo02 (pull_request) Successful in 1m30s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m29s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m19s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m27s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m17s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m46s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m51s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m12s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m26s
to 460584e4a1
Some checks failed
Check meta / check_meta (pull_request) Successful in 18s
Check meta / check_dns (pull_request) Successful in 1m7s
build configuration / build_storage01 (pull_request) Successful in 1m29s
build configuration / build_compute01 (pull_request) Successful in 1m32s
build configuration / build_web02 (pull_request) Successful in 1m26s
build configuration / build_vault01 (pull_request) Successful in 1m32s
build configuration / build_rescue01 (pull_request) Successful in 1m20s
lint / check (pull_request) Successful in 25s
build configuration / build_web01 (pull_request) Successful in 2m4s
build configuration / build_geo02 (pull_request) Successful in 1m26s
build configuration / build_geo01 (pull_request) Successful in 1m26s
build configuration / build_bridge01 (pull_request) Successful in 1m13s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m37s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m29s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m26s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m22s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m13s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m12s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m56s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m12s
2024-08-28 19:29:41 +02:00
Compare
lbailly force-pushed ulogd from 460584e4a1
Some checks failed
Check meta / check_meta (pull_request) Successful in 18s
Check meta / check_dns (pull_request) Successful in 1m7s
build configuration / build_storage01 (pull_request) Successful in 1m29s
build configuration / build_compute01 (pull_request) Successful in 1m32s
build configuration / build_web02 (pull_request) Successful in 1m26s
build configuration / build_vault01 (pull_request) Successful in 1m32s
build configuration / build_rescue01 (pull_request) Successful in 1m20s
lint / check (pull_request) Successful in 25s
build configuration / build_web01 (pull_request) Successful in 2m4s
build configuration / build_geo02 (pull_request) Successful in 1m26s
build configuration / build_geo01 (pull_request) Successful in 1m26s
build configuration / build_bridge01 (pull_request) Successful in 1m13s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m37s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m29s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m26s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m22s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m13s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m12s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m56s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m12s
to a301fe0fd1
Some checks failed
Check meta / check_meta (pull_request) Successful in 28s
Check meta / check_dns (pull_request) Successful in 1m3s
build configuration / build_compute01 (pull_request) Successful in 1m44s
build configuration / build_storage01 (pull_request) Successful in 1m45s
build configuration / build_web02 (pull_request) Successful in 1m19s
build configuration / build_vault01 (pull_request) Successful in 1m47s
build configuration / build_web01 (pull_request) Successful in 2m13s
lint / check (pull_request) Successful in 29s
build configuration / build_rescue01 (pull_request) Successful in 1m23s
build configuration / build_geo01 (pull_request) Successful in 1m16s
build configuration / build_geo02 (pull_request) Successful in 1m17s
build configuration / build_bridge01 (pull_request) Successful in 1m18s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m28s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m28s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m23s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m22s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m25s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m52s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m15s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m19s
2024-08-28 20:34:30 +02:00
Compare
Author
Member

Normalement tout est bon dans la config now, il reste éventuellement à ajouter des stacks si les logs sont insufisant.

Normalement tout est bon dans la config now, il reste éventuellement à ajouter des stacks si les logs sont insufisant.
lbailly changed title from WIP: feat(ulogd): enabling ulogd to feat(ulogd): enabling ulogd 2024-08-28 20:41:47 +02:00
@ -0,0 +44,4 @@
};
systemd.services.postgresql = {
preStart = lib.mkAfter ''
if test -e "${config.services.postgresql.dataDir}/.first_startup"; then
Owner

Je ne pense pas que ça fasse ce que tu veux

Je ne pense pas que ça fasse ce que tu veux
Author
Member

Le but c'est que le script ne soit exec que quand le serveur s'initialise, il suppr toute les données.
Je peux pas utiliser .first_statup car il est suppr au tout début de postStart, ducoup je recréer le flag.

Le but c'est que le script ne soit exec que quand le serveur s'initialise, il suppr toute les données. Je peux pas utiliser .first_statup car il est suppr au tout début de postStart, ducoup je recréer le flag.
Owner

Mais en pratique ça ne tourne jamais donc je vois pas trop l'intérêt de le mettre

Mais en pratique ça ne tourne jamais donc je vois pas trop l'intérêt de le mettre
Author
Member

si on doit redéployer un routeur avec log, on aura le nécessaire dans le module sans avoir à recheck comment deploy ulogd, sinon le ensureUsers et ensureDatabases ne servent pas non plus...

si on doit redéployer un routeur avec log, on aura le nécessaire dans le module sans avoir à recheck comment deploy ulogd, sinon le `ensureUsers` et `ensureDatabases` ne servent pas non plus...
Author
Member

En vérité, il faudrait plutôt check l'existence des tables pour le cas où le module est déployé sur une machine qui a déjà un pgsql, mais bon...

En vérité, il faudrait plutôt check l'existence des tables pour le cas où le module est déployé sur une machine qui a déjà un pgsql, mais bon...
Owner

Oui, ou alors faire un preStart dans l'unit de ulogd en sauvegardant le state dans var/lib/ulogd, dans ce cas on pourra charger les tables lors de la première activation du module

Oui, ou alors faire un preStart dans l'unit de ulogd en sauvegardant le state dans `var/lib/ulogd`, dans ce cas on pourra charger les tables lors de la première activation du module
@ -0,0 +8,4 @@
services = {
ulogd = {
enable = true;
logLevel = 5;
Owner

Si ça fonctionne désormais ce n'est pas la peine d'activer les logs de debug, à part spammer journald

Si ça fonctionne désormais ce n'est pas la peine d'activer les logs de debug, à part spammer journald
Author
Member

D'après la doc, 5 correspond au niveau notice de log, 1 serai debug. Si tu veux on peut monter à 7 pour avoir que les erreurs.

D'après [la doc](https://search.nixos.org/options?channel=unstable&show=services.ulogd.logLevel), 5 correspond au niveau notice de log, 1 serai debug. Si tu veux on peut monter à 7 pour avoir que les erreurs.
lbailly force-pushed ulogd from a301fe0fd1
Some checks failed
Check meta / check_meta (pull_request) Successful in 28s
Check meta / check_dns (pull_request) Successful in 1m3s
build configuration / build_compute01 (pull_request) Successful in 1m44s
build configuration / build_storage01 (pull_request) Successful in 1m45s
build configuration / build_web02 (pull_request) Successful in 1m19s
build configuration / build_vault01 (pull_request) Successful in 1m47s
build configuration / build_web01 (pull_request) Successful in 2m13s
lint / check (pull_request) Successful in 29s
build configuration / build_rescue01 (pull_request) Successful in 1m23s
build configuration / build_geo01 (pull_request) Successful in 1m16s
build configuration / build_geo02 (pull_request) Successful in 1m17s
build configuration / build_bridge01 (pull_request) Successful in 1m18s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m28s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m28s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m23s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m22s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m25s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m52s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m15s
build configuration / push_to_cache_geo02 (pull_request) Failing after 1m19s
to f356f9fa4e
Some checks failed
Check meta / check_meta (pull_request) Successful in 29s
Check meta / check_dns (pull_request) Successful in 1m6s
build configuration / build_web02 (pull_request) Successful in 1m22s
build configuration / build_storage01 (pull_request) Successful in 1m54s
build configuration / build_rescue01 (pull_request) Successful in 1m18s
build configuration / build_geo01 (pull_request) Successful in 1m14s
build configuration / build_geo02 (pull_request) Successful in 1m15s
lint / check (pull_request) Successful in 25s
build configuration / build_bridge01 (pull_request) Successful in 1m17s
build configuration / push_to_cache_web02 (pull_request) Failing after 1m20s
build configuration / push_to_cache_storage01 (pull_request) Failing after 1m21s
build configuration / build_compute01 (pull_request) Successful in 5m3s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 1m22s
build configuration / build_vault01 (pull_request) Successful in 5m27s
build configuration / push_to_cache_geo01 (pull_request) Failing after 1m11s
build configuration / build_web01 (pull_request) Successful in 5m47s
build configuration / push_to_cache_compute01 (pull_request) Failing after 1m31s
build configuration / push_to_cache_geo02 (pull_request) Failing after 2m4s
build configuration / push_to_cache_bridge01 (pull_request) Failing after 1m54s
build configuration / push_to_cache_web01 (pull_request) Failing after 1m53s
2024-09-07 13:30:21 +02:00
Compare
rlahfa merged commit 3b766e6a2b into main 2024-09-08 12:21:08 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-12 15:01:17 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-13 14:57:26 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-14 14:59:08 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-15 14:59:12 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-16 14:58:59 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-17 14:59:10 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-18 14:58:20 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-19 14:58:07 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-20 15:00:09 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-21 14:58:58 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-22 14:57:31 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-23 14:58:40 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-24 14:58:15 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-25 14:58:10 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-26 14:58:20 +02:00
mdebray referenced this pull request from a commit 2025-06-26 15:13:29 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-27 14:57:55 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-28 14:59:06 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-29 14:59:08 +02:00
dgnum-chores referenced this pull request from a commit 2025-06-30 14:59:20 +02:00
dgnum-chores referenced this pull request from a commit 2025-07-01 14:59:02 +02:00
dgnum-chores referenced this pull request from a commit 2025-07-02 14:58:53 +02:00
dgnum-chores referenced this pull request from a commit 2025-07-03 14:59:04 +02:00
dgnum-chores referenced this pull request from a commit 2025-07-04 14:58:29 +02:00
dgnum-chores referenced this pull request from a commit 2025-07-05 14:58:44 +02:00
thubrecht referenced this pull request from a commit 2025-07-06 11:47:22 +02:00
Sign in to join this conversation.
No description provided.