Go to All Forums

Server Agent is broken on FreeBSD 12



I was excited to use Site24x7 for monitoring instead of the competition as it claims to support FreeBSD, which sadly is not quite the case. There are a number of issues with the agent on FreeBSD 12 (which has been out since 2018). Below is a list of issues I encountered, they should all be easy to fix. 

FreeBSD 12.1-STABLE r354923 GENERIC amd64
Python 3.6.9


1) I guess this is more of a python problem, but pycrypt does not compile, GMP is installed, adding the following CFLAGS fixes the issue export "CFLAGS=-I/usr/local/include -L/usr/local/lib" , all of the required python modules install just fine from the ports, perhaps the agent should use those instead.

building 'Crypto.PublicKey._fastmath' extension
creating build/temp.freebsd-12.1-STABLE-amd64-3.6
creating build/temp.freebsd-12.1-STABLE-amd64-3.6/src
cc -Wno-unused-result -Wsign-compare -Wunreachable-code -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/local/include/python3.6m -c src/_fastmath.c -o build/temp.freebsd-12.1-STABLE-amd64-3.6/src/_fastmath.o
src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found
# include <gmp.h>
1 error generated.
error: command 'cc' failed with exit status 1
ERROR: Command errored out with exit status 1: /opt/site24x7/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdqaliw8/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdqaliw8/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4t3dejon/install-record.txt --single-version-externally-managed --compile --install-headers /opt/site24x7/venv/include/site/python3.6/pycrypto Check the logs for full command output.


2) The agent runs as root, install script assumes a user has been magically created for it.

chown: site24x7-agent: illegal user name


3) Missing and inaccurate stats.

The CPU usage is always reported at 50%, even though the server is idle. Yet the per core report is correct.

Processes do not display, yet when you click on tools you can see them there.

Various stats are missing, such as context switches and interrupts.







Like (3) Reply
Replies (5)

Re: Server Agent is broken on FreeBSD 12

Hi Mike ,

      Thanks for the feedback.

#1) PyCrypto issue - Python modules are installed using pip (a package installer for python). We tried FREEBSD v12 + Python 3.6.9 in our test environment and found no issues while installing the python modules. Please contact support@site24x7.com to set up a remote session and look into this issue.

#2) chown issue - This will be fixed and updated in the next agent version release.

#3) Missing and inaccurate stats

  • CPU issue - This will be fixed and updated in the next agent version release.
  • Processes do not appear - Click on the Discover Process button in the Processes tab and check the active processes that are discovered from the server. You might be able to find the process and click Add+ to add it for monitoring.
  • Stats such as context switches and interrupts are missing - Please send the agent logs to support@site24x7.com  to further analyze the issue.
    Note: Logs will be present under the folder : /opt/site24x7/monagent/logs

Hope this helps. We shall post in this thread once the updated agent version is live. For further queries, if any, please comment below. 




Like (0) Reply

Re: Re: Server Agent is broken on FreeBSD 12

I'm looking forward to trying the new version.
1) This is a BSD/Python issue that has been reported by people previously. Simple fix though, just add /usr/local/include and lib to CFLAGS before compiling, perhaps you could add that to your install script, it should not break anything for cases where it does work.
2) Great.
3) I have emailed the logs. (It appears to me that the agent is collecting the data, but it was not visible on your website)
Like (0) Reply

Re: Re: Re: Server Agent is broken on FreeBSD 12


We have fixed these issues in our latest agent release. Please contact support@site24x7.com for further assistance.


Like (0) Reply

Re: Re: Re: Re: Server Agent is broken on FreeBSD 12

It is still broken, same exact issues.

I downloaded the agent from staticdownloads.site24x7.com/server/Site24x7InstallScript.sh .


[root@fbsd12 ~]# sh Site24x7InstallScript.sh -i -key=secret
curl detected
Detected OS : FreeBSD
Detected os arch : amd64
Hybrid agent support needed
Download url : staticdownloads.site24x7.com/server/Site24x7MonitoringAgent.install

      |																			  |
      |							      Site24x7 Server Monitoring Agent Installation					         |
      |																			  |

      --------------------------------------------------------Downloading install file for Site24x7MonitoringAgent.install----------------------------------------------------------

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 12.1 (1201502), FreeBSD-style, stripped
100 1720k  100 1720k    0     0   814k      0  0:00:02  0:00:02 --:--:--  814k
Site24x7InstallScript.sh: [[: not found
Site24x7InstallScript.sh: [[: not found
tar detected
Site24x7MonitoringAgent.install: line 258: /opt/site24x7/site24x7install.log: No such file or directory
Extracting Binaries From Tar File
--2019-12-11 04:04:32--  staticdownloads.site24x7.com/server/linuxagent.tar.gz
Resolving staticdownloads.site24x7.com (staticdownloads.site24x7.com)...
Connecting to staticdownloads.site24x7.com (staticdownloads.site24x7.com)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1722174 (1.6M) [application/octet-stream]
Saving to: '/opt/site24x7/site24x7agent.tar.gz'

/opt/site24x7/site24x7agent.tar.gz      100%[===============================================================================>]   1.64M  1.08MB/s    in 1.5s    

2019-12-11 04:04:34 (1.08 MB/s) - '/opt/site24x7/site24x7agent.tar.gz' saved [1722174/1722174]

Successfully Extracted Agent Files to The Directory : /opt/site24x7
Detected shell ---> bash
Setting up virtual environment
/opt/site24x7/monagent/pypi/virtualenv.py:1086: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
compile python packages : False
Installing python packages using pip
Collecting pip
  Cache entry deserialization failed, entry ignored
  Using cached files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl
Collecting setuptools
  Downloading files.pythonhosted.org/packages/54/28/c45d8b54c1339f9644b87663945e54a8503cfef59cf0f65b3ff5dd17cf64/setuptools-42.0.2-py2.py3-none-any.whl (583kB)
    100% |████████████████████████████████| 583kB 1.6MB/s 
Collecting wheel
  Using cached files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-19.3.1 setuptools-42.0.2 wheel-0.33.6
  ERROR: Command errored out with exit status 1:
   command: /opt/site24x7/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kk33ngsg/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kk33ngsg/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-baridqfl --python-tag cp38
       cwd: /tmp/pip-install-kk33ngsg/pycrypto/
  building 'Crypto.PublicKey._fastmath' extension
  creating build/temp.freebsd-12.1-STABLE-amd64-3.8
  creating build/temp.freebsd-12.1-STABLE-amd64-3.8/src
  cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -pipe -march=native -fstack-protector-strong -fno-strict-aliasing -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/local/include/python3.8 -c src/_fastmath.c -o build/temp.freebsd-12.1-STABLE-amd64-3.8/src/_fastmath.o
  src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found
  # include <gmp.h>
  1 error generated.
  error: command 'cc' failed with exit status 1
chown: site24x7-agent: illegal user name
Site24x7 monitoring agent watchdog service started successfully (process id : 1726)
Site24x7 monitoring agent service started successfully (process id : 1749)

Have more servers? Try our bulk installation technique using SSH. Refer link : www.site24x7.com/app/client#/admin/inventory/monitors-configure/SERVER/site24x7remoteinstall

Like (0) Reply

Re: Re: Re: Re: Re: Server Agent is broken on FreeBSD 12

Hi Mike,

We had a temporary issue in our build update. Kindly try downloading and installing our latest agent now (version 17.5.3) and let us know.




Like (0) Reply

Was this post helpful?