cloudsoft.io

Starting, Stopping and Monitoring Cloudsoft AMP

NOTE: This document is for information on starting an Cloudsoft AMP Server. For information on using the amp Client CLI to access an already running amp Server, refer to Client CLI Reference.

$ vagrant up amp
You can check if amp has launched successfully with the command:
$ vagrant ssh amp --command 'sudo systemctl status amp'
The application logs can be tailed using:
$ vagrant ssh amp --command 'sudo tail -f /var/log/amp/amp.info.log'
$ vagrant ssh amp --command 'sudo tail -f /var/log/amp/amp.debug.log'
location: localhost
AMP is managed as a system service using the appropriate tool for your system (e.g. systemd). When the AMP package is installed, the amp service is started for you. Now, as root (or using sudo), you can monitor AMP's status, and stop and start it, with the following commands for systemd:
$ systemctl status amp
$ systemctl stop amp
$ systemctl start amp
Configuration can be edited at /etc/amp/. Logs are written to /var/log/amp/amp.info.log and /var/log/amp/amp.debug.log. Note: Some versions of CentOS / RHEL may use Upstart instead. These instructions may be more relevant.
AMP is managed as a system service using the appropriate tool for your system (e.g. upstart). When the AMP package is installed, the amp service is started for you. Now, as root (or using sudo), you can monitor amp's status, and stop and start it, with the following commands for upstart:
$ status amp
$ stop amp
$ start amp
Configuration can be edited at /etc/amp. Logs are written to /var/log/amp/amp.info.log and /var/log/amp/amp.debug.log.
To start Cloudsoft AMP (assuming you are in the cloudsoft-amp-karaf-4.0.0-20160830.1700 directory):
$ ./bin/status amp
$ ./bin/stop amp
$ ./bin/start amp
Configuration can be edited at etc/. Logs are written to data/log/amp.info.log and data/log/amp.debug.log.

Further details

For further details on the default configuration, see Setting web credentials.

Please also take a look at the security guidelines here.

The scripts above are the recommended way to control AMP, but for reference the PID is recorded in instances/instance.properties, in addition to any locations that may be used by system services frameworks (e.g. /var/run/amp.pid).

This should lead to a fairly straightforward integration with many monitoring tools - the monitoring tool can discover the expected PID, and can execute the start or stop commands shown above as necessary.

For example, here is a fragment of a monitrc file as used by Monit, for an AMP .tar.gz distribution unpacked and installed at /opt/amp:

check process Cloudsoftamp with pidfile /opt/amp/pid_java
    start program = "/bin/bash -c '/opt/amp/bin/start & disown'" with timeout 10 seconds
    stop  program = "/bin/bash -c '/opt/amp/bin/stop'"

In addition to monitoring the AMP process itself, you will almost certainly want to monitor resource usage of AMP. In particular, please see the Requirements section for a discussion on AMP’s disk space requirements.