Versions Compared

Key

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

...

Code Block
languagebash
themeRDark
root@ip-172-31-40-133root@linux:~# cmk-update-agent register -v

+-------------------------------------------------------------------+
|                                                                   |
|  Check_MK Agent Updater v2.0.0b5 - 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: 
slave1

WATO user with admin permissions: 
cmkadmin     

Password: 


Going to register agent at deployment server
Applying new update URL http://172.31.40.133/slave1/check_mk/ from deployment server
Successfully registered agent of host "slave1" 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@ip-172-31-40-133root@linux:/home/ubuntu# cmk-update-agent -v 

+-------------------------------------------------------------------+
|                                                                   |
|  Check_MK Agent Updater v2.0.0b5 - Update                         |
|                                                                   |
+-------------------------------------------------------------------+
Getting target agent configuration for host 'slave1' 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. Configure the connection to the central agent bakery
    1. SetupGeneralGlobal settingsAUTOMATIC AGENT UPDATESConnection to the 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.





    2. Now you can update the host.

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


...

Code Block
languagebash
themeRDark
root@ip-172-31-40-131root@linux:/home/ubuntu# cat /etc/cmk-update-agent.state 
{'update_url': 'http://172.31.40.131/slave2/check_mk/', 'host_secret': 'zewqptluwgrjzamdvwjplosjhrwqpboxqjtxogreibeqkadfhswhotzifjqqramw', 'server': '172.31.46.5', 'site': 'master', 'host_name': 'slave2', 'protocol': 'http', 'user': 'cmkadmin', 'last_check': 1611063314.5359132, 'installed_aghash': '67f84ee7e41b73aa', 'last_update': 1611063316.2098463}

root@ip-172-31-40-131root@linux:/home/ubuntu# cat /etc/check_mk/cmk-update-agent.cfg 
# Created by Check_MK Agent Bakery.
# This file is managed via WATO, do not edit manually or you
# lose your changes next time when you update the agent.

{'activated': True,
 'certificates': [],
 'ignore_update_url': False,
 'interval': 3600,
 'protocol': 'http',
 'server': '172.31.46.5',
 'signature_keys': ['-----BEGIN CERTIFICATE-----\n'
                    'MIIC2jCCAcICAQEwDQYJKoZIhvcNAQEFBQAwMjEdMBsGA1UECgwUQ2hlY2tfTUsg\n'
                    'U2l0ZSBtYXN0ZXIxETAPBgNVBAMMCGNta2FkbWluMCAXDTIxMDExOTExNTMxMVoY\n'
                    'DzIwNTEwMTEyMTE1MzExWjAyMR0wGwYDVQQKDBRDaGVja19NSyBTaXRlIG1hc3Rl\n'
                    'cjERMA8GA1UEAwwIY21rYWRtaW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n'
                    'AoIBAQDWbh45st1xnzhsVzMjBBXzO7+5qz3/HPezvaOeUpSSIYHns2DnuDlwpLCO\n'
                    'XTdyfRUamgRtiOrzbUsSsARmMF9AqExao1+yM1rbEfcXP6mtBqMkqShlDw3n0L7F\n'
                    'HGGYG2CNqcRSmgxFe2Eck0ydv/p4cJONHIw4UFwqDnHfIC1L3tCnTQJagCig/Jvk\n'
                    'kZSZZqgkrjl4TuwRkFxdrnwURjm2hQGg+TkJcxpPHqSutbdnQrXnuuAEdx/ZIpFL\n'
                    'ivmjLDATjGzCy0LPZsVtjHZu5Lz4WWOZsA1BCZLecT81PI5edWs0RZ9mRH7QC+E8\n'
                    'CkIdlLgMUbfB093SGx3YEP8u+RtRAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAAU/\n'
                    'DtXHbs3cUPBGDs/Go0PgfqhwiZjn1aprCSh8O/RBLWA/jep65eU2pzsuoiKWT5CE\n'
                    'P/xc7pKXWmxQpyA4KA1Fz9BS80QHq5heXkG2FSLMFunDLxzDcbQI7QXH4oskIDkV\n'
                    'zzYio3VDXXDyhMBHd25XKKCQT3L9ou3bD7Esh/Cf/8Y2GQHkRvIWOpwLEknq0ovy\n'
                    'jkJ0o7Gx8GrqJYG5gUW44TJU/IhYFCxfhTS09RW842Z10iDSYiBPKoZLonM6F3SY\n'
                    'SLVRDn3vhnCpbkiO0Dc1op+0d9b5Wc+UCVW02G+l+G+aRw89L7v2xERXNPczCZgV\n'
                    'g+9DtIl5cu1fl4qVqmc=\n'
                    '-----END CERTIFICATE-----\n'],
 'site': 'master'}


...