Public Repository

Last pushed: 2 years ago
Short Description
container with dockerized ganglia and tomcat setup pushed
Full Description

Following is the set of instructions to be executed in order to view application metrics via Ganglia web interface after running the pushed container.

Getting Docker Container Id

sudo DOCKER_HOME/docker inspect -f '{{.Id}}' SHORT_CONTAINER_ID-or-CONTAINER_NAME
    # output : full container id e.g. 9cfa96e1f1eab9fcf722b0ffaee5013f52a4a066feeef7888e1b52b8b178ae7f

Configuring Master Container

sudo mkdir /var/lib/docker/aufs/mnt/MASTER_CONTAINER_FULL_ID/etc/ganglia/conf.d
sudo mkdir /var/lib/docker/aufs/mnt/MASTER_CONTAINER_FULL_ID/usr/lib/ganglia/python_modules
sudo mkdir /var/lib/docker/aufs/mnt/MASTER_CONTAINER_FULL_ID/usr/share/tomcat7/logs

sudo cp PATH_TO_APP_WAR_FILE/APPLICATION.war /var/lib/docker/aufs/mnt/MASTER_CONTAINER_FULL_ID/usr/share/tomcat7/webapps
sudo cp PATH_TO_METRICS_CONF_FILE/METRICS_CONF_FILE.pyconf /var/lib/docker/aufs/mnt/MASTER_CONTAINER_FULL_ID/etc/ganglia/conf.d/
sudo cp PATH_TO_PYTHON_SCRIPT_FILE/PYTHON_SCRIPT_FILE.py /var/lib/docker/aufs/mnt/MASTER_CONTAINER_FULL_ID/usr/lib/ganglia/python_modules

    # configure gmond.conf file
        # set udp_send_channel properties
            udp_send_channel {
                       #mcast_join = 239.2.11.71
                       host = <ID_TO_MASTER_NODE>
                       port = 8649
                       ttl = 1
                     }
        # set udp_receive_channel properties
            udp_recv_channel {
                         #mcast_join = 239.2.11.71
                         port = 8649
                         #bind = 239.2.11.71
                     }
        # add the following block inside modules block
            module {
                      name = "python_module"
                      path = "/usr/lib/ganglia/modpython.so"
                      params = "/usr/lib/ganglia/python_modules/"
                  }
        # add the following line after modules block
            include ('/etc/ganglia/conf.d/*.pyconf')

    # configure gmetad.conf file
        # set data-source - edit the line data_source "my cluster" localhost into following 
            data_source "my cluster" <ID_TO_MASTER_NODE>

Configuring Slave Container

sudo mkdir /var/lib/docker/aufs/mnt/SLAVE_CONTAINER_FULL_ID/etc/ganglia/conf.d
sudo mkdir /var/lib/docker/aufs/mnt/SLAVE_CONTAINER_FULL_ID/usr/lib/ganglia/python_modules
sudo mkdir /var/lib/docker/aufs/mnt/SLAVE_CONTAINER_FULL_ID/usr/share/tomcat7/logs

sudo cp PATH_TO_APP_WAR_FILE/APPLICATION.war /var/lib/docker/aufs/mnt/SLAVE_CONTAINER_FULL_ID/usr/share/tomcat7/webapps
sudo cp PATH_TO_METRICS_CONF_FILE/METRICS_CONF_FILE.pyconf /var/lib/docker/aufs/mnt/SLAVE_CONTAINER_FULL_ID/etc/ganglia/conf.d
sudo cp PATH_TO_PYTHON_SCRIPT_FILE/PYTHON_SCRIPT_FILE.py /var/lib/docker/aufs/mnt/SLAVE_CONTAINER_FULL_ID/usr/lib/ganglia/python_modules

    # configure gmond.conf file
        # set udp_send_channel properties
            udp_send_channel {
                       #mcast_join = 239.2.11.71
                       host = <ID_TO_MASTER_NODE>
                       port = 8649
                       ttl = 1
                     }
        # set udp_receive_channel properties
            udp_recv_channel {
                         #mcast_join = 239.2.11.71
                         port = 8649
                         #bind = 239.2.11.71
                     }
        # add the following block inside modules block
            module {
                     name = "python_module"
                 path = "/usr/lib/ganglia/modpython.so"
                      params = "/usr/lib/ganglia/python_modules/"
                  }            
        # add the following line after modules block
            include ('/etc/ganglia/conf.d/*.pyconf')

    # configure gmetad.conf file
        # set data-source - edit the line data_source "my cluster" localhost into following
            data_source "my cluster" <ID_TO_SLAVE_NODE>

Configuring Python Configuration File

# Set the value of param 'url' as following inside PATH_TO_METRICS_CONF_FILE/METRICS_CONF_FILE.pyconf
    http://<IP_TO_THE_NODE_RUNNING_APPLICATION>:<TOMCAT_PORT_NO>/<APPLICATION_MONITORING_LINK>
    # e.g. http://172.17.0.4:8080/DSFsupport/monitor.html

Configuring Python Script File

# Set the value of param 'url' as following inside PATH_TO_PYTHON_SCRIPT_FILE/PYTHON_SCRIPT_FILE.py
    http://<IP_TO_THE_NODE_RUNNING_APPLICATION>:<TOMCAT_PORT_NO>/<APPLICATION_MONITORING_LINK>
    # e.g. http://172.17.0.4:8080/DSFsupport/monitor.html

start the tomcat service [as needed]

start apache2 server [In all nodes]

start ganglia services [as needed]

Docker Pull Command
Owner
partha187

Comments (0)