summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/elchos/stats.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-01-10 14:54:34 +0100
committerlassulus <lass@lassul.us>2017-01-10 14:54:34 +0100
commit131de9bbd174011e072b116792ce32d8591e7670 (patch)
tree2d4ebf7a19ce5eab911aea56cced0d18224f54bf /makefu/2configs/elchos/stats.nix
parent79cfd8b26f560e0d792a392efdcc7d7a9e1daf1e (diff)
parenta510069d86bd00d9ff348bdad321294cdf42dafb (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/elchos/stats.nix')
-rw-r--r--makefu/2configs/elchos/stats.nix67
1 files changed, 12 insertions, 55 deletions
diff --git a/makefu/2configs/elchos/stats.nix b/makefu/2configs/elchos/stats.nix
index feb8c5bae..2036b391f 100644
--- a/makefu/2configs/elchos/stats.nix
+++ b/makefu/2configs/elchos/stats.nix
@@ -7,6 +7,11 @@
with import <stockholm/lib>;
{
+ networking.firewall = {
+ allowedTCPPorts = [ 2003 80 443 18080 ];
+ allowedUDPPorts = [ 2003 ];
+ };
+
services.nginx = {
enable = mkDefault true;
virtualHosts = {
@@ -39,58 +44,11 @@ with import <stockholm/lib>;
};
services.graphite = {
- beacon = {
- enable = true;
- config = {
- graphite_url = "http://localhost:18080";
-
- no_data = "critical";
- loading_error = "normal";
-
- prefix = "[elchos]";
-
- cli = {
- command = ''${pkgs.irc-announce}/bin/irc-announce irc.freenode.org 6667 alert0r \#elchos ' [elchos] ''${level} ''${name} ''${value}' '';
- };
- #smtp = {
- # from = "beacon@mors.r";
- # to = [
- # "lass@mors.r"
- # ];
- #};
- normal_handlers = [
- # "smtp"
- "cli"
- ];
- warning_handlers = [
- # "smtp"
- "cli"
- ];
- critical_handlers = [
- # "smtp"
- "cli"
- ];
- alerts = let
- high-load = hostid: let
- host = "elch-${toString hostid}"; in {
- name = "high-cpu-load-${host}";
- query = "aliasByNode(perSecond(elchos.${host}.cpu.0.cpu.idle),1)";
- method = "average";
- interval = "1minute";
- logging = "info";
- repeat_interval = "5minute";
- rules = [
- # "warning: < 30.0"
- "critical: < 1.0"
- ];
- };
- in map high-load [ 1 2 3 4 5 6 7 8 ];
- };
- };
api = {
enable = true;
- package = pkgs.graphiteApi;
- listenAddress = "127.0.0.1";
+ # package = pkgs.graphiteApi;
+ #listenAddress = "127.0.0.1";
+ listenAddress = "0.0.0.0";
port = 18080;
};
carbon = {
@@ -99,8 +57,11 @@ with import <stockholm/lib>;
config = ''
[cache]
MAX_CACHE_SIZE = inf
- MAX_UPDATES_PER_SECOND = 10
+ MAX_UPDATES_PER_SECOND = 3
MAX_CREATES_PER_MINUTE = 5000
+ LOG_UPDATES = False
+ LOG_CACHE_HITS = False
+ LOG_CACHE_QUEUE_SORTS = False
'';
storageSchemas = ''
[carbon]
@@ -122,8 +83,4 @@ with import <stockholm/lib>;
};
};
- networking.firewall = {
- allowedTCPPorts = [ 2003 80 443 ];
- allowedUDPPorts = [ 2003 ];
- };
}