Skip to content

Commit 7ded9ae

Browse files
piwaiedsiper
authored andcommitted
in_node_exporter_metrics: Increase buffer size to read /proc/stat correctly
The "intr" entry of proc stat can be larger than 512 chars, and generate errors leading to stalled CPU metrics if it's the wrong length. Signed-off-by: Pierre-Yves Rofes <[email protected]>
1 parent 8cc6da6 commit 7ded9ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/in_node_exporter_metrics/ne_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int ne_utils_file_read_lines(const char *mount, const char *path, struct mk_list
153153
int len;
154154
int ret;
155155
FILE *f;
156-
char line[512];
156+
char line[2048];
157157
char real_path[2048];
158158

159159
mk_list_init(list);

0 commit comments

Comments
 (0)