Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
148dc2a7
Commit
148dc2a7
authored
3 years ago
by
Tom Prince
Browse files
Options
Downloads
Patches
Plain Diff
Expose zkap-spending-service metrics.
parent
5bafeb63
No related branches found
Branches containing commit
No related tags found
2 merge requests
!228
merge develop into production
,
!184
Expose zkap-spending-service metrics.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
nixos/modules/spending.nix
+10
-0
10 additions, 0 deletions
nixos/modules/spending.nix
nixos/pkgs/zkap-spending-service/repo.json
+2
-2
2 additions, 2 deletions
nixos/pkgs/zkap-spending-service/repo.json
nixos/tests/spending.nix
+4
-0
4 additions, 0 deletions
nixos/tests/spending.nix
with
16 additions
and
2 deletions
nixos/modules/spending.nix
+
10
−
0
View file @
148dc2a7
...
@@ -127,6 +127,16 @@ in
...
@@ -127,6 +127,16 @@ in
# Want a regex instead? try locations."~ /v\d+/"
# Want a regex instead? try locations."~ /v\d+/"
proxyPass
=
"http://unix:
${
cfg
.
unixSocket
}
"
;
proxyPass
=
"http://unix:
${
cfg
.
unixSocket
}
"
;
};
};
locations
.
"/metrics"
=
{
proxyPass
=
"http://unix:
${
cfg
.
unixSocket
}
"
;
# Only allow our monitoringvpn subnet
extraConfig
=
''
allow 172.23.23.0/24;
allow 127.0.0.1;
allow ::1;
deny all;
''
;
};
locations
.
"/"
=
{
locations
.
"/"
=
{
# Return a 404 error for any paths not specified above.
# Return a 404 error for any paths not specified above.
extraConfig
=
''
extraConfig
=
''
...
...
This diff is collapsed.
Click to expand it.
nixos/pkgs/zkap-spending-service/repo.json
+
2
−
2
View file @
148dc2a7
{
{
"owner"
:
"privatestorage"
,
"owner"
:
"privatestorage"
,
"repo"
:
"zkap-spending-service"
,
"repo"
:
"zkap-spending-service"
,
"rev"
:
"
e0d63b79213d16f2de6629167ea8f1236ba22e
14"
,
"rev"
:
"
cbf7509f429ffd6e6cf37a73e4ff84a9c5ce1
14
1
"
,
"branch"
:
"main"
,
"branch"
:
"main"
,
"domain"
:
"whetstone.privatestorage.io"
,
"domain"
:
"whetstone.privatestorage.io"
,
"outputHash"
:
"
30abb0g9xxn4lp493kj5wmz8kj5q2iqvw40m8llqvb3zamx60gd8cy451ii7z15qbrbx9xmjdfw0k4gviij46fkx1s8nbich5c8qx57
"
,
"outputHash"
:
"
04g7pcykc2525cg3z7wg5834s7vqn82xaqjvf52l6dnxv3mb9xr93kk505dvxcwhgfbqpim5i479s9kqd8gi7q3lq5wn5fq7rf7lkrj
"
,
"outputHashAlgo"
:
"sha512"
"outputHashAlgo"
:
"sha512"
}
}
This diff is collapsed.
Click to expand it.
nixos/tests/spending.nix
+
4
−
0
View file @
148dc2a7
...
@@ -28,5 +28,9 @@
...
@@ -28,5 +28,9 @@
with subtest("Ensure that the spending service version matches the expected version"):
with subtest("Ensure that the spending service version matches the expected version"):
output = spending.succeed("
${
curl
}
http://localhost/v1/_version")
output = spending.succeed("
${
curl
}
http://localhost/v1/_version")
assert json.loads(output)["revision"] == "
${
revision
}
", "Spending service revision does not match."
assert json.loads(output)["revision"] == "
${
revision
}
", "Spending service revision does not match."
with subtest("Ensure that the spending service generates metrics"):
# TODO: We should pass "-H 'accept: application/openmetrics-text'" here.
# See https://github.com/prometheus/prometheus/issues/8932
output = spending.succeed("
${
curl
}
http://localhost/metrics |
${
pkgs
.
prometheus
}
/bin/promtool check metrics")
''
;
''
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment