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/







   



Saturday, August 15, 2015

Step by step procedure to setup Check_mk on Centos 6

Check_MK

Check_MK Multisite, a comprehensive tool that addresses many of Nagios's shortcomings. It provides a web interface for easy administration and configuration, a user-friendly dashboard, a robust notification system, and easy-to-install monitoring agents for many Linux distributions. If it weren't for Check_MK Multisite we would have to use different views for different tasks and it wouldn't be possible to configure all the settings without resorting to working with configuration files.
Open Monitoring Distribution with Check_MK makes it easy and accessible for everyone to set up their own monitoring system

Check_MK architecture




Step by step setup of Check_Mk on CentOS 6.0

1) Download the rpm of omd. I have tested it on omd-1.10

    wget "http://files.omdistro.org/releases/centos_rhel/omd-1.10-rh61-31.x86_64.rpm"

2) Now install the rpm and glibc package
    rpm -ivh omd-1.10-rh61-31.x86_64.rpm
    yum install glibc

3) If above rpm says some packages are missing in the system, then

    rpm -ivh omd-1.30-rh66-35.x86_64.rpm 2>> /tmp/list
    xargs yum -y install < /tmp/list

4) After complete installation check the omd version to verify the installation
    [root@localhost ~]# omd version
    OMD - Open Monitoring Distribution Version 1.10

5) Now we have to create a directory in which all our    
     configuration files will get saved. You can give any name.
 
     [root@localhost opt]# omd create checkmktest

6) Once you fire the above create command it will create a     user with your directory name and you can login    
   through it.
      [root@localhost opt]#su - checkmktest

7) You can check the directories and files which are  
     created in that dir.
     OMD[checkmktest]:~$ ls
   
8) Now start the omd. It will start apache, nagios,    
    rrdcache
    OMD[checkmktest]:~$omd start

9) Now open your browser and fire below link
     http://localhost/checkmktest/check_mk/
     It will ask for username and password
     username: omdadmin
     password: omd

10) Your check_mk setup is done. You can change your    
       password through UI

11) Below is the snapshot of check_mk UI
     

   
    12) Check_Mk agent installation and other check_mk commands will post in my next blog.