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
configs.monitoring.telegraf: nix fmt
author
lassulus
date
1 year ago
(Aug 9, 2025, 2:40 PM CEST)
commit
76df05f9
76df05f93de26e4b7b0dd452b6f8daec1076a6c7
parent
50e224dd
50e224dd07e122aff4dab0094dc517e9480edfc9
+61
-62
1 changed file
Expand all
Collapse all
Unified
Split
2configs
monitoring
telegraf.nix
+61
-62
2configs/monitoring/telegraf.nix
View file
Reviewed
···
96
96
enable = true;
97
97
extraConfig = {
98
98
agent.interval = "60s";
99
99
-
inputs =
100
100
-
{
101
101
-
prometheus.urls = lib.mkIf config.services.promtail.enable [
102
102
-
# default promtail port
103
103
-
"http://localhost:9080/metrics"
99
99
+
inputs = {
100
100
+
prometheus.urls = lib.mkIf config.services.promtail.enable [
101
101
+
# default promtail port
102
102
+
"http://localhost:9080/metrics"
103
103
+
];
104
104
+
prometheus.metric_version = 2;
105
105
+
kernel_vmstat = { };
106
106
+
nginx.urls = lib.mkIf config.services.nginx.statusPage [
107
107
+
"http://localhost/nginx_status"
108
108
+
];
109
109
+
smart = lib.mkIf (!isVM) {
110
110
+
path_smartctl = pkgs.writeShellScript "smartctl" ''
111
111
+
exec /run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl "$@"
112
112
+
'';
113
113
+
};
114
114
+
system = { };
115
115
+
mem = { };
116
116
+
file = [
117
117
+
{
118
118
+
data_format = "influx";
119
119
+
file_tag = "name";
120
120
+
files = [ "/var/log/telegraf/*" ];
121
121
+
}
122
122
+
]
123
123
+
++ lib.optional (lib.any (fs: fs == "ext4") (lib.attrNames config.boot.supportedFilesystems)) {
124
124
+
name_override = "ext4_errors";
125
125
+
files = [ "/sys/fs/ext4/*/errors_count" ];
126
126
+
data_format = "value";
127
127
+
};
128
128
+
exec = [
129
129
+
{
130
130
+
## Commands array
131
131
+
commands = [ ipv6DadCheck ] ++ zfsChecks ++ nfsChecks;
132
132
+
data_format = "influx";
133
133
+
}
134
134
+
];
135
135
+
systemd_units = { };
136
136
+
swap = { };
137
137
+
disk.tagdrop = {
138
138
+
fstype = [
139
139
+
"tmpfs"
140
140
+
"ramfs"
141
141
+
"devtmpfs"
142
142
+
"devfs"
143
143
+
"iso9660"
144
144
+
"overlay"
145
145
+
"aufs"
146
146
+
"squashfs"
104
147
];
105
105
-
prometheus.metric_version = 2;
106
106
-
kernel_vmstat = { };
107
107
-
nginx.urls = lib.mkIf config.services.nginx.statusPage [
108
108
-
"http://localhost/nginx_status"
148
148
+
device = [
149
149
+
"rpc_pipefs"
150
150
+
"lxcfs"
151
151
+
"nsfs"
152
152
+
"borgfs"
109
153
];
110
110
-
smart = lib.mkIf (!isVM) {
111
111
-
path_smartctl = pkgs.writeShellScript "smartctl" ''
112
112
-
exec /run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl "$@"
113
113
-
'';
114
114
-
};
115
115
-
system = { };
116
116
-
mem = { };
117
117
-
file =
118
118
-
[
119
119
-
{
120
120
-
data_format = "influx";
121
121
-
file_tag = "name";
122
122
-
files = [ "/var/log/telegraf/*" ];
123
123
-
}
124
124
-
]
125
125
-
++ lib.optional (lib.any (fs: fs == "ext4") (lib.attrNames config.boot.supportedFilesystems)) {
126
126
-
name_override = "ext4_errors";
127
127
-
files = [ "/sys/fs/ext4/*/errors_count" ];
128
128
-
data_format = "value";
129
129
-
};
130
130
-
exec = [
131
131
-
{
132
132
-
## Commands array
133
133
-
commands = [ ipv6DadCheck ] ++ zfsChecks ++ nfsChecks;
134
134
-
data_format = "influx";
135
135
-
}
136
136
-
];
137
137
-
systemd_units = { };
138
138
-
swap = { };
139
139
-
disk.tagdrop = {
140
140
-
fstype = [
141
141
-
"tmpfs"
142
142
-
"ramfs"
143
143
-
"devtmpfs"
144
144
-
"devfs"
145
145
-
"iso9660"
146
146
-
"overlay"
147
147
-
"aufs"
148
148
-
"squashfs"
149
149
-
];
150
150
-
device = [
151
151
-
"rpc_pipefs"
152
152
-
"lxcfs"
153
153
-
"nsfs"
154
154
-
"borgfs"
155
155
-
];
156
156
-
};
157
157
-
diskio = { };
158
158
-
zfs = {
159
159
-
poolMetrics = true;
160
160
-
};
161
161
-
}
162
162
-
// lib.optionalAttrs
154
154
+
};
155
155
+
diskio = { };
156
156
+
zfs = {
157
157
+
poolMetrics = true;
158
158
+
};
159
159
+
}
160
160
+
//
161
161
+
lib.optionalAttrs
163
162
(
164
163
if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then
165
164
config.boot.swraid.enable