Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Prerequisites

Prerequisites for this feature are a distributed monitoring setup using distributed WATO and the possibility of establishing a connection from remote sites to the central site via HTTP/HTTPS.

Also, you need to configure the distributed Agent Bakery.

With Checkmk 2.0, there is a new option for the Agent Updater:

...

Code Block
languagebash
themeRDark
root@linux:~# cmk-update-agent register -v

+-------------------------------------------------------------------+
|                                                                   |
|  Check_MK Agent Updater v2.03.0b50p21 - Registration                   |
|                                                                   |
|  Activation of automatic agent updates. Your first step is to     |
|  register this host at your deployment server for agent updates.  |
|  For this step you need an administration account on WATO for     |
|  that server.                                                     |
|                                                                   |
+-------------------------------------------------------------------+
Our host name in the monitoring: 
myremotesite

WATO user with admin permissions: 
cmkadmin     

Password: 


Going to register agent at deployment server
Applying new update URL http://myhost/myremotesite/check_mk/ from deployment server
Successfully registered agent of host "myremotesite" for deployment.
You can now update your agent by running 'cmk-update-agent -v'
Saved your registration settings to /etc/cmk-update-agent.state.

...

Code Block
languagebash
themeRDark
root@linux:/home/ubuntu#~# cmk-update-agent -v 

+-------------------------------------------------------------------+
|                                                                   |
|  Check_MK Agent Updater v2.03.0b50p21 - Update                         |
|                                                                   |
+-------------------------------------------------------------------+
Getting target agent configuration for host 'myremotesite' from deployment server
Agent Bakery: Registering/updating at remote site but found no URL to central site. Please provide it in "automatic agent updates" section at global settings.
See syslog or Logfile at /var/lib/check_mk_agent/cmk-update-agent.log for details.

...

  1. SetupGeneralGlobal settingsAUTOMATIC AGENT UPDATESAutomatic agent updates → Connection to the central agent bakery
    Connection to central agent bakery


    Place checks on both URL to central site & Automation User for connection to central site. Fill in the information for the appropriate URL.
    Screenshot of Edit global settings for Connection to the central agent bakery


  2. Now you can update the host.

    Code Block
    languagebash
    themeRDark
    root@linux:~# cmk-update-agent -v
    
    +-------------------------------------------------------------------+
    |                                                                   |
    |  Check_MK Agent Updater v2.03.0b50p21 - Update                         |
    |                                                                   |
    +-------------------------------------------------------------------+
    Getting target agent configuration for host 'myremotesite' from deployment server
    Target state (from deployment server):
      Agent Available:     True
      Signatures:          1
      Target Hash:         1ef2302ca00a9b89
    Agent 1ef2302ca00a9b89 already installed.
    

    .

  3. In ' SetupGeneral Global settings AUTOMATIC AGENT UPDATES' there Automatic agent updates  there is now a new second option for the distributed Agent Bakery:

    Screenshot of URL from host to remote site. Certificates for HTTPS verification

    Configure an alternative URL for the connection from the host to remote Agent Bakery. If not configured here, the URL from distributed monitoring configuration is used instead. You might often want to make this a site-specific global setting at the distributed monitoring configuration because this URL is likely different for every remote site.

...

This feature is realized as follows: Update requests to the remote sites get forwarded to the central site – The entire configuration and the agent baking process are done on the central site. Agent packages that got requested once at a remote site will get cached (as long as they are valid) there to save unnecessary traffic. Additionally, the requested data will be checked for consistency on the remote site, again to save unnecessary traffic to the central sitebaking process are done on the central site. Agent packages that got requested once at a remote site will get cached (as long as they are valid) there to save unnecessary traffic. Additionally, the requested data will be checked for consistency on the remote site, again to avoid unnecessary traffic to the central site.

An agent is considered valid as long as a new agent hasn't been baked and as long as the first Interval for update check after an agent is baked hasn't passed. By default, the update check interval is 1 hour but can be adjusted in the "Agent Updater" rule.

Example:

When an agent is baked and signed, all hosts the newly baked agent applies to will pull the update at the next update interval. After all the hosts have pulled the new agent, there isn't a need to retain the agent past the following update interval.

If new hosts are added within the update interval it will pull the cached agent, but if added after, the remote server will pull the agent again for the new hosts.

General Communication Settings

...

The host fetches all updates from the myremotesite.


Config

The agent updater creates a config and a state file. Please don't modify this file! You can take a look inside to see if the config is correct!

...