New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/promscale: init #97372
nixos/promscale: init #97372
Conversation
c53f3cb
to
794ffe5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of the password issue!
I have taken the time to actually give this module a review now. I hope at least some of the comments are helpful.
''; | ||
}; | ||
|
||
db-connect-retries = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, purely a style thing, feel free to ignore 100% and then some but... I think most modules typically use a database.
prefix for database related options, something like
database = {
connect-retries = mkOption { ... };
host = mkOption { ... };
name = mkOption { ... };
};
Consistency is always nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm going to stray away from original commandline argument mapping, I'd first should get rid of web-listen-address and use listenAddress and listenPort instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review.
''; | ||
}; | ||
|
||
db-connect-retries = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm going to stray away from original commandline argument mapping, I'd first should get rid of web-listen-address and use listenAddress and listenPort instead.
Changes are looking good. I left a few minor comments. I should have asked before but made the assumption it cannot... so I'll ask now: can this program accept a configuration file instead of environment variables? |
2bd44f8
to
1071d7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Do we have any subject matter experts in the community that can give this a quick one over? From my perspective we're pretty much ready for a merge 👍
Thanks, MR is updated addressing your suggestions. I should also extend |
361e946
to
c395a6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me but you need someone who knows more about prometheus
to review this before merge please.
c395a6e
to
e066be5
Compare
I've updated again to reflect the project rename to promscale, depends on #99875. Thanks for your review. TIme to search for our prometheus experts. |
You might consider mentioning this on one of the discourse threads. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
e066be5
to
ff85bdd
Compare
# "-web-cors-origin example.com/public/.*" # corsOrigin:0xc00016dea0 | ||
]; | ||
services.postgresql = { | ||
authentication = pkgs.lib.mkOverride 10 '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably get rid of this by using /run/postgresql/
as "host" in this test. By default postgresql uses the unix user that connects (on NixOS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to work without authentication
set and db-host = "/run/postgresql/";
.
Seems with these settings promscale is started before postgres is up.
Currently with promscale 0.1.1 (#102013) the test breaks, because of postgres version mismatch.
|
On 15:52 29.10.20, 0x4A6F wrote:
@0x4A6F commented on this pull request.
Doesn't seem to work without `authentication` set and `db-host = "/run/postgresql/";`.
Seems with these settings promscale is started before postgres is up.
I got it working while trying to deploy it to a server. Unfortunately I
didn't continue that route as it was insisting on being superuser on my
postgres server.
|
I marked this as stale due to inactivity. → More info |
@0x4A6F I am taking a look at using this with the latest version of promscale. Are you interested in continuing work on this change? I could support you in getting it merged if so. |
@JamesGuthrie Yes, but last time I looked at it P.S.: We can move to chat. My contact details are in |
This looks possible now, as of 2.5.0 timescaledb supports PostgreSQL 14 and promscale 0.7.0 adds support. I've gotten this working in my flake - https://github.com/benpye/nix-config/blob/main/modules/services/promscale.nix . Do you want to try and update this PR or are you happy if I try and submit my version? Next on my list is to try and get the promscale extension building too. |
Deprecated upstream. |
Motivation for this change
Enable service for timescale-prometheus.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)