--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/1528c9c2-632b-4348-9e6a-991924f5dc37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# make -C src clean
# make -C TARGET=agent
Updating your rebuilt agent after cleaning it.# ./install.sh
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/5c72d288-1b17-4192-8712-b5d7b70947ab%40googlegroups.com.
This must show you the watchers enabled by Inotify in your system.# lsof | grep -i inotify
I hope it helps.# make -C src TARGET=agent USE_INOTIFY=yes
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/1a0e43dd-0b83-44bc-875f-1f353456353b%40googlegroups.com.
It is possible that the installed Inotify package you have installed is only the client package to communicate with the kernel component, that doesn`t ensure that the Kernel supports Inotify.# find . -name "inotify.h"
If the output of that command is "not" could mean two things: It is not a Linux distribution, or in your custom OS there is not installed 'uname' (which could explain why the agent is not compiled whit Inotify).# sh -c 'uname -s 2>/dev/null || echo not'
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/fc411827-77e0-495b-9903-a329870de84d%40googlegroups.com.
On the other hand, in the Makefile it checks if we are in a Linux system to enable that flag:/* Check for real time flag */if (opts & CHECK_REALTIME) {#if defined(INOTIFY_ENABLED) || defined(WIN32)realtime_adddir(dir_name);#elsemwarn("realtime monitoring request on unsupported system for '%s'", dir_name);#endif}
So I think something is not working when building the Wazuh agent, could you move to the Wazuh source code folder where you built the agent and run this command?uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')...ifeq (${uname_S},Linux)DEFINES+=-DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
It should show us all the settings and flags enabled when building the agent. Here we have the output of this command in a Linux system:# make -C src settings
Where we can see the flags "-DLinux -DINOTIFY_ENABLED".localhost wazuh (3.3) # make -C src settingsmake: se ingresa al directorio `/root/wazuh/src'General settings:TARGET: failtargetV:DEBUG:DEBUGADPREFIX: /var/ossecMAXAGENTS: 14000REUSE_ID: noDATABASE:ONEWAY: noCLEANFULL: noUser settings:OSSEC_GROUP: ossecOSSEC_USER: ossecOSSEC_USER_MAIL: ossecmOSSEC_USER_REM: ossecrLua settings:LUA_PLAT: posixUSE settings:USE_ZEROMQ: noUSE_GEOIP: noUSE_PRELUDE: noUSE_INOTIFY: noUSE_BIG_ENDIAN: noMysql settings:includes:libs:Pgsql settings:includes:libs:Defines:-DMAX_AGENTS=14000 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DENABLE_SYSC -DENABLE_CISCATCompiler:CFLAGS -Wl,--start-group -O2 -DMAX_AGENTS=14000 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DENABLE_SYSC -DENABLE_CISCAT -pipe -Wall -Wextra -I./ -I./headers/ -Iexternal/openssl/includeLDFLAGS -Lexternal/openssl/ -lm -lssl -lcrypto -pthread -lrt -ldlCC ccMAKE makemake: se sale del directorio `/root/wazuh/src'
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/79bfcf1e-96e0-4479-b464-9e450b5bc733%40googlegroups.com.