Extra agents installation
During work with the system it may became necessary to monitor one host on several SAYMON servers. Since one agent can work with only one server, in this case it is necessary to install and set up on the host an extra agent for each extra server.
Extra agents and checks they conduct demand extra resources from the host. |
Linux
Agent copy creation
-
Copy the directory
/opt/saymon-agent
, for example, to/opt/saymon-agent-2
:$ sudo cp -r /opt/saymon-agent /opt/saymon-agent-2
-
Change the owner of the created directory:
$ sudo chown saymon:saymon /opt/saymon-agent-2
-
Delete all contents of the folder
/opt/saymon-agent-2/storage
:$ sudo rm -rf /opt/saymon-agent-2/storage
-
In the file
/opt/saymon-agent-2/conf/agent.properties
set up the new agent:$ sudo nano /opt/saymon-agent-2/conf/agent.properties
-
In the logging settings files replace everywhere
saymon-agent
withsaymon-agent-2
.$ sudo nano /opt/saymon-agent-2/conf/logback.xml $ sudo nano /opt/saymon-agent-2/conf/logback-upstart.xml
Copying script of service launch
-
Copy the file
/etc/systemd/system/saymon-agent.service
, for example, to/etc/systemd/system/saymon-agent-2.service
:$ sudo cp /etc/systemd/system/saymon-agent.service /etc/systemd/system/saymon-agent-2.service
-
In the new file
/etc/systemd/system/saymon-agent-2.service
replace the following lines:Environment=SAYMON_AGENT_LOGBACK_CONFIGURATION_FILE=/opt/saymon-agent/conf/logback-upstart.xml WorkingDirectory=/opt/saymon-agent ExecStartPre=/bin/bash -ec "/opt/saymon-agent/saymon-agent-updater.sh > /var/log/saymon/saymon-agent-updater.out 2>&1" ExecStart=/opt/saymon-agent/saymon-agent.sh > /var/log/saymon/saymon-agent.out 2>&1
with:
Environment=SAYMON_AGENT_LOGBACK_CONFIGURATION_FILE=/opt/saymon-agent-2/conf/logback-upstart.xml WorkingDirectory=/opt/saymon-agent-2 ExecStartPre=/bin/bash -ec "/opt/saymon-agent-2/saymon-agent-updater.sh > /var/log/saymon/saymon-agent-2-updater.out 2>&1" ExecStart=/opt/saymon-agent-2/saymon-agent.sh > /var/log/saymon/saymon-agent-2.out 2>&1
Windows
Agent copy creation
-
Copy the agent directory (
C:\Program Files (x86)\SAYMON Agent
by default), for example, toC:\Program Files (x86)\SAYMON Agent 2
. -
Delete all contents of the folder
C:\Program Files (x86)\SAYMON Agent 2\storage
. -
In the file
C:\Program Files (x86)\SAYMON Agent 2\conf\agent.properties
set up the new agent.
New agent service installation
-
In the file
C:\Program Files (x86)\SAYMON Agent 2\saymon-agent.xml
replace the lines:<id>saymon-agent</id> <name>SAYMON Agent</name> <description>SAYMON Agent</description>
with:
<id>saymon-agent-2</id> <name>SAYMON Agent 2</name> <description>SAYMON Agent 2</description>
-
Run the command line as administrator.
-
Go to the directory
C:\Program Files (x86)\SAYMON Agent 2
:$ cd "C:\Program Files (x86)\SAYMON Agent 2"
-
Install and launch the new agent service with following commands:
$ saymon-agent.exe install $ saymon-agent.exe start