Compare commits
5
Commits
8bc1e6011f
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2882960a8e | ||
|
|
bdf67e96f0 | ||
|
|
d95b8b99ce | ||
|
|
7e6908ef3d | ||
|
|
dd51e89abf |
@@ -19,5 +19,5 @@ jobs:
|
|||||||
python -m python.gitea_flake_lock merge
|
python -m python.gitea_flake_lock merge
|
||||||
--repo "${{ github.repository }}"
|
--repo "${{ github.repository }}"
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
|
||||||
GITEA_URL: https://gitea.tmmworkshop.com
|
GITEA_URL: https://gitea.tmmworkshop.com
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
run: nix flake update
|
run: nix flake update
|
||||||
- name: Create or update flake.lock PR
|
- name: Create or update flake.lock PR
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
|
||||||
GITEA_URL: https://gitea.tmmworkshop.com
|
GITEA_URL: https://gitea.tmmworkshop.com
|
||||||
run: >-
|
run: >-
|
||||||
nix develop .#devShells.x86_64-linux.default -c
|
nix develop .#devShells.x86_64-linux.default -c
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
monitoringInterface = "ztwfunumly";
|
monitoringInterface = "tailscale0";
|
||||||
nodeTextfileDir = "/var/lib/prometheus-node-exporter-textfile";
|
nodeTextfileDir = "/var/lib/prometheus-node-exporter-textfile";
|
||||||
|
|
||||||
mkProcessNameTemplate =
|
mkProcessNameTemplate =
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class RerankConfig(BaseSettings):
|
|||||||
model_config = SettingsConfigDict(env_prefix="EBOOK_SEARCH_RERANK_", frozen=True, protected_namespaces=())
|
model_config = SettingsConfigDict(env_prefix="EBOOK_SEARCH_RERANK_", frozen=True, protected_namespaces=())
|
||||||
|
|
||||||
enabled: bool = True
|
enabled: bool = True
|
||||||
base_url: str = "http://192.168.90.25:8001"
|
base_url: str = "http://bob:8001"
|
||||||
model: str = "qwen3-reranker-06b"
|
model: str = "qwen3-reranker-06b"
|
||||||
candidates: int = 24
|
candidates: int = 24
|
||||||
timeout_seconds: float = 30.0
|
timeout_seconds: float = 30.0
|
||||||
@@ -67,7 +67,7 @@ class EbookSearchConfig(BaseSettings):
|
|||||||
)
|
)
|
||||||
chat_model: str = "deepseek-v4-flash"
|
chat_model: str = "deepseek-v4-flash"
|
||||||
answer_enabled: bool = True
|
answer_enabled: bool = True
|
||||||
embedding_base_url: str = "http://192.168.90.25:8000/v1"
|
embedding_base_url: str = "http://bob:8000/v1"
|
||||||
embedding_api_key: str = "not-needed"
|
embedding_api_key: str = "not-needed"
|
||||||
embedding_model: str = "qwen3-embedding-0.6b"
|
embedding_model: str = "qwen3-embedding-0.6b"
|
||||||
embedding_batch_size: int = 32
|
embedding_batch_size: int = 32
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "${EBOOK_SEARCH_PORT:-8070}:8070"
|
- "${EBOOK_SEARCH_PORT:-8070}:8070"
|
||||||
extra_hosts:
|
|
||||||
- "jeeves:192.168.90.40"
|
|
||||||
env_file:
|
env_file:
|
||||||
- ../../../.env
|
- ../../../.env
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -84,13 +84,13 @@ def push_branch(*, branch: str) -> None:
|
|||||||
run_cmd(["git", "push", "origin", f"HEAD:{branch}", "--force"])
|
run_cmd(["git", "push", "origin", f"HEAD:{branch}", "--force"])
|
||||||
|
|
||||||
|
|
||||||
def _required_gitea_token() -> str:
|
def _required_jeeves_bot_token() -> str:
|
||||||
"""Read the required Gitea token from the environment."""
|
"""Read the required Gitea token from the environment."""
|
||||||
token = getenv("GITEA_TOKEN")
|
token = getenv("JEEVES_BOT_TOKEN")
|
||||||
if token:
|
if token:
|
||||||
return token
|
return token
|
||||||
|
|
||||||
msg = "GITEA_TOKEN environment variable is required"
|
msg = "JEEVES_BOT_TOKEN environment variable is required"
|
||||||
raise RuntimeError(msg)
|
raise RuntimeError(msg)
|
||||||
|
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ def update(
|
|||||||
owner, repo_name = split_repo_name(repo)
|
owner, repo_name = split_repo_name(repo)
|
||||||
with GiteaClient(
|
with GiteaClient(
|
||||||
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
|
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
|
||||||
token=_required_gitea_token(),
|
token=_required_jeeves_bot_token(),
|
||||||
) as client:
|
) as client:
|
||||||
pull_request = ensure_flake_lock_pull_request(
|
pull_request = ensure_flake_lock_pull_request(
|
||||||
client,
|
client,
|
||||||
@@ -134,7 +134,7 @@ def merge(
|
|||||||
owner, repo_name = split_repo_name(repo)
|
owner, repo_name = split_repo_name(repo)
|
||||||
with GiteaClient(
|
with GiteaClient(
|
||||||
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
|
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
|
||||||
token=_required_gitea_token(),
|
token=_required_jeeves_bot_token(),
|
||||||
) as client:
|
) as client:
|
||||||
pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name)
|
pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name)
|
||||||
if not pull_request:
|
if not pull_request:
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
esphome = {
|
esphome = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
address = "192.168.90.35";
|
address = "0.0.0.0";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
local all richie trust
|
local all richie trust
|
||||||
host all richie 127.0.0.1/32 trust
|
host all richie 127.0.0.1/32 trust
|
||||||
host all richie ::1/128 trust
|
host all richie ::1/128 trust
|
||||||
host all richie 192.168.90.1/24 trust
|
host all richie 100.64.0.0/10 trust
|
||||||
host all richie 192.168.99.1/24 trust
|
host all richie 192.168.99.1/24 trust
|
||||||
|
|
||||||
local vaninventory vaninventory trust
|
local vaninventory vaninventory trust
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
local hass hass trust
|
local hass hass trust
|
||||||
|
|
||||||
# ipv4
|
# ipv4
|
||||||
host hass hass 192.168.90.1/24 trust
|
host hass hass 100.64.0.0/10 trust
|
||||||
host hass hass 127.0.0.1/32 trust
|
host hass hass 127.0.0.1/32 trust
|
||||||
|
|
||||||
# ipv6
|
# ipv6
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
overrideFolders = false;
|
overrideFolders = false;
|
||||||
guiAddress = "192.168.90.35:8384";
|
guiAddress = "0.0.0.0:8384";
|
||||||
settings = {
|
settings = {
|
||||||
"dotfiles" = {
|
"dotfiles" = {
|
||||||
path = "/home/richie/dotfiles";
|
path = "/home/richie/dotfiles";
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Monitoring
|
||||||
|
|
||||||
|
## Vultr API metrics
|
||||||
|
|
||||||
|
The `vultr-exporter` service reads its API token from:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/zfs/storage/secrets/services/vultr-exporter
|
||||||
|
```
|
||||||
|
|
||||||
|
Create the file on Jeeves as root with the following contents:
|
||||||
|
|
||||||
|
```text
|
||||||
|
API_KEY=<Vultr API token>
|
||||||
|
```
|
||||||
|
|
||||||
|
The token needs read access to the Vultr Account and Billing APIs. Unrelated
|
||||||
|
resource collectors are disabled in the packaged exporter.
|
||||||
|
|
||||||
|
Restrict the file to root and ensure the public egress IP used by Jeeves is
|
||||||
|
allowed for the token in the Vultr API settings:
|
||||||
|
|
||||||
|
```console
|
||||||
|
sudo chown root:root /zfs/storage/secrets/services/vultr-exporter
|
||||||
|
sudo chmod 600 /zfs/storage/secrets/services/vultr-exporter
|
||||||
|
```
|
||||||
|
|
||||||
|
The exporter listens on `127.0.0.1:9188`; it is scraped by the local
|
||||||
|
`prometheus-main` service every five minutes and is not exposed through the
|
||||||
|
host firewall.
|
||||||
|
|
||||||
|
Portal-1 exposes its node exporter only through `tailscale0` on port `9100`.
|
||||||
|
Jeeves reaches it using the Portal-1 Tailscale hostname.
|
||||||
@@ -0,0 +1,798 @@
|
|||||||
|
{
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": {
|
||||||
|
"type": "grafana",
|
||||||
|
"uid": "-- Grafana --"
|
||||||
|
},
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"editable": false,
|
||||||
|
"fiscalYearStartMonth": 0,
|
||||||
|
"graphTooltip": 1,
|
||||||
|
"links": [],
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "short",
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"0": {
|
||||||
|
"color": "red",
|
||||||
|
"index": 1,
|
||||||
|
"text": "Offline"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"color": "green",
|
||||||
|
"index": 0,
|
||||||
|
"text": "Online"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 4,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 1,
|
||||||
|
"options": {
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "auto",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"textMode": "auto",
|
||||||
|
"wideLayout": true
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "up{job=\"node\",instance=\"portal-1\"}",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "",
|
||||||
|
"range": false,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Node Exporter",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "percent",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 5,
|
||||||
|
"x": 4,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 2,
|
||||||
|
"options": {
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "auto",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"textMode": "auto",
|
||||||
|
"wideLayout": true
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "100 * (1 - avg(rate(node_cpu_seconds_total{job=\"node\",instance=\"portal-1\",mode=\"idle\"}[5m])))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "",
|
||||||
|
"range": false,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "CPU Used",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "percent",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 5,
|
||||||
|
"x": 9,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 3,
|
||||||
|
"options": {
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "auto",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"textMode": "auto",
|
||||||
|
"wideLayout": true
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "100 * (1 - (node_memory_MemAvailable_bytes{job=\"node\",instance=\"portal-1\"} / node_memory_MemTotal_bytes{job=\"node\",instance=\"portal-1\"}))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "",
|
||||||
|
"range": false,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "RAM Used",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "percent",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 5,
|
||||||
|
"x": 14,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 4,
|
||||||
|
"options": {
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "auto",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"textMode": "auto",
|
||||||
|
"wideLayout": true
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "100 * (1 - (node_filesystem_avail_bytes{job=\"node\",instance=\"portal-1\",mountpoint=\"/\",fstype!=\"\"} / node_filesystem_size_bytes{job=\"node\",instance=\"portal-1\",mountpoint=\"/\",fstype!=\"\"}))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "",
|
||||||
|
"range": false,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Root Filesystem Used",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 5,
|
||||||
|
"x": 19,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 5,
|
||||||
|
"options": {
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "auto",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"textMode": "auto",
|
||||||
|
"wideLayout": true
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "node_load1{job=\"node\",instance=\"portal-1\"}",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "",
|
||||||
|
"range": false,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Load (1m)",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "percent",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"id": 6,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "multi",
|
||||||
|
"sort": "desc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "100 * (1 - avg(rate(node_cpu_seconds_total{job=\"node\",instance=\"portal-1\",mode=\"idle\"}[5m])))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "CPU used",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "CPU Usage",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "percent",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"id": 7,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "multi",
|
||||||
|
"sort": "desc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "100 * (1 - (node_memory_MemAvailable_bytes{job=\"node\",instance=\"portal-1\"} / node_memory_MemTotal_bytes{job=\"node\",instance=\"portal-1\"}))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "RAM used",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "RAM Usage",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "percent",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 13
|
||||||
|
},
|
||||||
|
"id": 8,
|
||||||
|
"options": {
|
||||||
|
"cellHeight": "sm",
|
||||||
|
"showHeader": true,
|
||||||
|
"sortBy": [
|
||||||
|
{
|
||||||
|
"desc": true,
|
||||||
|
"displayName": "Value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "100 * (1 - (node_filesystem_avail_bytes{job=\"node\",instance=\"portal-1\",fstype!~\"tmpfs|devtmpfs|overlay|squashfs\",mountpoint!~\"/run.*\"} / node_filesystem_size_bytes{job=\"node\",instance=\"portal-1\",fstype!~\"tmpfs|devtmpfs|overlay|squashfs\",mountpoint!~\"/run.*\"}))",
|
||||||
|
"format": "table",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "{{mountpoint}}",
|
||||||
|
"range": false,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Filesystem Usage",
|
||||||
|
"type": "table"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "Bps"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 13
|
||||||
|
},
|
||||||
|
"id": 9,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "multi",
|
||||||
|
"sort": "desc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum(rate(node_disk_read_bytes_total{job=\"node\",instance=\"portal-1\",device!~\"loop.*|ram.*|fd.*\"}[5m]))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "read",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum(rate(node_disk_written_bytes_total{job=\"node\",instance=\"portal-1\",device!~\"loop.*|ram.*|fd.*\"}[5m]))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "write",
|
||||||
|
"range": true,
|
||||||
|
"refId": "B"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Disk Throughput",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "iops"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 21
|
||||||
|
},
|
||||||
|
"id": 10,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "multi",
|
||||||
|
"sort": "desc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum(rate(node_disk_reads_completed_total{job=\"node\",instance=\"portal-1\",device!~\"loop.*|ram.*|fd.*\"}[5m]))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "reads",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum(rate(node_disk_writes_completed_total{job=\"node\",instance=\"portal-1\",device!~\"loop.*|ram.*|fd.*\"}[5m]))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "writes",
|
||||||
|
"range": true,
|
||||||
|
"refId": "B"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Disk Operations",
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"unit": "Bps"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 21
|
||||||
|
},
|
||||||
|
"id": 11,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "multi",
|
||||||
|
"sort": "desc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum(rate(node_network_receive_bytes_total{job=\"node\",instance=\"portal-1\",device!=\"lo\"}[5m]))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "received",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prom-main"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"expr": "sum(rate(node_network_transmit_bytes_total{job=\"node\",instance=\"portal-1\",device!=\"lo\"}[5m]))",
|
||||||
|
"instant": false,
|
||||||
|
"legendFormat": "sent",
|
||||||
|
"range": true,
|
||||||
|
"refId": "B"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Network Traffic",
|
||||||
|
"type": "timeseries"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refresh": "30s",
|
||||||
|
"schemaVersion": 39,
|
||||||
|
"tags": [
|
||||||
|
"monitoring",
|
||||||
|
"portal-1",
|
||||||
|
"vultr"
|
||||||
|
],
|
||||||
|
"templating": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-24h",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {},
|
||||||
|
"timezone": "browser",
|
||||||
|
"title": "Portal-1 Host",
|
||||||
|
"uid": "portal-1-host",
|
||||||
|
"version": 1,
|
||||||
|
"weekStart": ""
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -41,29 +41,36 @@ let
|
|||||||
{
|
{
|
||||||
job_name = "node";
|
job_name = "node";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
(mkTarget "jeeves" "192.168.90.40:9100")
|
(mkTarget "jeeves" "jeeves.taile39c31.ts.net:9100")
|
||||||
(mkTarget "bob" "192.168.90.25:9100")
|
(mkTarget "bob" "bob.taile39c31.ts.net:9100")
|
||||||
|
(mkTarget "portal-1" "portal-1.taile39c31.ts.net:9100")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
job_name = "vultr";
|
||||||
|
scrape_interval = "5m";
|
||||||
|
scrape_timeout = "45s";
|
||||||
|
static_configs = [ (mkTarget "vultr" "127.0.0.1:9188") ];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
job_name = "process_grouped";
|
job_name = "process_grouped";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
(mkTarget "jeeves" "192.168.90.40:9256")
|
(mkTarget "jeeves" "jeeves.taile39c31.ts.net:9256")
|
||||||
(mkTarget "bob" "192.168.90.25:9256")
|
(mkTarget "bob" "bob.taile39c31.ts.net:9256")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
job_name = "smartctl";
|
job_name = "smartctl";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
(mkTarget "jeeves" "192.168.90.40:9633")
|
(mkTarget "jeeves" "jeeves.taile39c31.ts.net:9633")
|
||||||
(mkTarget "bob" "192.168.90.25:9633")
|
(mkTarget "bob" "bob.taile39c31.ts.net:9633")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
job_name = "zfs";
|
job_name = "zfs";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
(mkTarget "jeeves" "192.168.90.40:9134")
|
(mkTarget "jeeves" "jeeves.taile39c31.ts.net:9134")
|
||||||
(mkTarget "bob" "192.168.90.25:9134")
|
(mkTarget "bob" "bob.taile39c31.ts.net:9134")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -79,8 +86,8 @@ let
|
|||||||
{
|
{
|
||||||
job_name = "process_pid";
|
job_name = "process_pid";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
(mkTarget "jeeves" "192.168.90.40:9257")
|
(mkTarget "jeeves" "jeeves.taile39c31.ts.net:9257")
|
||||||
(mkTarget "bob" "192.168.90.25:9257")
|
(mkTarget "bob" "bob.taile39c31.ts.net:9257")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -97,7 +104,9 @@ let
|
|||||||
after = [
|
after = [
|
||||||
"zfs-media-database-prometheus.mount"
|
"zfs-media-database-prometheus.mount"
|
||||||
"network.target"
|
"network.target"
|
||||||
|
"tailscaled-autoconnect.service"
|
||||||
];
|
];
|
||||||
|
wants = [ "tailscaled-autoconnect.service" ];
|
||||||
requires = [ "zfs-media-database-prometheus.mount" ];
|
requires = [ "zfs-media-database-prometheus.mount" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
unitConfig.RequiresMountsFor = [ dataDir ];
|
unitConfig.RequiresMountsFor = [ dataDir ];
|
||||||
@@ -151,6 +160,8 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [ ./vultr-exporter.nix ];
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
groups.prometheus = { };
|
groups.prometheus = { };
|
||||||
users.prometheus = {
|
users.prometheus = {
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
|
||||||
|
vultrExporter = pkgs.buildGoModule rec {
|
||||||
|
pname = "vultr-exporter";
|
||||||
|
version = "0-unstable-2025-10-14";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "DazWilkin";
|
||||||
|
repo = "vultr-exporter";
|
||||||
|
rev = "d8b5d7107c2eda31566e6e895c8a67db32fdaf68";
|
||||||
|
hash = "sha256-3LpXh+mFMBRJfiY2ftELpM3AIE0LiZ9c6NFok0OeH5I=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-qCHWmg6GxLIjqlf5UqRcuDRd1xqRFI3sl4ZduLajx+Y=";
|
||||||
|
subPackages = [ "cmd/server" ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace cmd/server/main.go \
|
||||||
|
--replace-fail 'registry.MustRegister(collector.NewBlockStorageCollector(s, client, log))' "" \
|
||||||
|
--replace-fail 'registry.MustRegister(collector.NewKubernetesCollector(s, client, log))' "" \
|
||||||
|
--replace-fail 'registry.MustRegister(collector.NewLoadBalancerCollector(s, client, log))' "" \
|
||||||
|
--replace-fail 'registry.MustRegister(collector.NewReservedIPsCollector(s, client, log))' ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X main.GitCommit=${src.rev}"
|
||||||
|
"-X main.OSVersion=NixOS"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/bin/server $out/bin/vultr-exporter
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Prometheus exporter for Vultr account, billing, and bandwidth metrics";
|
||||||
|
homepage = "https://github.com/DazWilkin/vultr-exporter";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
mainProgram = "vultr-exporter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.services.vultr-exporter = {
|
||||||
|
description = "Vultr Prometheus exporter";
|
||||||
|
documentation = [ "https://github.com/DazWilkin/vultr-exporter" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${lib.getExe vultrExporter} --endpoint=127.0.0.1:9188 --path=/metrics";
|
||||||
|
EnvironmentFile = "${vars.secrets}/services/vultr-exporter";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "30s";
|
||||||
|
|
||||||
|
CapabilityBoundingSet = [ "" ];
|
||||||
|
DeviceAllow = [ "" ];
|
||||||
|
DynamicUser = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
RemoveIPC = true;
|
||||||
|
RestrictAddressFamilies = [
|
||||||
|
"AF_INET"
|
||||||
|
"AF_INET6"
|
||||||
|
];
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = [
|
||||||
|
"@system-service"
|
||||||
|
"~@privileged"
|
||||||
|
];
|
||||||
|
UMask = "0077";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,8 +2,6 @@ let
|
|||||||
vars = import ../vars.nix;
|
vars = import ../vars.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
appName = "TMM Workshop";
|
appName = "TMM Workshop";
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ in
|
|||||||
secret_key = "$__file{${vars.secrets}/services/grafana/secret_key}";
|
secret_key = "$__file{${vars.secrets}/services/grafana/secret_key}";
|
||||||
};
|
};
|
||||||
server = {
|
server = {
|
||||||
http_addr = "192.168.90.40";
|
http_addr = "0.0.0.0";
|
||||||
http_port = 3000;
|
http_port = 3000;
|
||||||
root_url = "http://192.168.90.40:3000/";
|
root_url = "http://jeeves:3000/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
provision = {
|
provision = {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ in
|
|||||||
local all richie trust
|
local all richie trust
|
||||||
host all richie 127.0.0.1/32 trust
|
host all richie 127.0.0.1/32 trust
|
||||||
host all richie ::1/128 trust
|
host all richie ::1/128 trust
|
||||||
host all richie 192.168.90.1/24 trust
|
host all richie 100.64.0.0/10 trust
|
||||||
host all richie 192.168.99.1/24 trust
|
host all richie 192.168.99.1/24 trust
|
||||||
host all richie 172.16.0.0/12 trust
|
host all richie 172.16.0.0/12 trust
|
||||||
|
|
||||||
@@ -40,12 +40,12 @@ in
|
|||||||
local postgres math trust
|
local postgres math trust
|
||||||
host postgres math 127.0.0.1/32 trust
|
host postgres math 127.0.0.1/32 trust
|
||||||
host postgres math ::1/128 trust
|
host postgres math ::1/128 trust
|
||||||
host postgres math 192.168.90.1/24 trust
|
host postgres math 100.64.0.0/10 trust
|
||||||
|
|
||||||
local data_science_dev math trust
|
local data_science_dev math trust
|
||||||
host data_science_dev math 127.0.0.1/32 trust
|
host data_science_dev math 127.0.0.1/32 trust
|
||||||
host data_science_dev math ::1/128 trust
|
host data_science_dev math ::1/128 trust
|
||||||
host data_science_dev math 192.168.90.1/24 trust
|
host data_science_dev math 100.64.0.0/10 trust
|
||||||
'';
|
'';
|
||||||
|
|
||||||
identMap = ''
|
identMap = ''
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ in
|
|||||||
message-level = 3;
|
message-level = 3;
|
||||||
peer-port = 51413;
|
peer-port = 51413;
|
||||||
rpc-bind-address = "0.0.0.0";
|
rpc-bind-address = "0.0.0.0";
|
||||||
rpc-host-whitelist = "127.0.0.1,192.168.90.40";
|
rpc-host-whitelist = "127.0.0.1,jeeves,jeeves.taile39c31.ts.net";
|
||||||
rpc-host-whitelist-enabled = true;
|
rpc-host-whitelist-enabled = true;
|
||||||
rpc-port = 9091;
|
rpc-port = 9091;
|
||||||
rpc-whitelist-enabled = true;
|
rpc-whitelist-enabled = true;
|
||||||
rpc-whitelist = "127.0.0.1,192.168.90.49";
|
rpc-whitelist = "127.0.0.1,100.*.*.*";
|
||||||
seed-queue-enabled = false;
|
seed-queue-enabled = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ in
|
|||||||
{
|
{
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
overrideFolders = false;
|
overrideFolders = false;
|
||||||
guiAddress = "192.168.90.40:8384";
|
guiAddress = "0.0.0.0:8384";
|
||||||
settings = {
|
settings = {
|
||||||
devices.davids-server.id = "7GXTDGR-AOXFW2O-K6J7NM3-XYZNRRW-AKHAFWM-GBOWUPQ-OA6JIWD-ER7RDQL"; # cspell:disable-line
|
devices.davids-server.id = "7GXTDGR-AOXFW2O-K6J7NM3-XYZNRRW-AKHAFWM-GBOWUPQ-OA6JIWD-ER7RDQL"; # cspell:disable-line
|
||||||
folders = {
|
folders = {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"${inputs.self}/common/optional/tailscale.nix"
|
"${inputs.self}/common/optional/tailscale.nix"
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
./haproxy
|
./haproxy
|
||||||
|
./monitoring.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ defaults
|
|||||||
|
|
||||||
#Application Setup
|
#Application Setup
|
||||||
frontend ContentSwitching
|
frontend ContentSwitching
|
||||||
bind *:80 v4v6
|
bind [::]:80 v4v6
|
||||||
bind *:443 v4v6 ssl crt /var/lib/acme/audiobookshelf.tmmworkshop.com/full.pem crt /var/lib/acme/cache.tmmworkshop.com/full.pem crt /var/lib/acme/gems.tmmworkshop.com/full.pem crt /var/lib/acme/jellyfin.tmmworkshop.com/full.pem crt /var/lib/acme/share.tmmworkshop.com/full.pem crt /var/lib/acme/gitea.tmmworkshop.com/full.pem crt /var/lib/acme/www.norn-sight.com/full.pem
|
bind [::]:443 v4v6 ssl crt /var/lib/acme/audiobookshelf.tmmworkshop.com/full.pem crt /var/lib/acme/cache.tmmworkshop.com/full.pem crt /var/lib/acme/gems.tmmworkshop.com/full.pem crt /var/lib/acme/jellyfin.tmmworkshop.com/full.pem crt /var/lib/acme/share.tmmworkshop.com/full.pem crt /var/lib/acme/gitea.tmmworkshop.com/full.pem crt /var/lib/acme/www.norn-sight.com/full.pem
|
||||||
mode http
|
mode http
|
||||||
|
|
||||||
# ACME challenge routing (must be first)
|
# ACME challenge routing (must be first)
|
||||||
@@ -113,7 +113,7 @@ frontend ContentSwitching
|
|||||||
# Proxy Gitea's built-in SSH server over Tailscale to Jeeves. Port 22 remains
|
# Proxy Gitea's built-in SSH server over Tailscale to Jeeves. Port 22 remains
|
||||||
# available to Endlessh on Portal.
|
# available to Endlessh on Portal.
|
||||||
frontend GiteaSSH
|
frontend GiteaSSH
|
||||||
bind *:2223 v4v6
|
bind [::]:2223 v4v6
|
||||||
mode tcp
|
mode tcp
|
||||||
option tcplog
|
option tcplog
|
||||||
default_backend gitea_ssh
|
default_backend gitea_ssh
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
networking.firewall.interfaces.tailscale0.allowedTCPPorts = [
|
||||||
|
config.services.prometheus.exporters.node.port
|
||||||
|
];
|
||||||
|
|
||||||
|
services.prometheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = [
|
||||||
|
"pressure"
|
||||||
|
"processes"
|
||||||
|
"systemd"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -51,7 +51,7 @@ def test_config_defaults_enable_reranking(mocker: MockerFixture) -> None:
|
|||||||
config = load_rerank_config()
|
config = load_rerank_config()
|
||||||
|
|
||||||
assert config.enabled is True
|
assert config.enabled is True
|
||||||
assert config.base_url == "http://192.168.90.25:8001"
|
assert config.base_url == "http://bob:8001"
|
||||||
assert config.model == "qwen3-reranker-06b"
|
assert config.model == "qwen3-reranker-06b"
|
||||||
assert config.candidates == 24
|
assert config.candidates == 24
|
||||||
assert config.timeout_seconds == 30
|
assert config.timeout_seconds == 30
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
"sqltools.connections": [
|
"sqltools.connections": [
|
||||||
{
|
{
|
||||||
"previewLimit": 50,
|
"previewLimit": 50,
|
||||||
"server": "192.168.90.40",
|
"server": "jeeves.taile39c31.ts.net",
|
||||||
"port": 5432,
|
"port": 5432,
|
||||||
"askForPassword": true,
|
"askForPassword": true,
|
||||||
"driver": "PostgreSQL",
|
"driver": "PostgreSQL",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
enableDefaultConfig = false;
|
enableDefaultConfig = false;
|
||||||
settings = {
|
settings = {
|
||||||
jeeves = {
|
jeeves = {
|
||||||
HostName = "192.168.90.40";
|
HostName = "jeeves";
|
||||||
User = "richie";
|
User = "richie";
|
||||||
IdentityFile = "~/.ssh/id_ed25519";
|
IdentityFile = "~/.ssh/id_ed25519";
|
||||||
Port = 629;
|
Port = 629;
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
Port = 2222;
|
Port = 2222;
|
||||||
};
|
};
|
||||||
brain = {
|
brain = {
|
||||||
HostName = "192.168.90.35";
|
HostName = "brain";
|
||||||
User = "richie";
|
User = "richie";
|
||||||
IdentityFile = "~/.ssh/id_ed25519";
|
IdentityFile = "~/.ssh/id_ed25519";
|
||||||
Port = 129;
|
Port = 129;
|
||||||
@@ -31,14 +31,14 @@
|
|||||||
Port = 2222;
|
Port = 2222;
|
||||||
};
|
};
|
||||||
bob = {
|
bob = {
|
||||||
HostName = "192.168.90.25";
|
HostName = "bob";
|
||||||
User = "richie";
|
User = "richie";
|
||||||
IdentityFile = "~/.ssh/id_ed25519";
|
IdentityFile = "~/.ssh/id_ed25519";
|
||||||
Port = 262;
|
Port = 262;
|
||||||
DynamicForward = [ { port = 9050; } ];
|
DynamicForward = [ { port = 9050; } ];
|
||||||
};
|
};
|
||||||
rhapsody-in-green = {
|
rhapsody-in-green = {
|
||||||
HostName = "192.168.90.221";
|
HostName = "rhapsody-in-green";
|
||||||
User = "richie";
|
User = "richie";
|
||||||
IdentityFile = "~/.ssh/id_ed25519";
|
IdentityFile = "~/.ssh/id_ed25519";
|
||||||
Port = 922;
|
Port = 922;
|
||||||
|
|||||||
Reference in New Issue
Block a user