Initial commit
This commit is contained in:
commit
72c9053f0d
7 changed files with 38 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use nix
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/run/
|
||||
.direnv/
|
||||
12
init.sh
Normal file
12
init.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#/bin/sh
|
||||
mkdir run && cp -r $GRAFANA_PATH/share/grafana/* run/
|
||||
mkdir run/prometheus
|
||||
cp prometheus.yml run/prometheus
|
||||
|
||||
cd run
|
||||
|
||||
nix-build "<nixpkgs>" -A grafana -o grafana
|
||||
nix-build "<nixpkgs>" -A prometheus -o prometheus/prometheus
|
||||
echo -n "enter new admin password: "
|
||||
read passwd
|
||||
./grafana/bin/grafana cli admin reset-admin-password "$passwd"
|
||||
8
prometheus.yml
Normal file
8
prometheus.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
scrape_configs:
|
||||
- job_name: bombai_git.tudbut.de
|
||||
metrics_path: /bombai/metrics
|
||||
scrape_interval: 1s
|
||||
scheme: https
|
||||
static_configs:
|
||||
- targets:
|
||||
- git.tudbut.de
|
||||
3
run_grafana.sh
Normal file
3
run_grafana.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#/bin/sh
|
||||
cd run
|
||||
./grafana/bin/grafana server
|
||||
3
run_prometheus.sh
Normal file
3
run_prometheus.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#/bin/sh
|
||||
cd run/prometheus
|
||||
./prometheus/bin/prometheus --web.listen-address=[::1]:9090
|
||||
9
shell.nix
Normal file
9
shell.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
grafana
|
||||
prometheus
|
||||
];
|
||||
GRAFANA_PATH = "${pkgs.grafana}";
|
||||
PROMETHEUS_PATH = "${pkgs.prometheus}";
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue