- Prerequisites
- Build Instructions
- Installation
- Clone the infrastructure-agent and
infrastructure-agent-linux-plugins
GitHub repositories.
git clone https://github.com/ITRS-Group/infrastructure-agent.git
git clone https://github.com/ITRS-Group/infrastructure-agent-linux-plugins.git
- Enter the infrastructure-agent repository and create a symlink to 'infrastructure-agent-linux-plugins'
cd infrastructure-agent
ln -s ../infrastructure-agent-linux-plugins .
- Locate the path of the Python 3.9 binary.
- On most systems this is likely to be under
/usr/bin
but this will vary
- Run the compilation command, passing in the path of your Python binary
# Note: 'sudo' is needed to compile plugins from monitoring-plugins
# This will also create an 'infra-agent' user and group on the build machine
sudo make clean tar PYTHON=/usr/bin/python3.9
- The compiled agent can be found at
infrastructure-agent.tar.gz
.
- Copy the compiled tarball to the target machine and extract it to the desired installation directory.
In this example, the default location of
/opt/itrs/infrastructure-agent
is used:
mkdir /opt/itrs
chown root:infra-agent /opt/itrs
tar -xf infrastructure-agent.tar.gz -C /opt/itrs/
- Validate that the agent works by calling the executable directly. Note that it should error out due to configuration issues.
/opt/itrs/infrastructure-agent/bin/infrastructure-agent
- To make sure all plugins that require root execution work as expected, it is necessary to mark them with the 'SUID' permission with the following command. The following should also be applied to any custom plugins that need to be executed as root:
# Setuid for special plugins
chmod u+s /opt/itrs/infrastructure-agent/plugins/check_dhcp
chmod u+s /opt/itrs/infrastructure-agent/plugins/check_icmp
- Set up the
systemd
service.
cp /opt/itrs/infrastructure-agent/installer/infrastructure-agent.service /etc/systemd/system/infrastructure-agent.service
/bin/systemctl enable infrastructure-agent
/bin/systemctl restart infrastructure-agent
- Follow the steps on Installation and Configuration
in the Opsview Knowledge Center to finish configuring your agent.
- Validate the Agent is operational.
/bin/systemctl status infrastructure-agent