summaryrefslogtreecommitdiffstats
path: root/krebs/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs')
-rw-r--r--krebs/2configs/shack/graphite.nix (renamed from krebs/2configs/graphite.nix)20
-rw-r--r--krebs/2configs/shack/influx.nix18
2 files changed, 31 insertions, 7 deletions
diff --git a/krebs/2configs/graphite.nix b/krebs/2configs/shack/graphite.nix
index 64222e43..1c8ec6a8 100644
--- a/krebs/2configs/graphite.nix
+++ b/krebs/2configs/shack/graphite.nix
@@ -1,16 +1,22 @@
{ config, lib, pkgs, ... }:
+# hostname: graphite.shack
+
# graphite-web on port 8080
# carbon cache on port 2003 (tcp/udp)
-
-# TODO: krebs.graphite.minimal.enable
-# TODO: configure firewall
-with import <stockholm/lib>;
-{
- imports = [ ];
-
+let
+ port = 8080;
+in {
+ networking.firewall.allowedTCPPorts = [ 2003 port ];
+ networking.firewall.allowedUDPPorts = [ 2003 ];
+ services.nginx.virtualHosts."graphite.shack" = {
+ locations."/" = {
+ proxyPass = "http://localhost:${toString port}/";
+ };
+ };
services.graphite = {
api = {
+ inherit port;
enable = true;
listenAddress = "0.0.0.0";
};
diff --git a/krebs/2configs/shack/influx.nix b/krebs/2configs/shack/influx.nix
new file mode 100644
index 00000000..599416c9
--- /dev/null
+++ b/krebs/2configs/shack/influx.nix
@@ -0,0 +1,18 @@
+let
+ port = 8086;
+in
+{
+ networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
+ services.nginx.virtualHosts."influx.shack" = {
+ locations."/" = {
+ proxyPass = "http://localhost:${toString port}/";
+ };
+ };
+ services.influxdb = {
+ enable = true;
+ extraConfig = {
+ bind-address = ":${toString port}";
+ http.log-enabled = false;
+ };
+ };
+}