Commit Graph

65 Commits

Author SHA1 Message Date
vgilc cc491d5c6e 2011-04-05 Vanessa Gil <vanessa.gil@artica.es>
* 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
2011-05-05 14:05:25 +00:00
Ramon Novoa d1d4e002dd 2011-03-08 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_regexp.cc: Added support for extended regular
	  expressions.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4068 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-08 15:50:00 +00:00
Ramon Novoa 6f9a411433 2011-03-02 Ramon Novoa <rnovoa@artica.es>
* 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
2011-03-02 10:41:29 +00:00
Ramon Novoa 6c2489b4c7 2011-03-01 Ramon Novoa <rnovoa@artica.es>
* 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
2011-03-01 14:45:32 +00:00
Ramon Novoa c8494bfbb6 2010-11-15 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_logevent.cc,
	  modules/pandora_module_logevent.h: Search for event log descriptions
	  in multiple DLLs if necessary. Improved event log error detection.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3588 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-11-15 16:30:26 +00:00
Ramon Novoa cafe7ef8e5 2010-11-12 Ramon Novoa <rnovoa@artica.es>
* 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
2010-11-12 13:41:24 +00:00
Ramon Novoa fdf6e21673 2010-11-08 Ramon Novoa <rnovoa@artica.es>
* 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
2010-11-08 19:26:17 +00:00
Ramon Novoa 76d230a1e6 2010-10-27 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_logevent.cc: We need more information on error
	  997, ignore it for now.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3469 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-27 11:52:07 +00:00
Ramon Novoa d8640d3b50 2010-10-04 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_inventory.cc: Fixed XML generation for
	  inventory modules.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3335 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-04 14:02:27 +00:00
Ramon Novoa 49f8c027de 2010-09-20 Ramon Novoa <rnovoa@artica.es>
* 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
2010-09-20 15:03:06 +00:00
Ramon Novoa 8855493ec9 2010-08-04 Ramon Novoa <rnovoa@artica.es>
* 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
2010-08-04 17:47:44 +00:00
Ramon Novoa 6edb348195 2010-08-04 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module.cc: Run action commands through cmd.exe.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3096 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-08-04 16:28:25 +00:00
Ramon Novoa 1df39b4c9d 2010-08-04 Ramon Novoa <rnovoa@artica.es>
* 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
2010-08-04 12:38:42 +00:00
Ramon Novoa 9aed18321e 2010-07-12 Ramon Novoa <rnovoa@artica.es>
* 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
2010-07-12 16:31:07 +00:00
Ramon Novoa e693d976b0 2010-07-02 Ramon Novoa <rnovoa@artica.es>
* 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
2010-07-02 14:25:53 +00:00
Ramon Novoa cdd4f87774 2010-06-30 Ramon Novoa <rnovoa@artica.es>
* 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
2010-06-30 15:40:25 +00:00
Ramon Novoa 4413cceabd 2010-06-08 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc, modules/pandora_module_logevent.cc: Removed
          unnecessary log information.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2876 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-06-08 16:49:40 +00:00
Ramon Novoa 6eb81e4838 2010-05-19 Ramon Novoa <rnovoa@artica.es>
* pandora_strutils.h, modules/pandora_module_odbc.h,
          modules/pandora_data.h, build.sh, pandora.h,
          udp_server/udp_server.h, Makefile.am: Small fixes so the agent
          builds under newer versions of MinGW.

        * installer/pandora.mpi: Updated build.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2752 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-05-19 15:21:10 +00:00
Ramon Novoa a7b159323c 2010-04-23 Ramon Novoa <rnovoa@artica.es>
* 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
2010-04-23 14:31:10 +00:00
Ramon Novoa b363210cba 2010-04-21 Ramon Novoa <rnovoa@artica.es>
* main.cc: Updated headers after tinyxml removal.

        * modules/pandora_module_list.cc,
          modules/pandora_module_factory.cc: Added support for plugin modules.

        * modules/pandora_module_exec.cc, modules/pandora_module.h,
          modules/pandora_module.cc: Added the module_timeout configuration
          token and replaced tinyxml related code.

        * bin/pandora_agent.conf: Added a sample plugin module. Added the
          group configuration token (was missing).

        * modules/pandora_module_plugin.cc,
          modules/pandora_module_plugin.h: Added to repository. Plugin module.

        * bin/util/df.vbs, bin/util/ps.vbs: Added to repository. Sample
          VBScript plugins.

        * pandora_windows_service.cc, pandora_windows_service.h,
          modules/pandora_module_inventory.cc, ssh/pandora_ssh_test.cc,
          ftp/pandora_ftp_test.cc, modules/pandora_module_inventory.h: Replaced
          tinyxml related code.

        * tinyxml, tinyxml/tinyxmlerror.cpp, tinyxml/tinystr.h,
          tinyxml/tinyxmlparser.cpp, tinyxml/tinyxml.cpp,
          tinyxml/tinyxml.h, tinyxml/tinystr.cpp: Removed from repository. No
          longer used.

        * installer/pandora.mpi, pandora.cc: Updated build to RC1.

        * Makefile.am: Updated sources. Removed tinyxml and added the plugin
          module.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2584 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-21 20:00:31 +00:00
Ramon Novoa 609e56c865 2009-11-19 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: Fixed bug #2895307.

        * modules/pandora_module.cc: Fixed bug #2835450.

        * bin/pandora_agent.conf: Added xml_buffer configuration token.

        * ssh/libssh2/libssh2_config.h, ssh/libssh2/packet.c: Renamed usleep to
          u_sleep to avoid conflicts.

        * pandora_windows_service.cc: Fixed bug #2899257.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-19 00:40:26 +00:00
Ramon Novoa 3e290f3ecd 2009-10-05 Ramon Novoa <rnovoa@artica.es>
* 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
2009-10-05 17:04:17 +00:00
slerena d5b14dab3b 2009-09-24 Sancho Lerena <slerena@artica.es>
* 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
2009-09-24 16:29:25 +00:00
Ramon Novoa 7358747348 2009-09-23 Ramon Novoa <rnovoa@artica.es>
* 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
2009-09-23 07:04:04 +00:00
Ramon Novoa f8e8bffe90 2009-09-22 Ramon Novoa <rnovoa@artica.es>
* 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
2009-09-22 11:48:25 +00:00
Ramon Novoa 21f0962ca0 2009-09-11 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_inventory.h,
          modules/pandora_module_inventory.cc,
          modules/pandora_module_factory.cc: Fixed inventory module interval
          calculation.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1931 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-10 22:17:00 +00:00
Ramon Novoa 0e9b86cc97 2009-09-10 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc,
          modules/pandora_module_factory.cc: Removed unnecessary code.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1928 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-10 14:25:59 +00:00
Ramon Novoa ba431b7e0a 2009-09-10 Ramon Novoa <rnovoa@artica.es>
* 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
2009-09-10 14:15:39 +00:00
Pablo de la Concepción Sanz fe65d1b3d8 2009-09-02 Pablo de la Concepcin <pablo.concepcion@artica.es>
* windows/pandora_wmi.cc, windows/pandora_wmi.h: Added Inventory
        functions

        * modules/pandora_module_inventory.h,
        modules/pandora_module_inventory.cc,
        modules/pandora_module.h, modules/pandora_module_list.cc,
        modules/pandora_module_factory.cc, modules/pandora_module.cc: Added
        Inventory moudule files and moudule loading logic.

        * modules/pandora_data.cc, modules/pandora_data.h: Added data_origin
        atribute, new constructors and getters and setters for the atribute

        * bin/PandoraAgent.exe: new complide binary

        * bin/pandora_agent.conf: new configuration parameters for inventory
        module

        * PandoraAgent.dev: Updated project file



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1905 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-02 11:39:53 +00:00
Ramon Novoa 3a8797cd29 2009-05-28 Ramon Novoa <rnovoa@artica.es>
* 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
2009-05-28 14:05:17 +00:00
Ramon Novoa d24bee9758 2009-05-25 Ramon Novoa <rnovoa@artica.es>
* 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
2009-05-25 17:50:27 +00:00
Esteban Sanchez 4a24502829 2009-04-13 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_odbc.cc: Fixed log message when no username
        was found.

        * modules/pandora_module_factory.cc: Removed duplicated assignment.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1610 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 10:49:08 +00:00
Ramon Novoa 4f89b62d41 2009-04-02 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_proc.cc,
          modules/pandora_module_proc.h: Fixed module_startdelay and
          module_retrydelay behavior.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1592 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-02 17:38:14 +00:00
Ramon Novoa d579ec4ea3 2009-02-24 Ramon Novoa <rnovoa@artica.es>
* win32/modules/pandora_module_proc.cc,
          win32/modules/pandora_module_proc.h,
          win32/modules/pandora_module_factory.cc,
          win32/pandora_windows_service.cc: Fixed some 'work in progress'
          code from previous commit.

        * win32/pandora.cc: Updated version string.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1482 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-24 18:50:16 +00:00
Ramon Novoa 54ede8e593 2009-02-13 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc
          windows/pandora_wmi.h
          modules/pandora_module_exec.cc: Hide console window when executing
          exec modules.

        * modules/pandora_module_proc.cc,
          modules/pandora_module_proc.h,
          modules/pandora_module_factory.cc: Added module_retries,
          module_startdelay and module_retrydelay options to proc
          modules.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1454 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-13 14:34:10 +00:00
Ramon Novoa 293e46854a 2009-01-26 Ramon Novoa <rnovoa@artica.es>
* 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
2009-01-26 11:48:35 +00:00
Ramon Novoa c64614fda3 2008-12-16 Ramon Novoa <rnovoa@artica.es>
* win32/modules/pandora_module_wmiquery.cc,
          win32/modules/pandora_module_wmiquery.h: Added to repository. WMI
          query module.

        * win32/windows/pandora_wmi.cc,
          win32/windows/pandora_wmi.h,
          win32/modules/pandora_module.h,
          win32/modules/pandora_module_factory.cc,
          win32/modules/pandora_module_list.cc,
          win32/modules/pandora_module.cc,
          win32/PandoraAgent.dev: Added support for WMI query module.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1294 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-16 11:30:12 +00:00
Esteban Sanchez ea81620820 2008-12-03 Esteban Sanchez <estebans@artica.es>
* 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
2008-12-03 12:04:48 +00:00
Ramon Novoa 65ab67b296 2008-12-01 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc,
          windows/pandora_wmi.h,
          modules/pandora_module_logevent.cc,
          modules/pandora_module_logevent.h,
          modules/pandora_module_factory.cc: Added event code filtering
          support to logevent module.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1271 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-01 17:49:16 +00:00
Esteban Sanchez 0059aad758 2008-12-01 Esteban Sanchez <estebans@artica.es>
* 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
2008-12-01 13:40:19 +00:00
Esteban Sanchez 5a63e70b7b 2008-11-28 Esteban Sanchez <estebans@artica.es>
* 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
2008-11-28 10:51:03 +00:00
Esteban Sanchez 80cf5e1a13 2008-11-26 Esteban Sanchez <estebans@artica.es>
* pandora_strutils.cc, pandora_strutils.h, ftp/pandora_ftp_client.cc,
	ftp/pandora_ftp_test.cc, ftp/pandora_ftp_client.h,
	ftp/pandora_ftp_test.h, windows/pandora_windows_info.h,
	windows/pandora_wmi.cc, windows/pandora_windows_info.cc,
	misc/pandora_file.cc, misc/pandora_file.h, pandora_agent_conf.cc,
	ssh/pandora_ssh_client.cc, ssh/pandora_ssh_test.cc,
	ssh/pandora_ssh_client.h, ssh/pandora_ssh_test.h,
	pandora_agent_conf.h, windows_service.cc, windows_service.h,
	modules/pandora_module.h, modules/pandora_module_logevent.cc,
	modules/pandora_module_exec.cc, modules/pandora_module_logevent.h,
	modules/pandora_module_exec.h, modules/pandora_module_freedisk.cc,
	modules/pandora_module_freedisk.h, modules/pandora_module_service.cc,
	modules/pandora_module_service.h, modules/pandora_module_proc.cc,
	modules/pandora_data.cc, modules/pandora_module_proc.h,
	modules/pandora_data.h, modules/pandora_module_factory.cc,
	modules/pandora_module_odbc.cc, modules/pandora_module_odbc.h,
	modules/pandora_module_factory.h,
	modules/pandora_module_freememory.cc, modules/pandora_module_list.cc,
	modules/pandora_module_freememory.h,
	modules/pandora_module_cpuusage.cc, modules/pandora_module_cpuusage.h,
	modules/pandora_module.cc, pandora.h: Tab style correction.
	Indentation blankspaces moved to tab characters.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1262 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-11-26 10:08:19 +00:00
Ramon Novoa 884936b82b 2008-07-31 Ramon Novoa <rnovoa@artica.es>
* 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
2008-07-31 10:31:58 +00:00
Ramon Novoa 18a764f6ec 2008-07-22 Ramon Novoa <rnovoa@artica.es>
* 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
2008-07-22 10:46:29 +00:00
Esteban Sanchez 8373606ae6 2008-07-09 Esteban Sanchez <estebans@artica.es>
* 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
2008-07-09 12:46:22 +00:00
Ramon Novoa 1c1c0200a5 2008-06-19 Ramon Novoa <rnovoa@artica.es>
* 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
2008-06-19 15:55:44 +00:00
Ramon Novoa b30e175038 2008-06-18 Ramon Novoa <rnovoa@artica.es>
* win32/modules/pandora_module_logevent.cc: Fixed execution interval.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@878 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-18 14:26:43 +00:00
Ramon Novoa cba2e4d3a0 2008-06-18 Ramon Novoa <rnovoa@artica.es>
* 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
2008-06-18 11:15:07 +00:00
Ramon Novoa 7dc855ab89 2008-06-13 Ramon Novoa <rnovoa@artica.es>
* win32/PandoraAgent.dev: Updated.
        * win32/windows/pandora_wmi.cc, win32/windows/pandora_wmi.h,
          win32/pandora_windows_service.cc, win32/modules/pandora_module.h,
          win32/modules/pandora_module_logevent.cc,
          win32/modules/pandora_module_logevent.h,
          win32/modules/pandora_module_factory.cc,
          win32/modules/pandora_module_list.cc,
          win32/modules/pandora_module.c: Added a new module that checks for
          log events using WMI queries.
        * bin/pandora_agent.conf: Added encoding option and a Logevent module
          declaration example.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@857 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 10:32:47 +00:00
Esteban Sanchez 6f6f087d0a 2008-06-11 Esteban Sanchez <estebans@artica.es>
* 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
2008-06-11 14:58:53 +00:00