Launching on Various Operating Systems
NOTE: This document is for information on starting a 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
$ vagrant ssh amp --command 'sudo systemctl status amp'
$ 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'
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
/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
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
/etc/amp
.
Logs are written to /var/log/amp/amp.info.log
and /var/log/amp/amp.debug.log
.
$ ./bin/status amp
$ ./bin/stop amp
$ ./bin/start amp
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.