Monday, August 17, 2015

How to install Check_Mk agent on client machine

To install Check_Mk agent on client machine

1) wget http://mathias-kettner.de/download/check_mk-1.1.12p7.tar.gz


2) tar -xvzf check_mk-1.1.12p7.tar.gz

3) Make sure 'xinetd' is installed
   rpm -qa |grep 'xinetd'

4) If not then install xinetd
  yum install xinetd

5) Start xinetd service
    service xinetd start

6) Copy the files and give the execute permissions for 'check_mk_agent'.
     cd /tmp/check_mk-x.x.x
    tar -xvzf agents.tar.gz
    cp check_mk_agent.linux /usr/bin/check_mk_agent
    cp xinetd.conf /etc/xinetd.d/check_mk
    chmod +x /usr/bin/check_mk_agent

7) Now Set the IP of Check MK master in '/etc/xinetd.d/check_mk' file.
    "only from = IP_OF_MONITORING_SERVER"

8) Add the IP to '/etc/hosts.allow'.
     "check_mk_agent : IP_OF_MONITORING_SERVER"

9) Now start xinetd service
   service xinetd start

10) Set the xinetd to start at system boot
     chkconfig xinetd on

11) Now check from Check_Mk master, if we are able to telnet client machine or not
       telnet ClientMachineIP 6556

Now, we have to add the entry in Check_Mk master machine for the client IP.

1) su - checkmktest

2) cd etc/check_mk/

3) In that open the file vi main,mk

4) Add your client entry like this
    all_hosts = [ 'agent1' ]
    ipaddresses = {
        "agent1" : "XXX.XXX.XXX.XXX",
        }

5) save the file
6) Now, we have to take the inventory of that client machine
    check_mk -u -II agent1  (agent1 is the name that we have given to our client machine)

7) Once you fire the above command it will create a file under
    cd
    cd var/check_mk/autochecks/
    In that you will find the file with name agent1.mk
    which contains all the checks

8) Now restart check_Mk and go to browser

    check_mk -v -R

9) Open the browser you will get all the default service checks available
    http://localhost/checkmkmon1/check_mk/







   



No comments:

Post a Comment