diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-02-03 21:40:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-03 21:40:19 +0200 |
commit | bd7c9ebcc9600dc4da2034bf211e818ec3f2f0c6 (patch) | |
tree | 64b18b31d09b8072145ab8cf23384c1b8ec2875b /collectors | |
parent | 3c73da09c3944947541ea359fe545d9f3f58a727 (diff) |
Check on parents the microseconds delta sent by agents (#14422)
check streaming BEGIN microseconds for negative values
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index f172ccc262..2c0f2cbc60 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -148,8 +148,11 @@ PARSER_RC pluginsd_begin(char **words, size_t num_words, void *user) ((PARSER_USER_OBJECT *)user)->st = st; usec_t microseconds = 0; - if (microseconds_txt && *microseconds_txt) - microseconds = str2ull(microseconds_txt); + if (microseconds_txt && *microseconds_txt) { + long long t = str2ll(microseconds_txt, NULL); + if(t >= 0) + microseconds = t; + } #ifdef NETDATA_LOG_REPLICATION_REQUESTS if(st->replay.log_next_data_collection) { |