Debug issues with inventory data disappearing/reappearing on a regular basis

This article provides guidance on resolving issues with disappearing and reappearing host inventory.

LAST TESTED ON CHECKMK 2.0.0P1

Table of Contents

Problem

You might encounter that the host inventory data might disappear on either every inventory run or at least several times a day, like this:

Screenshot of inventory data being added and then removed again the next day.


HW/SW inventory is related to CMK agent hosts, a two-step story:

  • The agent plugin collects the data, by default, every 4h
  • The data delivered by the agent is then validly cached on CMK site side for 4h (or however the plugin interval is set)
  • The HW/SW inventory service runs every 24h (set by the rule "normal check interval for service checks") and reads the cached data - NO AgentPoll is done at this time!

Now it could be due to different things that the data disappears:

  • There is no AgentAccess for 4h, so the data can't be fetched
  • The plugin interval is set longer than that of the service
  • Or, attention: if the agenthost is queried multiple times from the same IP, then it could be that the data is "stolen" between these queries and therefore does not exist! This could happen, e.g., if another site on the same server as the "correct" one queries the host (SRC address is the same, and the agent thinks it has already sent the data) or the host is queried multiple times (but with different hostnames) from the same site - with the same result related to the SRC address