Servers Alive Remote Agent for Unix/Linux/BSD/*nix


Introduction

The download file contains the c-code to our remote agent for *nix.

Installation


1. Build

1.1 Prerequisites

1.1.1 Ubuntu/Debian

#sudo apt-get install build-essential
#sudo apt-get install cmake
#sudo apt-get install libboost-all-dev
#sudo apt-get install libssh-dev
#sudo apt-get install libsnmp-dev

1.1.2 Centos/Rhat/Amazon Linux 2

(on Amazon Linux 2 you will need to add EPEL repository in order to get the libssh-devel part, the command to use is: sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm)
#sudo yum install cmake
#sudo yum install gcc
#sudo yum install gcc-c++
#sudo yum install rpm-build
#sudo yum install boost-devel
#sudo yum install boost-static
#sudo yum install openssl-devel
#sudo yum install libssh-devel
#sudo yum install net-snmp-devel

1.1.3 FreeBSD/OpenBSD

For OpenBSD/FreeBSD build use ports files provided.


1.2 Build


1.2.1 Linux

a) Extract the sources and create build directory:
#tar zxvf woap2-2.0.1.tar.gz
#mkdir woap2-build
#cd woap2-build/
b) Run CMake to configure build. There are 2 options which can be set.
The packer type and the init system.

Possible -DPACKER values: deb or rpm or omit completely if no packer required
Possible -DRC_SYSTEM values: systemd, sysv, rcng (FreeBSD), openbsd_rc
Examples:
Systemd debian:
#cmake -DCMAKE_BUILD_TYPE=Release -DPACKER=deb -DRC_SYSTEM=systemd ../woap2
Systemd CentOS:
#cmake -DCMAKE_BUILD_TYPE=Release -DPACKER=rpm -DRC_SYSTEM=systemd ../woap2
c) Build it.
#cmake --build . --target woap2 -- -j 2
d) Package it.
#cmake --build . --target package
e) CentOS packaging.
Unfortunately, CentOS version of CMake is affected with the bug that renders the rpm produced unusable (it simply doesn't install). We need to do some manual work:
#cd _CPack_Packages/Linux/RPM
Edit the file SPECS/woap2.spec
#vim SPECS/woap2.spec
Remove the following lines in the %files section:
%dir "/lib"
%dir "/lib/systemd"
%dir "/lib/systemd/system"
and other system %dir entries not pointing to the "/etc/woap2"
The exact list of the lines to be removed depends on the CMake version being used.
If there are no such lines, just use the RPM produced by the CMake.
Rebuild the package using the corrected spec file (replace 2.0.1 with the actual version):
#rpmbuild -v --buildroot /path/to/woap2-build/_CPack_Packages/Linux/RPM/woap2-2.0.1-Linux -bb SPECS/woap2.spec
Move up the tree and copy new package
#cd ../../../
#mv _CPack_Packages/Linux/RPM/woap2-2.0.1-Linux.rpm ./woap2-2.0.1-Linux.rpm

1.2.2 FreeBSD

a) Extract the sources and cd to the woap2 directory.
#tar zxvf woap2-2.0.1.tar.gz
#cd woap2
b) Add local category to your ports tree.
Add it to the /usr/ports/Makefile.local
#sudo sh -c 'cat freebsd/ports/Makefile.local >> /usr/ports/Makefile.local'
Create subdirectory
#sudo mkdir /usr/ports/local
Create a category Makefile
#sudo sh -c 'cat freebsd/ports/local/Makefile > /usr/ports/local/Makefile'
Copy port to the category
#sudo cp -r freebsd/ports/local/woap2/ /usr/ports/local/woap2
Now you can move to the parent directory and remove the woap2 directory
#cd ../
#rm -rf woap2
c) Copy the distribution to the distfiles folder.
#sudo cp woap2-2.0.1.tar.gz /usr/ports/distfiles/
d) Now you can build a port as any other port.
#cd /usr/ports/local/woap2/
#sudo make makesum
#sudo make 
e) If you want to install immediately
f) Make a package
#sudo make package
And copy it somewhere if you want woap2 installed on other FreeBSD machines.
#cp /usr/ports/local/woap2/work/pkg/woap2-2.0.1.txz /path/to/convenient/directory

1.2.3 OpenBSD

a) Extract the sources and cd to the woap2 directory.
#tar zxvf woap2-2.0.1.tar.gz
#cd woap2
Become a root
#su
b) Add local category to your ports tree.
Add it to the /usr/ports/Makefile.local
#cat openbsd/ports/Makefile.local >> /usr/ports/Makefile.local
Create subdirectory
#mkdir /usr/ports/local
Create a category Makefile
#cat openbsd/ports/local/Makefile > /usr/ports/local/Makefile
Copy port to the category
#cp -r openbsd/ports/local/woap2/ /usr/ports/local/woap2
Now you can move to the parent directory and remove the woap2 directory
#cd ../
#rm -rf woap2
c) Copy the distribution to the distfiles folder.
#cp woap2-2.0.1.tar.gz /usr/ports/distfiles/
d) Now you can build a port as any other port.
#cd /usr/ports/local/woap2/
#make makesum
#make 
e) If you want to install immediately
#make install
f) Make a package
#make package
And copy it somewhere if you want woap2 installed on other FreeBSD machines.
#cp /usr/ports/packages/amd64/all/woap2-2.0.1.tgz /path/to/convenient/directory/


2. Installation


2.1 Debian install

#sudo dpkg -i woap2-2.0.1-Linux.deb
dpkg will posibly complain about missing dependencies, in which case do
#sudo apt-get -f install

2.2 CentOS install

Runtime dependencies will install from OS repo automatically.
#sudo yum install ./woap2-2.0.1-Linux.rpm

2.3 FreeBSD installation

Use a binary package
#sudo pkg install /path/to/woap2-2.0.1.txz
or follow build instructions and install from ports via make install.

2.4 OpenBSD installation

Use a binary package
#pkg_add /path/to/woap2-2.0.1.tgz
or follow build instructions and install from ports via make install.



3. Configuration


Edit the config file.
On Linuxes and OpenBSD it will be located in the /etc/woap2 directory
FreeBSD uses /usr/local/etc/woap2 directory



4. Running


4.1 Systemd (Centos 7, Debian 8, Ubuntu 16.04)

* Enable the service
#sudo systemctl enable woap2
* Check status:
#sudo systemctl status woap2
* Start:
#sudo systemctl start woap2
* Stop:
#sudo systemctl stop woap2
* View Logs:
#sudo journalctl -u woap2

4.2 SysV init (Debian 7, Ubuntu 14.04)


* Enable the service
#sudo update-rc.d woap2 defaults
* Check status:
#sudo service woap2 status
* Start:
#sudo service woap2 start
* Stop:
#sudo service woap2 stop
* View Logs:
#sudo tail /var/log/woap2.log

4.3 FreeBSD


* Enable the service
Add the following line to your /etc/rc.conf:
woap2_enable="YES"
The rest is similar to the SysV init

4.4 SysV init


* Enable the service
#rcctl enable woap2
* Check status:
#rcctl check woap2
* Start:
#rcctl start woap2
* Stop:
#rcctl stop woap2
* View Logs:
#sudo tail /var/log/woap2.log


in some cases a reboot of the system is needed!


test if you can connect to it on port 20012
(SSH <ip> 20012)

Default Username/password/port
username: woap
password: heslo
port:20012

Defaults can be changed in the woap.ini file


OS updates

June 2022: working fine on Amazon Linux 2

Order online Servers Alive to monitor your network
Program Features
What's new in v10.x?
Download
Document Collection
Template examples
Free add-ons
License Agreement
Prices from 199 EURO
Different editions

Download Free Trial Servers Alive

from our main website
or download it from one of our mirror download sites around the world.
If you're a business owner or manager, you know that network outages can affect your income, brand integrity, and bottom line. Here's a non-technical description of how Servers Alive can monitor your network and alert your IT staff when there's a problem.

Servers Alive - Like Life Insurance For Your Business - Only Cheaper

Try Before You Buy!

Try Servers Alive for FREE with no time limit....
You can try all of the features to see if the program meets your needs.
Download page

Customer praise

"Our Network group bought HP OpenView a year before my Database group bought SA. They paid $195,000, I paid $90. My group lets them know when the network is down. SA is so good it's scary."

Anonymous