Configuration 3 for Application agent

The following is a sample configuration for monitoring application inside Docker container:

include "types.cf"
include "DockerTypes.cf"

cluster dockreg (
        UserNames = {
                 "d_rhel72_container1_dockreg@vcs_lzs@ba38dea0
                   -f66e-11e5-a2ee-af94cf65eb82" = 0 }
        SecureClus = 1
        DefaultGuestAccess = 1
        HacliUserLevel = COMMANDROOT
        )

system Sys1 (
        )

system Sys2 (
        )

group DockerDaemonGRP (
        SystemList = { Sys1 = 0, Sys2 = 1 }
        Parallel = 1
        )

        DockerDaemon DockerDaemonRES (
                )


group rhel72_container1_DockerGRP (
        SystemList = { Sys1 = 0, Sys2 = 1 }
        ContainerInfo = { Name = rhel72_container1, Type = Docker, 
         Enabled = 1 }
        Administrators = {
                 "d_rhel72_container1_dockreg@vcs_lzs@ba38dea0
                   -f66e-11e5-a2ee-af94cf65eb82" }
        )

        Application rhel72_container1_ApplicationRES (
                StartProgram = "service1 start"
                StopProgram = "service1 stop"
                CleanProgram = "service1 stop"
                MonitorProgram = "service1 status"
                ContainerOpts = { RunInContainer = 1, PassCInfo = 1 }
                RestartLimit = 3
                )

        DockerContainer rhel72_container1_DockerRES (
                ContainerName = rhel72_container1
                ContainerInitCommand = bash
        	       ImageName = "rhel7.2"
                RestartLimit = 3
                )

requires group DockerDaemonGRP online local firm
rhel72_container1_ApplicationRES requires rhel72_container1_DockerRES

Sample output of the hadockersetup utility

The following is a sample output of the hadockersetup --configure option:

Containers not configured under VCS on 'Sys1' are:

        1) rhel72_container1
        2) rhel7C1
        3) registry

Specify the container index: [1]
        Selected container is: 'rhel72_container1'

Specify space separated system names : [Sys1 Sys2]
Configuring DockerDaemon resource to monitor docker daemon process

        Resource 'DockerDaemonRES' added successfully

        Onlining resource 'DockerDaemonRES'

Configuring DockerContainer resource to monitor docker 
 container 'rhel72_container1'

        Resource 'rhel72_container1_DockerRES' added successfully

Do you want to online the container resource 
 'rhel72_container1_DockerRES'? (Y/N): Y

        Onlining resource 'rhel72_container1_DockerRES' .......... DONE

Specify the RPM source path on host: RPM_Source_Path 
        Installing packages in container 'rhel72_container1'


        Installing VRTSperl ... Done

        Installing VRTSvlic ... Done

        Installing VRTSvcs ... Done

        Installing VRTSvcsag ... Done

        Packages installed successfully inside container 'rhel72_container1'

Specify VCS User for establishing communication channel between host
  and container 'rhel72_container1': [d_rhel72_container1_dockreg]

Specify password (minimum five characters) for above mentioned user:

Do you want to configure application resource to monitor 
 application inside container? (Y/N): Y

Configuring application resource 'rhel72_container1_ApplicationRES'

        Resource 'rhel72_container1_ApplicationRES' added successfully

Specify StartProgram for resource rhel72_container1_ApplicationRES:
 /genapp/start_program

Specify StopProgram for resource rhel72_container1_ApplicationRES:
 /genapp/stop_program

Specify CleanProgram for resource rhel72_container1_ApplicationRES:
 /genapp/stop_program

Specify MonitorProgram for resource rhel72_container1_ApplicationRES:
 /genapp/monitor_program

Specify User for resource rhel72_container1_ApplicationRES: [root]

Do you want to configure more containers (Y/N): N
Warning: The container(s) listed below are not configured under VCS.
VCS actions, such as Docker daemon resource offline, may impact 
 containers not configured under VCS
        rhel7C1
        registry