From d85789c7544ba439ca96639c3e9974d0f5716fb5 Mon Sep 17 00:00:00 2001 From: Bharath S <112700052+bharath-santhakumar-13446@users.noreply.github.com> Date: Sat, 29 Mar 2025 11:30:30 +0530 Subject: [PATCH 1/2] Update README.md 1) Add: Steps to build image 2) Update: docker run command 3) Add: Agent version customisation --- README.md | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b339669..7b29a70 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,34 @@ -# Site24x7 Agent Dockerfile +# Site24x7 Container Agent -This repository is meant to build the base image for a Site24x7 Agent container. You will have to use the resulting image to configure and run the Agent. +This repository is meant to build the Site24x7 Linux agent container image. You can customise the image with available options and run the container to monitor your host server. -## Quick Start +## Create image -Run the below command in your server to monitor the host via site24x7-agent container +Download and unzip the repository in the server host. Then navigate to the extracted folder and execute the below command to build the `site24x7-agent:latest` image. ``` -docker run -d --name site24x7-agent \ - -v /var/run/docker.sock:/var/run/docker.sock:ro \ - -v /proc/:/host/proc/:ro \ - -v /sys:/host/sys/:ro \ - -e KEY= \ - site24x7/docker-agent:latest +docker build -t site24x7-agent . ``` -## Configuration +## Run the agent container +Execute the below command to monitor the server host via `site24x7-agent` container +``` +docker run -d --name site24x7-agent --restart always -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/host:ro -v /var/lib/docker/containers/:/var/lib/docker/containers/:ro -e KEY= site24x7-agent:latest +``` + +## Customizations + +### Agent version +If you want to install the Site24x7 Linux agent of specific version, edit the `AGENT_VERSION` variable in `entrypoint.sh` with the valid linux [version](https://www.site24x7.com/help/server-agent-release-notes.html#linux) and build the image. Then build and run the image as container. ### Hostname -By default the agent container will use the `Name` field found in the `docker info` command from the host as a hostname. To change this behavior you can update the `hostname` field in `/opt/site24x7/monagent/conf/monagent.cfg`. The easiest way for this is to use the `HOSTNAME` environment variable (see below). +By default the agent container will use the `Name` field found in the `docker info` command from the host as a hostname. To change this behavior you can update the `hostname` field in `/opt/site24x7/monagent/conf/monagent.cfg`. The easiest way for this is to use the `HOSTNAME` environment variable in docker run command. ``` -docker run -d --name site24x7-agent \ - -v /var/run/docker.sock:/var/run/docker.sock:ro \ - -v /proc/:/host/proc/:ro \ - -v /sys:/host/sys/:ro \ - -e KEY= \ - -e HOSTNAME= \ - site24x7/docker-agent:latest +docker run -d --name site24x7-agent --restart always -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/host:ro -v /var/lib/docker/containers/:/var/lib/docker/containers/:ro -e KEY= -e HOSTNAME= site24x7-agent:latest ``` ## Limitations @@ -39,4 +37,4 @@ Only volumes that are mounted into the container can have the disk metrics being ## Contribute -If you notice a limitation or a bug with this container, feel free to open a [Github issue](https://github.com/site24x7/docker-agent/issues). \ No newline at end of file +If you notice a limitation or a bug with this container, feel free to open a [Github issue](https://github.com/site24x7/docker-agent/issues). From b2637f7dd3ae03ec608bcd1a6b6d888f2d56a81c Mon Sep 17 00:00:00 2001 From: Bharath S <112700052+bharath-santhakumar-13446@users.noreply.github.com> Date: Sat, 29 Mar 2025 11:34:33 +0530 Subject: [PATCH 2/2] Update README.md Add: Support email updated --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7b29a70..c032ac2 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ docker run -d --name site24x7-agent --restart always -v /var/run/docker.sock:/va Only volumes that are mounted into the container can have the disk metrics being reported +## Support +If you need help, email us at support@site24x7.com + ## Contribute If you notice a limitation or a bug with this container, feel free to open a [Github issue](https://github.com/site24x7/docker-agent/issues).