Werk #10360: agent_aws: Fetch live data from AWS if special agent configuration has changed

Component Checks & agents
Title agent_aws: Fetch live data from AWS if special agent configuration has changed
Date Oct 24, 2019
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 1.6.0p6 2.0.0i1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

The special agent {{agent_aws}} fetches data from an AWS account relying on the WATO configuration ruleset {{Amazon Web Services (AWS)}} for a given host.

Cloudwatch metrics and other metrics have a resolution of 5 minutes by default. (S3 has 1 day). In order to save API calls and costs the agent caches the data.

If the special agent configuration changes the agent does not recognize that and still uses old cached data until the cache expires.

Now the special agent computes a hash over the current configuration and if the configuration changes the agent fetches live data immediately.

The configuration hash will be stored in {{tmp/check_mk/agents/agent_aws/HOSTNAME.config_hash}}.

From {{cmk -D HOSTNAME}} you get the commandline of the special agent for a given host. With the additional option {{--no-cache}} you can update the cached data, too.

Workaround for previous special agent versions: Remove the files {{tmp/check_mk/agents/agent_aws/REGION/HOSTNAME/*}}.

To the list of all Werks