Installation#

SenHub Agent is a monitoring collector that runs on your infrastructure and collects metrics from various sources (servers, applications, network devices). It installs as a system service and runs in the background.

System Requirements#

PlatformVersionsArchitecture
WindowsServer 2016+, Windows 10+x64
LinuxRHEL 7+, Ubuntu 18.04+, Debian 10+x64, ARM64

Resource requirements: 1 CPU core, 512 MB RAM, 500 MB disk space.

Network requirements (online mode only): The agent needs outbound HTTPS access to the SenHub platform for configuration synchronization and metrics delivery. In offline mode, no outbound connections are required.

Obtaining the Agent#

Contact SenHub support (support@senhub.io) or download from the GitHub releases page. You will receive:

  • The agent binary for your platform (see naming convention below)
  • An authentication key (UUID format) for online mode
  • A license token (required for premium probes: Citrix, NetScaler, Redfish, etc.)

Binary Naming Convention#

Release artifacts include the OS and architecture in the filename:

PlatformBinary filename
Windows x86_64senhub-agent_windows_amd64.exe
Linux x86_64senhub-agent_linux_amd64
Linux ARM64senhub-agent_linux_arm64
macOS Intelsenhub-agent_darwin_amd64
macOS Apple Siliconsenhub-agent_darwin_arm64

The instructions below assume you have renamed the binary to senhub-agent.exe (Windows) or senhub-agent (Linux/macOS) after download. If you prefer to keep the original name, substitute it in every command (e.g. .\senhub-agent_windows_amd64.exe install …).

Windows Installation#

1. Prepare the binary#

Download senhub-agent_windows_amd64.exe, then copy it to your installation directory and rename it for convenience:

mkdir C:\SenHub
Copy-Item .\senhub-agent_windows_amd64.exe C:\SenHub\senhub-agent.exe

If you prefer to keep the original filename, replace senhub-agent.exe with senhub-agent_windows_amd64.exe in every command below.

2. Install the service#

Open a PowerShell terminal as Administrator and run:

cd C:\SenHub\
.\senhub-agent.exe install --authentication-key YOUR-UUID-KEY

This registers SenHub Agent as a Windows Service with automatic restart on failure.

For offline mode (local configuration only, no connection to SenHub platform):

.\senhub-agent.exe install --offline

To install with HTTPS enabled on the API:

.\senhub-agent.exe install --offline --enable-https --https-port 8443

3. Start the service#

.\senhub-agent.exe start

4. Verify the installation#

.\senhub-agent.exe status

You can also check the health endpoint:

Invoke-WebRequest -Uri "http://localhost:8080/health"

Expected response:

{"status":"ok","version":"0.1.87","uptime":"1m30s","probes_active":2,"metrics_cached":12}

Windows service running

Log file location#

Windows logs are stored at:

%ProgramData%\SenHub\logs\senhubagent.log

Typically: C:\ProgramData\SenHub\logs\senhubagent.log

Log rotation: 10 MB max per file, 5 backup files, 30-day retention, compressed.

Linux Installation#

1. Prepare the binary#

Download the binary for your architecture (senhub-agent_linux_amd64 or senhub-agent_linux_arm64), then rename it to senhub-agent for convenience:

sudo mkdir -p /opt/senhub/bin
sudo cp senhub-agent_linux_amd64 /opt/senhub/bin/senhub-agent
sudo chmod +x /opt/senhub/bin/senhub-agent

If you prefer to keep the original filename, replace senhub-agent with senhub-agent_linux_amd64 (or _arm64) in every command below.

2. Install the service#

sudo /opt/senhub/bin/senhub-agent install --authentication-key YOUR-UUID-KEY

This creates and registers a systemd service (senhub-agent.service) with automatic restart on failure (10-second delay between restarts).

For offline mode:

sudo /opt/senhub/bin/senhub-agent install --offline

To install with HTTPS enabled and a custom certificate hostname:

sudo /opt/senhub/bin/senhub-agent install --offline \
  --enable-https \
  --https-hosts "agent.company.com,192.168.1.100" \
  --https-port 8443

3. Start the service#

sudo /opt/senhub/bin/senhub-agent start

4. Verify the installation#

sudo /opt/senhub/bin/senhub-agent status

Or check the health endpoint:

curl http://localhost:8080/health

Log file location#

Linux logs are stored at:

/var/log/senhub/senhubagent.log

If this directory is not writable, logs fall back to the binary directory.

Log rotation: 10 MB max per file, 5 backup files, 30-day retention, compressed.

Installation Options#

The install command accepts the following options:

Authentication#

FlagDescription
--authentication-key KEYAgent authentication key (UUID) for online mode
--offlineInstall in offline mode (local configuration only)

Configuration#

FlagDefaultDescription
--config-path PATH./agent-config.yamlPath to the configuration file
--server-url URLSenHub platformCustom server URL (online mode)

HTTPS / TLS#

FlagDefaultDescription
--enable-httpsdisabledEnable HTTPS on the agent API
--https-port PORT8443HTTPS listening port
--https-hosts HOSTSlocalhost,127.0.0.1Hostnames for the auto-generated certificate (comma-separated)
--cert-file PATHauto-generatedPath to a custom TLS certificate file
--key-file PATHauto-generatedPath to a custom TLS private key file
--min-tls-version VER1.2Minimum TLS version (1.2 or 1.3)

Logging#

FlagDescription
--verbose or -vEnable verbose logging for all modules
--filter MODULESFilter debug logs by module prefix (implies verbose). Example: --filter probe.veeam

Environment Variables#

These environment variables can be used as alternatives to command-line flags:

VariableEquivalent Flag
SENHUB_KEY--authentication-key
SENHUB_SERVER_URL--server-url

What Happens During Installation#

When you run senhub-agent install, the agent:

  1. Checks for administrator/root privileges (required on Windows and Linux)
  2. Registers the system service (SenHub Agent on Windows, senhub-agent.service on Linux)
  3. Configures automatic restart on failure
  4. In offline mode: generates a default agent-config.yaml file with a unique agent key
  5. If --enable-https is specified: creates a certs/ directory with a self-signed certificate and private key (valid for 365 days)

Files Created#

FilePermissionsDescription
agent-config.yaml0600 (owner only)Agent configuration file
certs/agent-cert.pem0600 (owner only)TLS certificate (if HTTPS enabled)
certs/agent-key.pem0600 (owner only)TLS private key (if HTTPS enabled)

Service Management Commands#

The agent binary provides built-in service management:

CommandDescription
senhub-agent installInstall the system service
senhub-agent uninstallRemove the system service and clean up files
senhub-agent startStart the service
senhub-agent stopStop the service
senhub-agent restartRestart the service
senhub-agent statusShow service status, health, and resource usage
senhub-agent versionShow agent version and build information
senhub-agent runRun interactively in console mode (for debugging)
senhub-agent config checkValidate configuration file
senhub-agent updateCheck for updates
senhub-agent update --listList available versions
senhub-agent update VERSIONInstall a specific version

Console Mode#

The run command starts the agent interactively in the foreground (not as a service). This is useful for debugging:

senhub-agent run
senhub-agent run --verbose
senhub-agent run --filter probe.veeam

The agent auto-detects its mode from the configuration file. All logs are printed to the console. Press Ctrl+C to stop.

Use --filter to limit debug output to specific modules (see CLI Reference).

Updating the Agent#

Check for available updates:

senhub-agent update --list

Install a specific version:

senhub-agent update 0.1.87

Post-Installation Checklist#

After installing and starting the agent, verify the following:

  1. The service is running: senhub-agent status
  2. The health endpoint responds: curl http://localhost:8080/health
  3. The web dashboard is accessible: open http://localhost:8080/web/{key}/ in a browser
  4. Probes are collecting metrics: check the probes endpoint curl http://localhost:8080/api/{key}/info/probes
  5. The log file exists and is being written to

Next Steps#

After installation:

  1. Configure your monitoring probes (see Configuration)
  2. Activate your license if you have premium probes (see License section in Configuration)
  3. Set up HTTPS if required (see HTTP/HTTPS Configuration)
  4. Configure your monitoring system (PRTG, Nagios) to collect metrics (see Web Interface)

Uninstallation#

Windows:

.\senhub-agent.exe stop
.\senhub-agent.exe uninstall

Linux:

sudo /opt/senhub/bin/senhub-agent stop
sudo /opt/senhub/bin/senhub-agent uninstall

The uninstall command stops the service, removes the service registration, and cleans up generated files (configuration, certificates, logs).

SenHub Agent 0.1.87