Cmk-update-agent on AIX

Hi,

Cant find any documentation around how you get cmk-update-agent working on AIX.
Have baked a package which says that it includes the cmk-update-agent but when its unpacked its missing.

What I´m missing and is there any guide available for this somewhere?
Also are there any special requirements when it comes to AIX that I should think about?

Best Regards
Daniel

Hi,
on AIX you need the tar packages to deploy. In the cmk-update-agent program, this option is not implemented. You can adapt the cmk_update_agent.py on your own risk. Here some code:

...
def install_agent(config, agent):
    fd, filename = tempfile.mkstemp(prefix="check-mk-agent-")
    try:
        os.write(fd, agent)
        os.close(fd)
        if config["opsys"] == "linux_rpm":
            install_agent_linux_rpm(filename)
        elif config["opsys"] == "linux_deb":
            install_agent_linux_deb(filename)
        elif config["opsys"] == "aix_tgz":
            install_agent_aix_tgz(filename)
        elif config["opsys"] == "windows_msi":
           install_agent_windows_msi(filename)
        else:
            raise Exception("opsys %s not implemented" % config["opsys"])
    except Exception, e:
        verbose("Keeping %s for error diagnosis. Error: %s\n" % (filename, e))
        raise

    verbose(tty_bold + "Successfully installed agent %s.\n" % config["aghash"] + tty_normal)
    os.remove(filename) 
...
def install_agent_aix_tgz(filename):
    lib_dir = os.environ.get('MK_LIBDIR')
    conf_dir = os.environ.get('MK_CONFDIR')
    if os.path.exists(lib_dir):
        os.system('rm -f %s' % ( conf_dir + '/encryption.cfg'))
        os.system('rm -rf %s' % (lib_dir + '/plugins'))
        os.system("gunzip -c '%s' | tar -xvf- -C /" % filename)
        os.system("chmod 750 %s/*" % lib_dir)
...

I hope it helps you to find a solution.
Cheers,
Christian

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.