====== OS Agent - Statistics ====== The **Statistics** tab shows counters about the OS Agent push activity, useful for diagnosing problems on the receiving side. ===== Counters ===== | Counter | Meaning | | **Metrics Received** | Total number of metric points the Collector has accepted and processed since the last restart| | **Push Requests** | Total number of HTTP push requests received. | | **Auth Failures** | Number of pushes rejected because of an invalid or missing API key. A non-zero value means an agent is misconfigured **or** someone is probing the endpoint. | | **Unmatched Hosts** | Number of pushes from a host that could not be linked to any System. This is normal for standalone hosts - it is informational, not an error. | | **Parse Errors** | Number of pushes the Collector could not parse - typically malformed Influx Line Protocol or read errors. Should stay near zero. | The counters are highlighted in red when they are above zero - this draws the eye to errors when the page is open. ==== Reading the counters ==== * **Push Requests** rising and **Metrics Received** rising → everything works * **Push Requests** rising but **Metrics Received** stuck at zero → the body is parsed but discarded - usually a wrong ''host'' tag (rejected at host registration), or //Active// flag is OFF * **Auth Failures** rising fast → an agent uses an old key, or someone is brute-forcing * **Parse Errors** rising → an agent sends a wrong format - check the Collector log for the exact line ===== Refresh ===== The counters do not auto-refresh. Click **Refresh** at the top of the tab to reload them. ===== Clear ===== The **Clear** button resets all counters to zero. Useful before a test: - Click Clear - Run your test (push a metric, restart Telegraf, etc.) - Click Refresh - Read the new values - they reflect only the test activity The reset only affects the counters in memory - it does not delete metrics from the pipeline or remove hosts. ===== Server-side log ===== The Collector also logs a few key events: * Each successful auto-discovery: ''Auto-discovered OS host: (system=)'' or ''(standalone)'' * Auth failures: ''OS Agent: rejected push from host=<...> - '' * Host cap reached: ''OS Agent: host cap reached (10000), rejecting auto-discovery of '' * Parse errors: ''Failed to parse influx body: '' Look for these messages in the Collector log when the counters do not match what you expect. ===== Combining with Telegraf logs ===== When a problem appears, check both sides: * **Telegraf** (sender) - ''journalctl -u telegraf -f'' on Linux or Event Viewer → //Application// on Windows. Useful messages: ''Error writing to outputs.http'' (network or auth issue), ''connection refused'' (Collector down or wrong URL), ''received status code: 401'' (wrong API key), ''received status code: 403'' (host deactivated). * **Collector** (receiver) - log file under ''logs/'' or wherever your Collector logs are. Look for ''OS Agent'' lines. Mismatched counts (Telegraf says it pushed N, Statistics tab says fewer were received) are a sign of a network drop or a Collector restart - the //Push Requests// counter resets when the Collector restarts.