Graylog2 / Graylog2/graylog2-server

Sidecar Collector gets expired 'Received no ping signal from sidecar'

Open
#8,785 0 comments 0 reactions 0 assignees View on GitHub
bug sidecar triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

The Sidecar Service checks the expiration of the Sidecar Collector via a periodically thread, while the sidecar status itself is determined on the fly. The periodically thread to determine/expire the Collector Status seems to use a wrong condition.

## Expected Behavior
The Sidecar Collector Status respects the configured Inactive threshold (System->Configuration).

## Current Behavior
The Sidecar Collector Status is set to 'Received no ping signal from sidecar' even if the last_seen is in the configured Inactive threshold.

## Possible Solution
https://github.com/Graylog2/graylog2-server/blob/3913f709385b42b1043f8556e49cea681d7036d7/graylog2-server/src/main/java/org/graylog/plugins/sidecar/services/SidecarService.java#L151

In this line the Condition needs to be changed to 'isAfter' otherwise the condition will always be true if the collector is in state 'RUNNING'

## Steps to Reproduce (for bugs)

1. Set Sidecar Update interval: to 15 Minutes
2. Set Inactive Threshold to 30-60 Minutes (doesn't matter)
3. Wait till https://github.com/Graylog2/graylog2-server/blob/3913f709385b42b1043f8556e49cea681d7036d7/graylog2-server/src/main/java/org/graylog/plugins/sidecar/periodical/PurgeExpiredSidecarsThread.java checks the expired sidecar collectors. (runs all 10 minutes)
4. Sidecar is still in active: true (is determined till request time, with correct condition here: https://github.com/Graylog2/graylog2-server/blob/3913f709385b42b1043f8556e49cea681d7036d7/graylog2-server/src/main/java/org/graylog/plugins/sidecar/filter/ActiveSidecarFilter.java#L36 ), but collectors are on 'Received no ping signal from sidecar'

## Context
In large environments it needs high cpu if sidecar updates every 20 seconds (default). So we want to increase the update intervall but also see the activity state of our collectors.

## Your Environment

* Graylog Version: 3.1.4 (but Sourcecode did not change till now)
* Java Version: Java 8
* Elasticsearch Version: 6.5
* MongoDB Version: 3.6
* Operating System: RedHat 7
* Browser version: irrelevant

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.