* win32/modules/pandora_module_exec.cc,
win32/pandora_windows_service.cc: Fixed get module output part of over 4096 byte.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4305 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/modules/pandora_module_factory.cc, unix/pandora_agent: Changed
module_post_process to module_postprocess to match the documentation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4044 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/modules/pandora_module.h,
win32/modules/pandora_module_factory.cc,
win32/modules/pandora_module.cc,
unix/pandora_agent,
shellscript/linux/pandora_agent: Set the module min, max and
post_process in the XML data file.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4036 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* windows/pandora_wmi.cc: isServiceRunning returns -1 for module
states other than "Running" and "Stopped".
* modules/pandora_module_logevent.cc,
modules/pandora_module_logevent.h: Return a non empty string if
the event description can not be read. Save the event id as an
unsigned long int to avoid overflows.
* modules/pandora_module_service.cc,
modules/pandora_module_service.h: Aesthetic fix. Removed carriage
returns.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3580 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module_logevent.cc,
modules/pandora_module_logevent.h: Re-wrote the module to avoid
using EVENTLOG_SEEK_READ, which seems to cause a lot of trouble.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3561 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* unix/pandora_agent, win32/modules/pandora_module.cc: Added
module_interval information to the data XML.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3260 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module.cc: Free the collection if it can not
be added to the list.
* Makefile.am: Use -static-libgcc to remove the dependency on
libgcc_s_sjlj-1.dll.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3101 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module.cc: Changed sscanf format strings. They did
not seem to work well in native Windows.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3092 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module.h, modules/pandora_module_factory.cc,
modules/pandora_module.cc, pandora_windows_service.cc: Added the
module_cron feature to schedule modules using a cron-like syntax and
some small fixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2993 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module.h, modules/pandora_module_factory.cc,
modules/pandora_module.cc, pandora_windows_service.cc: Added the
module_condition feature. See http://openideas.info/wiki/ for more
information.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2956 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* windows/pandora_wmi.cc: getDiskFreeSpacePercent should not return
any value if the drive does not exist. Fixed.
* modules/pandora_module.h, modules/pandora_module_factory.cc,
modules/pandora_module.cc, pandora_windows_service.cc: Added support
for saving the value of a module as an environment variable.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2935 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module_inventory.cc: Fixed a couple of XML tags.
* installer/pandora.mpi: Added the vbs scripts to the installer.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2603 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* ftp/pandora_ftp_client.h: Fixed the path of curl.h to match
that in the Dev-cpp libcurl devpack.
* modules/pandora_module_tcpcheck.cc: Properly close the connection
socket.
* modules/pandora_module_regexp.cc: Removed debugging code.
* modules/pandora_module_perfcounter.cc: Close the query handle even if
no data was returned to avoid memory leaks.
* windows/pandora_windows_info.h,
windows/pandora_windows_info.cc,
modules/pandora_module_proc.cc: Fixed a process handle leak.
* configure.in: Improved library detection.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2000 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module_tcpcheck.cc: WSAStartup memory management
was leaking memory, so we will create and destroy in each loop the WSA
structure. Tested and leak-proof :-))
* modules/pandora_module_inventory.cc: Fixed typo with string label of
services inventory module.
* bin/PandoraAgent.exe: New binary (woah, compiled from linux!).
* pandora_windows_service.cc: Fixed problem in os XML Tag, was os_name
not os. Fixed problem with windows version, now is passwd full string to xml.
Tentacle call is passwd between quotes, because tentacle could be
in paths with blank spaces (by default \program files\pandora_agent).
* pandora.cc: Build updated.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1969 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* windows/pandora_wmi.h, modules/pandora_module_inventory.cc: Changed
the format of the inventory XML.
* main.cc: Execute the agent and exit when compiled with debugging
enabled.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1968 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* debug_new.h, fast_mutex.h,
debug_new.cpp, static_assert.h: Added to repository. Wu Yongwei's
memory leak detection tool (part of Nvwa). Only compiled when
debugging is enabled.
* bin/util/tentacle_client.exe: Added to repository. Tentacle client
needed to build the installer.
* installer/pandora_2.0.mpi: moved to installer/pandora.mpi. Updated.
The installer can now be built directly from the installer
subdirectory.
* configure.in, Makefile.am, autogen.sh: Created a proper
configure.in and Makefile.am. The agent can now be cross-compiled
from Linux :-D
* bin/pandora_agent.conf: Fixed. A local configuration had been
uploaded.
* pandora_windows_service.h,pandora_windows_service.cc,
udp_server/udp_server.cc, udp_server/udp_server.h: Properly shutdown
the UDP server.
* modules/pandora_module_regexp.cc,
modules/pandora_module_inventory.cc,
modules/pandora_module_factory.cc,
modules/pandora_module.cc, pandora_strutils.cc,
pandora.h, pandora.cc: Fixed a couple of memory leaks. Small changes
to avoid compile warnings when cross-compiling from Linux.
* windows_service.cc: Removed the interactive service flag to avoid
'black windows'.
* main.cc: Include the memory leak detection tool if debugging is
enabled.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1966 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* windows/pandora_windows_info.h,
windows/pandora_windows_info.cc: Added a new function that searches
the Windows registry for installed software.
* windows/pandora_wmi.cc, windows/pandora_wmi.h: Avoid reading numeric
values from WMI query results into strings.
* modules/pandora_module_inventory.h,
modules/pandora_module_inventory.cc,
modules/pandora_module_factory.cc: Added a new inventory module that
lists system services. Updated the software module to use the new
function. Fixed some typos.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1927 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module_logevent.cc: Fixed the calculation of the
newest event offset. Removed module output when no log events are
found.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1721 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* windows/pandora_wmi.cc, windows/pandora_wmi.h: Added functions for the
new modules. Removed old logevent functions.
* pandora_windows_service.h, pandora_windows_service.cc: Added support
for data file buffering and startup delay.
* modules/pandora_module_logevent.cc, modules/pandora_module_logevent.h:
Rewritten to retrieve event log data using the PDH interface instead
of WMI (was too slow).
* modules/pandora_module_tcpcheck.cc, modules/pandora_module_tcpcheck.h,
modules/pandora_module_regexp.cc, modules/pandora_module_regexp.h,
modules/pandora_module_perfcounter.cc,
modules/pandora_module_perfcounter.h,
modules/pandora_module_freedisk_percent.cc,
modules/pandora_module_freedisk_percent.h,
modules/pandora_module_freememory_percent.cc,
modules/pandora_module_freememory_percent.h: Added to repository.
New modules, see http://openideas.info/wiki/.
* modules/pandora_module.h, modules/pandora_module.cc,
modules/pandora_module_factory.cc, modules/pandora_module_list.cc:
Added support for the new modules.
* bin/pandora_agent.conf: Included configuration examples for the new
modules.
* PandoraAgent.dev: Updated to compile the new modules.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1707 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/modules/pandora_module.h,
win32/modules/pandora_module_factory.cc,
win32/modules/pandora_module.cc: Added support for async data types.
* win32/modules/pandora_module_proc.cc: Removed unnecessary call
to Pandora_Wmi::runProgram.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1398 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora.[cc,h]: Function is_enabled() was moved here to be
accesible.
* pandora_windows_service.cc: Removed is_enabled() private function.
* windows_service.cc: Service is now interactive, so it can open
interactive processes in the watchdog mode of proc modules.
* modules/pandora_module_factory.cc: Added "module_watchdog" and
"module_start_command" tokens to service and process modules. Style
correction.
* modules/pandora_module_proc.[cc,h]: Added watchdog mode to run
proccess when they die. It's done by setting a start command to
recover it.
* modules/pandora_module_service.[cc,h]: Added watchdog mode to start
a service when it's stopped.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1277 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cc: Removed debug output. Release mutex on
sendXml()
* modules/pandora_module.[cc,h]: Save latest output in a new property.
It's used on generic_proc modules to check the value better.
* modules/pandora_module_proc.[cc,h]: Added support for asynchronous
mode. It checks process in a separeted thread and report the status
quicker. Added getProcessName()
* modules/pandora_module_service.cc: Style correction. Removed an
indentation level.
* windows/pandora_windows_info.[cc,h]: Added getProcessHandles() to
get a list of handles of a running process, giving the process name.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1270 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* modules/pandora_module.[cc,h]: Added an async property. Added
getLatestOutput() to get the latest output of a module.
* modules/pandora_module_factory.cc: Parse async token in modules.
* modules/pandora_module_list.[cc,h]: It can create empty lists now
and add modules using new addModule() function.
* modules/pandora_module_service.[cc,h]: Added an async thread to
watch services events and track services status changes quickly and
asynchronously.
* windows/pandora_wmi.cc: Style correction.
* pandora_windows_service.[cc,h]: Pandora Windows service object is
now single instance, so the instance to the running service can be
accessed anywhere (useful in async threads). The XML generation and
sending process has been moved to a new function called sendXml()
which is thread-safe.
* windows_service.h: Some properties are now protected instead of
public to make it easier the singleton pattern in child classes.
* main.cc: Adopted to singleton pattern in Pandora windows service.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1268 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/pandora_windows_service.cc: Small fixes.
* win32/modules/pandora_module.cc: time() and localtime() are used
instead of GetSystemTime().
* win32/pandora.h: Changed all instances of "Pandora" to
"Pandora FMS".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@989 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/modules/pandora_module.cc: Fixed a bug that made the agent
crash when a module returned data of the wrong type.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@966 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_strutils.[cc,h]: Added strUnicodeToAnsi().
* modules/pandora_module_logevent.cc, pandora_windows_service.[cc,h],
windows/pandora_wmi.h: Tabs and blankspace style correction.
* windows/pandora_wmi.cc: Convert result in getEventList() to ANSI,
which was causing some BADXML errors on server. Tabs and blankspace
style correction.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@946 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/windows/pandora_wmi.cc, win32/windows/pandora_wmi.h,
win32/modules/pandora_module.h,
win32/modules/pandora_module_logevent.cc,
win32/modules/pandora_data.cc, win32/modules/pandora_data.h,
win32/modules/pandora_module.cc: Data timestamps are taken from
the log file itself.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@888 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/modules/pandora_module_logevent.cc: Now returns "empty" data
when no data is available.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@876 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cc, modules/pandora_module_list.cc: Deleted
debug output.
* modules/pandora_module_exec.cc: Reindented the code. Add blank
output to the module if there were nothing to read (like when the
executions return nothing).
* bin/PandoraAgent.exe: Updated to commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@854 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f