Enabling Check_Mk agent in ElastiStor

Check_Mk agent can be used in ElastiStor for monitoring various services effectively. This document explains how to download, install, and enable the Check_Mk agent.

Prerequisites

Prior to installing the Check_Mk agent, install the following dependent ports that help the agent output all the network device data. Perform the installation using the following commands in the SSH session of ElastiStor node:

  1. cd /cbdir/packages
  2. pkg_add muse-0.2.tbz
  3. pkg_add libstatgrab-0.17.tbz
  4. pkg_add ipmitool-1.8.12_3.tbz
  5. pkg_add openssl-1.0.1_8.tbz

Procedures

  1. To enable the internet daemon
    inetd 
    in the
    /etc/rc.conf
    file, do the following:
    1. Run
      vi /etc/rc.conf
    2. Add the following lines in the rc.conf file:
      inetd_enable=yes 
      inetd_flags=-wW
  2. Download the FreeBSD agent
    check_mk_agent
    from the following URL: http://cloudbyte.com/downloads/check_mk_agent.freebsd.tar.gz
  3. Untar the check_mk_agent.freebsd.tar.gz.
  4. Run the following commands to install the agent in
    /usr/local/bin/
    :
    • mv check_mk_agent.freebsd /usr/local/bin/check_mk_agent
  5. To create an entry for the agent port in /etc/services, do the following:
    1. Run
      vi /etc/services
    2. Add the following line in the agent port:
      check_mk 6556/tcp #check_mk agent
  6. To make the agent available through TCP at port 6556, do the following:
    1. Run
      vi /etc/inetd.conf 
    2. Add the following line:
      check_mk stream tcp nowait root /usr/local/bin/check_mk_agent check_mk_agent
  7. (Optional)Set up minimum security in /etc/hosts.allow so that only the IP address of the monitoring segments (180.179.103.0/255.255.255.128) has access.
  8. Run
    vi /etc/hosts.allow
    and add the following:

    Allow nagios server to access us

    check_mk_agent: 180.179.103.0/255.255.255.128: allow

    check_mk_agent: ALL: deny

  9. Restart the inetd service using the following command:
    /etc/rc.d/inetd start
  10. Confirm that Check_Mk agent is enabled using the following command:
    telnet ElastiStor_Node_IP_address 6556
  11. The output of this command should be similar to the sample output. To see the sample output, click the following link: