Cloudmon Installation Script

Cloudmon Installation Script

Installation and Deployment

Cloudmon Installation Script

Cloudmon provides a single script to install and remove every server-side component: the database, the Controller, and the Probe. Download it from https://repo.cloudmon.ai/scripts/install.sh.

Before You Begin

  • Run the script with sudo.
  • The host needs internet access to fetch prerequisites.
  • Install NGINX 1.25 or above.
  • Check sizing and supported versions in Cloudmon System Requirements.

Download the Script

The file is served as install.sh, but on some builds its usage output refers to it as install.sh. Use whichever name the file has on disk.

Usage

sudo bash install.sh --install|--uninstall --controller|--collector|--mongodb|--redis|--mongosh|--all [OPTIONS]

The action and the component are both flags. There are no positional arguments.

FlagComponent
--mongodbDatabase. Install before the Controller.
--controllerController. One per deployment.
--collectorProbe. One per monitored network segment.
--redisRedis, used internally by the Controller.
--mongoshMongoDB shell client. Optional.
--allEverything above, for a single-host build.

Note: --collector installs the Probe. The script, the services and the logs all use the term collector, while the web interface calls it a Probe. They are the same component.

Which options a command needs depends on the component being installed. The options below cover a standard deployment.

OptionPurposeNeeded for
--controller-hostIP address or hostname of the Controller. Use localhost when the Controller is on the same machine.--controller, --collector
--api-keyAPI key generated in the Cloudmon web interface. Registers the component against the Controller.--collector
--db-usernameUsername for the Cloudmon database.--controller
--db-passwordPassword for the Cloudmon database. Must match what the script configures, or the web interface returns 502.--controller
--package-urlURL of the Cloudmon installation package. Stored afterwards in /usr/local/cloudmon/server/.env.--controller
--non-interactiveRuns straight through without prompting, once every required value has been supplied.Any component
-h, --helpPrints the full option reference for the version on disk.Any component

Note: option names can change between releases. Run sudo bash install.sh -h on the script you downloaded to confirm them. If a required option is missing, the script names it.

Install MongoDB

Install the database before the Controller. Skipping this is the most common cause of a failed Controller installation.

sudo bash install.sh --install --mongodb systemctl status mongod

MongoDB should report active (running).

Install the Controller

Supply the Controller address, the database credentials and the package URL. Add --non-interactive to run without prompts.

sudo bash install.sh --install --controller \ --controller-host <ip-or-localhost> \ --db-username <user> \ --db-password <password> \ --package-url <package-url> \ --non-interactive

Confirm every Controller sub-service started:

systemctl status cloudmon-controller@*

The Controller runs as a templated service, so the wildcard expands to all of its sub-services: controller, poller, agent manager, data engine and data aggregator. All should report active (running).

Open http://<controller-ip> in a browser, sign in with the credentials printed at the end of the installation output, and complete the registration form.

Note: if the database username or password does not match what the script configured, the web interface returns a 502. Correct the values in /usr/local/cloudmon/server/.env and restart the services.

Install a Probe

Install a Probe on each network segment holding devices to be monitored. Generate the API key first: in the Cloudmon web interface, open the Help menu, which shows the Controller address and the API key to use.

sudo bash install.sh --install --collector \ --controller-host <controller-ip> \ --api-key <key> \ --non-interactive

Confirm the services and the registration:

systemctl list-units --type=service | grep -i cloudmon

The Probe then appears under Settings > Monitoring > Probes with its current version. Upgrades are done from that page, not with this script.

Install Everything on One Host

For a single-host deployment or a lab build, --all installs every component in one pass. It still needs the Controller options, since the Controller is one of the components being installed.

sudo bash install.sh --install --all \ --controller-host localhost \ --db-username <user> \ --db-password <password> \ --package-url <package-url> \ --non-interactive

Uninstall

sudo bash install.sh --uninstall --collector sudo bash install.sh --uninstall --all

Important: uninstalling the Controller or MongoDB removes access to monitored data. Take a backup first.

Troubleshooting

SymptomLikely CauseFix
502 Bad Gateway.Usually a database credential mismatch.Correct it in /usr/local/cloudmon/server/.env, then run service cloudmon-controller@* restart.
Install fails where MongoDB existed before.Old credentials block registration.Run --uninstall --mongodb first. Additionally, remember to remove any remaining mongodb files or directories before reinstalling.
Welcome to nginx page.Default NGINX site is still enabled.https://support.cloudmon.ai/portal/en/kb/articles/cloudmon-ui-shows-welcome-to-nginx-troubleshooting-guide
Unable to locate installation logs.Logs are written to a different location per component.Check /var/log/cloudmon/server/, /collector/, /probe/, /agent/.

Still stuck? Raise a ticket at support.cloudmon.ai or email support@cloudmon.ai, attaching the log for the component that failed.