alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
machines icars: cleanup config
author
lassulus
date
2 years ago
(Mar 19, 2024, 9:52 AM CET)
commit
5ce8c92c
5ce8c92c91089f3cd5a04ca539a82aa8ca3bb371
parent
02d2b389
02d2b3897c091b19f6b9643e079cfa863a9ad3b9
-183
1 changed file
Expand all
Collapse all
Unified
Split
machines
icarus
config.nix
-183
machines/icarus/config.nix
View file
Reviewed
···
19
19
../../2configs/ipfs.nix
20
20
../../2configs/snapclient.nix
21
21
../../2configs/consul.nix
22
22
-
{ # === logging playground ===
23
23
-
# --- client ---
24
24
-
25
25
-
# services.fluentd = {
26
26
-
# enable = true;
27
27
-
# config = ''
28
28
-
# '';
29
29
-
# };
30
30
-
31
31
-
# services.netdata = {
32
32
-
# enable = true;
33
33
-
# config = {
34
34
-
# global = {
35
35
-
# "debug log" = "syslog";
36
36
-
# "error log" = "syslog";
37
37
-
# };
38
38
-
39
39
-
# backend = {
40
40
-
# enabled = "yes";
41
41
-
# type = "opentsdb";
42
42
-
# destination = "tcp:localhost:4242";
43
43
-
# prefix = "netdata";
44
44
-
# hostname = config.networking.hostName;
45
45
-
# };
46
46
-
# # "exporting:global" = {
47
47
-
# # enabled = "yes";
48
48
-
# # "update every" = "60";
49
49
-
# # };
50
50
-
# # "graphite:icarus" = {
51
51
-
# # enabled = "yes";
52
52
-
# # destination = "localhost:8086";
53
53
-
# # "data source" = "average";
54
54
-
# # prefix = "netdata";
55
55
-
# # hostname = config.networking.hostName;
56
56
-
# # "send charts matching" = "*";
57
57
-
# # "send hosts matching" = "localhost *";
58
58
-
# # "send names instead of ids" = "yes";
59
59
-
# # };
60
60
-
# };
61
61
-
# };
62
62
-
63
63
-
# - metrics
64
64
-
# services.telegraf = {
65
65
-
# enable = true;
66
66
-
# extraConfig = {
67
67
-
# inputs = {
68
68
-
# cpu = {};
69
69
-
# mem = {};
70
70
-
# net = {
71
71
-
# ignore_protocol_stats = true;
72
72
-
# };
73
73
-
# exec = {
74
74
-
# command = pkgs.writers.writePython3 "get_bat_stats" {} /* python */ ''
75
75
-
# import json
76
76
-
# import os
77
77
-
78
78
-
79
79
-
# values_to_fetch = [
80
80
-
# "capacity",
81
81
-
# "energy_now",
82
82
-
# "energy_full",
83
83
-
# "energy_full_design",
84
84
-
# "charge_now",
85
85
-
# "charge_full",
86
86
-
# "charge_full_design",
87
87
-
# ]
88
88
-
89
89
-
# result = {}
90
90
-
# for sup in os.listdir('/sys/class/power_supply'):
91
91
-
# with open('/sys/class/power_supply/{}/type'.format(sup)) as f:
92
92
-
# if f.read().strip() != "Battery":
93
93
-
# continue
94
94
-
# for val in values_to_fetch:
95
95
-
# try:
96
96
-
# with open('/sys/class/power_supply/{}/{}'.format(sup, val)) as f:
97
97
-
# key = '{}_{}'.format(sup, val)
98
98
-
# try:
99
99
-
# result[key] = int(f.read().strip())
100
100
-
# except ValueError:
101
101
-
# result[key] = f.read().strip()
102
102
-
# except: # noqa
103
103
-
# pass
104
104
-
105
105
-
# print(json.dumps(result))
106
106
-
# '';
107
107
-
# data_format = "json";
108
108
-
# name_suffix = "_bat";
109
109
-
# interval = "10s";
110
110
-
# };
111
111
-
# };
112
112
-
# outputs = {
113
113
-
# influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; };
114
114
-
# };
115
115
-
# };
116
116
-
# };
117
117
-
118
118
-
# # --- server ---
119
119
-
120
120
-
# # - metrics
121
121
-
# services.influxdb = {
122
122
-
# enable = true;
123
123
-
# extraConfig = {
124
124
-
# opentsdb = [{
125
125
-
# enabled = true;
126
126
-
# bind-address = ":4242";
127
127
-
# database = "opentsdb";
128
128
-
# retention-policy = "";
129
129
-
130
130
-
# batch-size = 1000;
131
131
-
# batch-pending = 5;
132
132
-
# batch-timeout = "1s";
133
133
-
# }];
134
134
-
# };
135
135
-
# };
136
136
-
137
137
-
# # - logs
138
138
-
# services.graylog = {
139
139
-
# enable = true;
140
140
-
# passwordSecret = "AmjUYosI6hXKyI1MLEusupZy7srxQxZOowpHSmvF0ekMoi19go5qmnqd3po4VcQahdR1AKZ3Yk9tP6nLUbgmzLwQFodIc5g8";
141
141
-
# rootPasswordSha2 = "cf80cd8aed482d5d1527d7dc72fceff84e6326592848447d2dc0b0e87dfc9a90"; # testing
142
142
-
# elasticsearchHosts = [ "http://localhost:9200" ];
143
143
-
# };
144
144
-
145
145
-
# services.elasticsearch = {
146
146
-
# enable = true;
147
147
-
# };
148
148
-
# services.loki = {
149
149
-
# enable = true;
150
150
-
# configuration = {
151
151
-
# auth_enabled = false;
152
152
-
# server.http_listen_port = 3100;
153
153
-
# ingester = {
154
154
-
# lifecycler = {
155
155
-
# address = "127.0.0.1";
156
156
-
# ring = {
157
157
-
# kvstore.store = "inmemory";
158
158
-
# replication_factor = 1;
159
159
-
# };
160
160
-
# final_sleep = "0s";
161
161
-
# };
162
162
-
# };
163
163
-
# schema_config = {
164
164
-
# configs = [
165
165
-
# {
166
166
-
# from = "2018-04-15";
167
167
-
# store = "inmemory";
168
168
-
# object_store = "filesystem";
169
169
-
# schema = "v9";
170
170
-
# }
171
171
-
# ];
172
172
-
# };
173
173
-
# storage_config = {
174
174
-
# filesystem.directory = "/tmp/loki/chunks";
175
175
-
# };
176
176
-
# #table_manager = {
177
177
-
# # chunk_tables_provisioning = {
178
178
-
# # inactive_read_throughput = 0;
179
179
-
# # inactive_write_throughput = 0;
180
180
-
# # provisioned_read_throughput = 0;
181
181
-
# # provisioned_write_throughput = 0;
182
182
-
# # };
183
183
-
# # index_tables_provisioning = {
184
184
-
# # inactive_read_throughput = 0;
185
185
-
# # inactive_write_throughput = 0;
186
186
-
# # provisioned_read_throughput = 0;
187
187
-
# # provisioned_write_throughput = 0;
188
188
-
# # };
189
189
-
# # retention_deletes_enabled = false;
190
190
-
# # retention_period = 0;
191
191
-
# #};
192
192
-
# };
193
193
-
# };
194
194
-
195
195
-
services.grafana = {
196
196
-
enable = true;
197
197
-
addr = "0.0.0.0";
198
198
-
auth.anonymous.enable = true;
199
199
-
auth.anonymous.org_role = "Admin";
200
200
-
};
201
201
-
krebs.iptables.tables.filter.INPUT.rules = [
202
202
-
{ predicate = "-p tcp --dport 3000"; target = "ACCEPT"; } # grafana
203
203
-
];
204
204
-
}
205
22
];
206
23
207
24
krebs.build.host = config.krebs.hosts.icarus;