On-Prem Managing Services

Managing services for on-prem, self-hosted customers after installation.

Overview

After installation, services are managed with the unified service manager script $agilesec_install_dir/scripts/manage.sh.

manage.sh provides a centralized way to manage all platform services:

cd $agilesec_install_dir
./scripts/manage.sh [action] [options] [services...]

If no specific services are specified, the action will be applied to all installed services.

Optional: systemd

systemd is an optional Linux service manager not enabled by default. systemd requires more resources and introduces more system complexity than default binary service management. Advanced users may utilize systemd for more dynamic service handling if needed.

Note: systemd does require sudo privileges or root login to start services.

Enable systemd

The startup script startup.sh can be used to enable systemd after AgileSec installation:

sudo $agilesec_install_dir/scripts/startup.sh systemd enable

Verify systemd installation

Verify if all new kf_agilesec* units are installed and enabled:

systemctl list-unit-files | grep kf_agilesec

start systemd services

After enabling systemd, users can either continue to use manage.sh for managing services or use systemd commands.

Start all services and check status with manage.sh:

sudo $agilesec_install_dir/scripts/manage.sh start
sudo $agilesec_install_dir/scripts/manage.sh status

Disable systemd

systemd enablement is persistent. systemd can be disabled by running the following:

sudo $agilesec_install_dir/scripts/startup.sh systemd disable

manage.sh Actions

Action

Description

start

Start services

stop

Stop services

restart

Stop and then start services

reload

Reload service configuration where supported

status

Check status of services

list

List available services

help

Display help message

manage.sh Options

Option

Description

-d, --debug

Enable debug mode (show service output in console).

-s, --silent

Enable silent mode. No output is displayed.

-e, --exclude

Exclude service(s) listed after this flag from the action. (Comma-separated list is expected.)

--disable-healthcheck

Disable health check cron (comment out crontab entry) to prevent restarting services during the upgrade.

--enable-healthcheck

Re-enable health check cron (uncomment crontab entry).

-h, --help

Display helpful script information.

AgileSec Platform Services

Service

Description

haproxy

HAProxy Load Balancer

opensearch

OpenSearch Search Engine

opensearch-dashboards

OpenSearch Dashboards

mongodb

MongoDB Server

kafka

Kafka Server

indexing

Indexing Microservice

webui

Web UI Microservice

api

Web API Microservice

sm

Security Manager Microservice

analytics-manager

Analytics Manager Microservice

ingestion

Ingestion Microservice

scheduler

Scheduler Microservice

td-agent

Fluentd Data Collector. Deprecated unless backwards compatibility with v2 sensors is enabled.

manage.sh Usage Examples

  • To start all services:

Java
./manage.sh start
  • To start only OpenSearch with debug output:

Java
./manage.sh start -d opensearch
  • To start multiple specific services:

Java
./manage.sh start opensearch opensearch-dashboards

The script automatically resolves dependencies, starting OpenSearch first (as it's a dependency for other services) before starting any dependent services.

  • To stop all services:

Java
# Stop all installed services
./manage.sh stop
  • To stop only specific services:

Java
./manage.sh stop haproxy indexing

The script stops services in reverse dependency order to ensure a clean shutdown.

  • To Restart all installed services:

Java
# Restart all installed services
./manage.sh restart
  • To restart only OpenSearch:

Java
./manage.sh restart opensearch
  • To reload configuration:

Java
./manage.sh reload haproxy
  • To list status of all services:

Java
./manage.sh status
  • To check status of specific services:

Java
./manage.sh status opensearch indexing
  • To list all available services:

Java
./manage.sh list

Note: If HAProxy is configured to use a privileged port (< 1000), you will need root privileges to start or stop it. The script will display the appropriate command to run with sudo.