MetricsHub
MetricsHub Enterprise 1.2.00
-
Home
- Installation
Installation
Enterprise Edition
Download
First, authenticate to the MetricsHub Docker registry using the credentials provided in your onboarding email:
docker login docker.metricshub.com
Once logged in, download the latest MetricsHub Enterprise image:
docker pull docker.metricshub.com/metricshub-enterprise:1.2.00
Configure
Create the required local directories for configuration and logs:
mkdir -p /opt/metricshub/{logs,config,otel}
Note: The container runs as a non-root user with UID
1000
(metricshub
). To avoid permission issues, make sure the container has access to the directories by updating ownership and permissions:
chown -R 1000:1000 /opt/metricshub && chmod -R 775 /opt/metricshub
Next, download the example configuration files to help you get started:
cd /opt/metricshub
wget -O ./otel/otel-config.yaml https://metricshub.com/docs/latest/resources/config/otel/otel-config-example.yaml
wget -O ./config/metricshub.yaml https://metricshub.com/docs/latest/resources/config/linux/metricshub-example.yaml
- In the ./config/metricshub.yaml file, configure the resources to be monitored[1].
- In the ./otel/otel-config.yaml file, specify where the OpenTelemetry Collector should send the collected data[2].
Start
To start MetricsHub Enterprise using the local configuration files, run the following command from /opt/metricshub directory:
# Run docker using local configuration files as volumes
docker run -d \
--name=metricshub-enterprise \
-p 24375:24375 -p 13133:13133 \
-v $(pwd)/config/metricshub.yaml:/opt/metricshub/lib/config/metricshub.yaml \
-v $(pwd)/otel/otel-config.yaml:/opt/metricshub/lib/otel/otel-config.yaml \
-v $(pwd)/logs:/opt/metricshub/lib/logs \
--hostname=localhost \
docker.metricshub.com/metricshub-enterprise:1.2.00
Docker Compose Example
Alternatively, you can launch MetricsHub Enterprise using Docker Compose:
sudo docker compose up -d
Here’s an example of docker-compose.yaml file located under /opt/metricshub:
services:
metricshub:
image: docker.metricshub.com/metricshub-enterprise:1.2.00
container_name: metricshub-enterprise
hostname: localhost
ports:
- 13133:13133 # OpenTelemetry Collector HealthCheck
- 24375:24375 # OpenTelemetry Collector Prometheus Exporter
volumes:
- ./logs:/opt/metricshub/lib/logs # Mount the volume ./lib/logs into /opt/metricshub/lib/logs in the container
- ./config/metricshub.yaml:/opt/metricshub/lib/config/metricshub.yaml # Inject local config/metricshub.yaml into the container
- ./otel/otel-config.yaml:/opt/metricshub/lib/otel/otel-config.yaml # Inject local otel/otel-config.yaml into the container
restart: unless-stopped
Stop
To stop the container, run:
docker stop metricshub-enterprise
Remove
To remove the container, run:
docker rm metricshub-enterprise
Upgrade
To upgrade to a newer version of MetricsHub Enterprise:
-
Stop and remove the existing container:
docker stop metricshub-enterprise docker rm metricshub-enterprise
-
Pull the latest image:
docker pull docker.metricshub.com/metricshub-enterprise:1.2.00
-
Restart the container with your existing configuration and volume mounts:
cd /opt/metricshub docker run -d \ --name=metricshub-enterprise \ -p 24375:24375 -p 13133:13133 \ -v $(pwd)/config/metricshub.yaml:/opt/metricshub/lib/config/metricshub.yaml \ -v $(pwd)/otel/otel-config.yaml:/opt/metricshub/lib/otel/otel-config.yaml \ -v $(pwd)/logs:/opt/metricshub/lib/logs \ --hostname=localhost \ docker.metricshub.com/metricshub-enterprise:1.2.00
Community Edition
Download
Download the Docker package, metricshub-linux-1.0.02-docker.tar.gz
, from the MetricsHub Release v1.0.02[3] page using the following command:
wget -P /tmp https://github.com/sentrysoftware/metricshub/releases/download/v1.0.02/metricshub-linux-1.0.02-docker.tar.gz
Install
Unzip and untar the content of metricshub-linux-1.0.02-docker.tar.gz
into a directory, like /docker
.
sudo mkdir -p /docker
sudo tar xzf /tmp/metricshub-linux-1.0.02-docker.tar.gz -C /docker
Configure
In the ./lib/config/metricshub.yaml
file, located under the ./metricshub
installation directory, configure:
- the resources to be monitored.[1]
- the OpenTelemetry Protocol endpoint[4] that will receive the MetricsHub signals.
To assist with the setup process, a configuration example ./lib/config/metricshub-example.yaml
is provided in the installation directory (./metricshub
).
Build the docker image
Run the following command to build the docker image:
cd /docker/metricshub
sudo docker build -t metricshub:latest .
Start
Run the following command to start MetricsHub with the default configuration file, ./lib/config/metricshub.yaml
:
cd /docker/metricshub
sudo docker run -d --name=metricshub metricshub:latest
You can start MetricsHub with an alternate configuration file with the following command:
cd /docker/metricshub
sudo docker run -d --name=metricshub -v /docker/metricshub/lib/config:/opt/metricshub/lib/config -v /docker/metricshub/lib/logs:/opt/metricshub/lib/logs metricshub:latest
Docker Compose Example
You can start MetricsHub with docker compose:
sudo docker compose up -d --build
Example (docker-compose.yaml
):
version: "2.1"
services:
metricshub:
# for image we will use ``image: sentrysoftware/metricshub:latest``
build: .
container_name: metricshub
volumes:
# Mount the volume ./lib/logs into /opt/metricshub/lib/logs in the container
- ./lib/logs:/opt/metricshub/lib/logs
# Mount the volume ./lib/config into /opt/metricshub/lib/config in the container
- ./lib/config:/opt/metricshub/lib/config
restart: unless-stopped
Stop
Adjust the below commands to meet your specific requirements for stopping and removing the Docker container running MetricsHub.
If:
-
MetricsHub is started as a docker container, run:
sudo docker stop metricshub
-
you are using Docker Compose from the
./metricshub
directory, run:sudo docker compose down
Uninstall
To force-stop and remove the MetricsHub container, run the following commands:
cd /docker/metricshub
sudo docker stop -f metricshub
sudo docker rm -f metricshub