diff options
author | Vladimir Kobal <vlad@prokk.net> | 2019-07-05 14:17:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-05 14:17:19 +0300 |
commit | fe695d7ed4859569aeb71d18c1455aca00276efd (patch) | |
tree | d732d31de77ec478118aba7dbbf646d0fa71d8f0 /collectors/plugins.d | |
parent | 80b70d37f26c9d310f71d7ab32bf4c8a228200f7 (diff) |
Add more debug messages for pluginsd pipe errors (#6373)
Diffstat (limited to 'collectors/plugins.d')
-rw-r--r-- | collectors/plugins.d/plugins_d.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/collectors/plugins.d/plugins_d.c b/collectors/plugins.d/plugins_d.c index 024dd292ae..66ec5d0ea6 100644 --- a/collectors/plugins.d/plugins_d.c +++ b/collectors/plugins.d/plugins_d.c @@ -154,7 +154,12 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int char *r = fgets(line, PLUGINSD_LINE_MAX, fp); if(unlikely(!r)) { - error("read failed"); + if(feof(fp)) + error("read failed: end of file"); + else if(ferror(fp)) + error("read failed: input error"); + else + error("read failed: unknown error"); break; } |