Edge Delta on macOS
7 minute read
Standard Installation
Select the macOS template option in the following steps:
- Click Pipelines.
- Click New Fleet.
- Select Edge Fleet.
- Optionally, expand Advanced Fleet Configuration and select a pipeline with a configuration you want to duplicate.
- Click Continue.
- Select the appropriate template and click Continue.
- Specify a name to identify the Fleet.
- Click Generate Config.
- Execute the installation commands, they include the unique ID for the Fleet.
- Expand the namespaces and select the input sources you want to monitor.
- Select the Destination Outputs you want to send processed data to, such as the Edge Delta Observability Platform.
- Click Continue.
- Click View Dashboard.
The installation process will deploy Edge Delta into the /opt/edgedelta/agent/
path. Additionally, the edgedelta
system service will start automatically with default configurations.
The ED_ENV_VARS
special variable is used in the installation command to pass one or more persistent environment variables to the Fleet, which will run as the system service:
sudo ED_API_KEY=<your Pipeline ID> \
ED_ENV_VARS="MY_VAR1=MY_VALUE_1,MY_VAR2=MY_VALUE_2" \
bash -c "$(curl -L https://release.edgedelta.com/release/install.sh)"
To view a full list of variables that the fleet supports, see Environment Variables.
Install in a Custom Path
You can use the ED_INSTALL_PATH
installation variable to install the agent in a custom path rather than the default path. Add the environment variable to the installation instructions provided by the Edge Delta app, for example:
sudo ED_API_KEY=12345 ED_INSTALL_PATH="/opt/custom/edgedelta/agent" bash -c "$(curl -L https://release.edgedelta.com/release/install.sh)"
Script
The https://release.edgedelta.com/release/install.sh release package detects your architecture and operating system, and then chooses and downloads the latest version of the fleet self-extracting script, which includes the content to be extracted at the end of the script.
The script’s content and extractable scripts are available for inspection at https://release.edgedelta.com/release/install.sh.
To check the package’s integrity, the script header will extract commands and content checksum.
The script will fail if the content has been tempered with.
For example, the v0.1.19/edgedelta-linux-amd64.shheader includes:
CRCsum="1944320463"
MD5="a98b537444f18d97a06b428b9cb223ce"
If the package has not been tempered with, then the script will extract the fleet into a temporary directory, set the apikey file with the given ED_API_KEY environment variable, and run unix_install.sh
. This command will copy the content to /opt/edgedelta/agent/
and run the following commands to install edgedelta as a system service and start the service:
/edgedelta -s install
./edgedelta -s start
(Alternative) Offline Installation
- Follow the steps outlined in Standard Installation in a non-production machine with the same architecture and OS as the target production machine.
- Use the following command to compress the fleet folder:
sudo tar -czvf agent_archive.tgz /opt/edgedelta
- Copy
agent_archive.tgz
to the target machine via SSH or other means. - Use the following command to extract the archive under
/opt/edgedelta
:
sudo tar -xzvf agent_archive.tgz -C /
- Use the following command to install and start the service:
cd /opt/edgedelta/agent/
sudo ./edgedelta -s install
sudo ./edgedelta -s start
Common Issues
Protected Folders
In macOS, certain folders are protected from app access by default: Documents, Downloads, Desktop, iCloud Drive and network volumes. This may prevent the agent from tailing a file saved in one of those locations. You can update System Settings - Privacy & Security - Files & Folder to grant access to a specific folder to Edge Delta, or add Edge Delta to the Full Disk Access list.
Troubleshooting
Description | Command |
---|---|
To check the status of the Fleet, switch to root user then inspect Edge Delta’s status: | sudo su launchctl list edgedelta |
To check the Fleet’s log file for any errors that may indicate an issue with the Fleet, configuration, or deployment settings, run the following command on the Edge Delta service log file path: | cat /var/log/edgedelta/edgedelta.log |
To check the Fleet’s configuration file to ensure the configuration does not contain any issue, run the following command on the configuration file path: | cat /opt/edgedelta/agent/config.yml |
Upgrading
To upgrade the Fleet, you run the installation command that you previously used to deploy the Fleet.
Uninstalling
The following script uninstalls the fleet as the root user:
#!/bin/bash
set -uex
# Set the default installation path
install_path="/opt/edgedelta/agent"
# Check and update for any custom installation path
if [[ ! -z "${ED_INSTALL_PATH:-}" ]]; then
install_path="$ED_INSTALL_PATH"
fi
# Verify the architecture is supported
BITS=$(getconf LONG_BIT)
if [ "$BITS" == "32" ]; then
echo "This script does not support 32-bit OS. Contact info@edgedelta.com"
exit 1
fi
echo "Stopping agent service if it is running"
if sudo $install_path/edgedelta -s stop; then
echo "Agent service stopped successfully."
else
echo "Failed to stop agent service or it was not running."
fi
echo "Removing agent service if it is installed"
if sudo $install_path/edgedelta -s uninstall; then
echo "Agent service uninstalled successfully."
else
echo "Failed to uninstall agent service or it was not installed."
fi
# Remove the installation directory
echo "Removing edgedelta folder"
if sudo rm -rf "$install_path"; then
echo "Successfully removed the edgedelta directory."
else
echo "Failed to remove the edgedelta directory. Manual inspection may be required."
fi
# Get the directory where the script was executed
script_dir=$(pwd)
# Remove lingering installer files from the script's directory
echo "Checking and removing lingering installer files"
for file in $script_dir/edgedelta-*macosx*.sh; do
if [ -f "$file" ]; then
rm -f "$file"
echo "Removed lingering installer file: $file"
fi
done
# Remove leftover configuration and log directories
echo "Checking and removing leftover configuration files in /etc"
sudo find /etc -name '*edgedelta*' -exec rm -rf '{}' +
echo "Checking and removing leftover logs in /var/log"
sudo find /var/log -name '*edgedelta*' -exec rm -rf '{}' +
# Additional checks for other typical directories
echo "Checking and removing leftover files in /usr/local/etc, if any"
sudo find /usr/local/etc -name '*edgedelta*' -exec rm -rf '{}' + 2>/dev/null || true
echo "Checking and removing leftover files in /usr/local/var, if any"
sudo find /usr/local/var -name '*edgedelta*' -exec rm -rf '{}' + 2>/dev/null || true
# Verify no processes are still running
process_check=$(ps aux | grep '[e]dgedelta' | grep -v 'uninstall_edgedelta.sh' || true)
if [ -n "$process_check" ]; then
echo "Warning: The following Edge Delta processes are still running:"
echo "$process_check"
else
echo "No running Edge Delta processes detected."
fi
echo "Edge Delta agent and all related components have been removed."
Script Functions
This script performs the following actions:
- Setting Defaults: By default, it assumes the installation path as
/opt/edgedelta/agent
. - Check System Architecture: Ensure that the OS is 64-bit, as 32-bit systems are not supported.
- Stop and Uninstall the Service: Attempts to stop and uninstall the Edge Delta service if it exists.
- Remove Installation Directory: Deletes the /opt/edgedelta/agent directory.
- Dynamic Path Handling: Determines and uses the current working directory to locate and remove any lingering installer script, such as edgedelta-macosx-arm64.sh.
- Configuration and Log Cleanup: Searches common directories (/etc, /var/log, etc.) for any remaining Edge Delta configuration and log files, removing them if found.
- Process Verification: Confirms no Edge Delta processes remain running after uninstallation.
Running the Script
To run this script:
- Open the same directory in which you executed the install command (containing the
edgedelta-macosx-arm64.sh
file that was created during installation). - Save the uninstall script using a suitable name such as
uninstall_edgedelta.sh
. - Give permission to the script:
chmod +x uninstall_edgedelta.sh
- Run the script:
sudo ./uninstall_edgedelta.sh
Or if you set an ED_INSTALL_PATH environment variable during installation, used a custom path:
sudo ED_INSTALL_PATH="/opt/custom/edgedelta/agent" ./uninstall_script.sh
Manual Uninstall Commands
To uninstall manually, execute the following commands one at a time in the same folder used to install the agent:
- Stop the Edge Delta Agent Service: First, ensure the Edge Delta agent service is stopped. Run the following command, assuming the service is installed in the default location:
sudo /opt/edgedelta/agent/edgedelta -s stop
- Uninstall the Edge Delta Agent Service: Uninstall the Edge Delta agent service:
sudo /opt/edgedelta/agent/edgedelta -s uninstall
- Remove the Installation Directory:
Delete the Edge Delta installation directory, assumed to be in /opt/edgedelta/agent, but use the directory you specified if you passed in
ED_INSTALL_PATH
during installation:
sudo rm -rf /opt/edgedelta/agent
- Remove any Installer Files: If you have downloaded and run the Edge Delta script like edgedelta-macosx-arm64.sh, remove it from the directory where it resides (replace <path_to_installer> with the actual path location):
rm -f <path_to_installer>/edgedelta-macosx-arm64.sh
- Clean Up Configuration and Log Files: Search and remove configuration or log files related to Edge Delta. Execute the following commands:
sudo find /etc -name '*edgedelta*' -exec rm -rf '{}' +
sudo find /var/log -name '*edgedelta*' -exec rm -rf '{}' +
sudo find /usr/local/etc -name '*edgedelta*' -exec rm -rf '{}' + 2>/dev/null || true
sudo find /usr/local/var -name '*edgedelta*' -exec rm -rf '{}' + 2>/dev/null || true
- Verify No Processes are Running: Check that no Edge Delta processes are still running:
ps aux | grep '[e]dgedelta'
If any processes appear (other than the grep command itself), you can kill them using:
sudo kill <PID>
Replace