Commit Graph

47 Commits

Author SHA1 Message Date
Ramon Novoa d3d14d51c8 2011-12-12 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: Removed some debugging messages.

	* modules/pandora_module.h,
	  modules/pandora_module.cc,
	  pandora_windows_service.cc: Fixed pre-conditions (were not working
	  properly).

	* modules/pandora_module_regexp.cc: Improved file status detection and
	  small fixes.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5247 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-12-12 17:11:06 +00:00
Ramon Novoa 3c5b4ed39a 2011-12-09 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: Added a debug message.

	* modules/pandora_module_perfcounter.cc,
	  modules/pandora_module_perfcounter.h,
	  modules/pandora_module_factory.cc: Added support to read the
	  'cooked' value of a performance counter.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5244 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-12-09 14:57:47 +00:00
Ramon Novoa d4b510c89c 2011-11-24 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: Use double instead of long for intermediate
	  result to avoid overflows. Fixes bug #3422900.

	* modules/pandora_module_perfcounter.cc: Print PDH errors in a more
	  descriptive format.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5167 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-11-24 18:18:14 +00:00
vgilc 2097aed8fe 2011-09-26 Vanessa Gil <vanessa.gil@artica.es>
* win32/windows/pandora_wmi.cc: Removed trace.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5000 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-09-26 10:22:29 +00:00
zarzuelo c35cb15176 2011-08-18 Sergio Martin <sergio.martin@artica.es>
* win32/windows/pandora_windows_info.h
	win32/windows/pandora_wmi.cc
	win32/windows/pandora_wmi.h
	win32/windows/pandora_windows_info.cc
	win32/bin/PandoraAgent.exe
	win32/bin/pandora_agent.conf
	win32/pandora_windows_service.cc: Added to the windows agent
	the address token with manual (specified address) and auto 
	(detecting from WMI the address) modes



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4763 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-08-18 09:41:37 +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 e1685c7b77 2010-10-04 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: Fixed inventory NIC information.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3339 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-04 17:24:10 +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 f5a64d8e9d 2010-04-16 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: fixed getOSVersion. Crashed in Windows 2008
          and Windows 7.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2572 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-16 13:12:23 +00:00
Ramon Novoa 40febeca27 2009-12-18 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc: Fixed bug #2907481.

        * bin/PandoraAgent.exe: Updated to current revision.
        
        * installer/pandora.mpi, pandora.cc: Updated build.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2223 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-18 20:04:42 +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
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 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 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
Ramon Novoa 39b530b340 2009-02-09 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc,
          windows/pandora_wmi.h: Allow custom process creation flags.

        * pandora_windows_service.cc: Hide console window when calling
          tentacle client.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1434 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 17:47:24 +00:00
Ramon Novoa c9d82e5b6c 2009-01-20 Ramon Novoa <rnovoa@artica.es>
* win32/ftp/pandora_ftp_client.cc,
          win32/ftp/pandora_ftp_client.h,
          win32/windows/pandora_wmi.cc,
          win32/pandora_windows_service.h,
          win32/pandora.h,
          win32/udp_server/udp_server.cc,
          win32/misc/pandora_file.cc,
          win32/misc/pandora_file.h,
          win32/ssh/pandora_ssh_client.cc,
          win32/ssh/pandora_ssh_client.h,
          win32/pandora_windows_service.cc: Removed some exceptions that made
          the agent crash when the watchdog thread was running.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1371 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 22:21:31 +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
Ramon Novoa c074316cf7 2008-12-11 Ramon Novoa <rnovoa@artica.es>
* win32/windows/pandora_wmi.cc,
          win32/pandora_windows_service.h,
          win32/PandoraAgent.dev,
          win32/pandora_windows_service.cc: Added an UDP Server. The
          agent can receive remote commands.

        * win32/udp_server,
          win32/udp_server/udp_server.cc,
          win32/udp_server/udp_server.h: Added to repository. UDP Server.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1287 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-11 10:20:07 +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 f57b767390 2008-07-30 Ramon Novoa <rnovoa@artica.es>
* win32/windows/pandora_wmi.cc: Fixed typo bug.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@985 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-30 15:27:14 +00:00
Ramon Novoa d75dd87315 2008-07-24 Ramon Novoa <rnovoa@artica.es>
* win32/windows/pandora_wmi.cc: Fixed WMI query timestamp limit for
          log events.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@971 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-24 07:56:14 +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 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 f09e5b0cf8 2007-09-06 Esteban Sanchez <estebans@artica.es>
* windows/pandora_wmi.cc: Fixed an error when detecting running
        services. Removed unuseful output.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@652 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-09-11 16:47:26 +00:00
Esteban Sanchez ee800a101b 2007-09-05 Esteban Sanchez <estebans@artica.es>
* windows/pandora_wmi.cc: Fixed a bug that return 0 in some cases of
        free disk space.

        * pandora.cc: Renamed debug file to pandora_debug.log

        * pandora_windows_service.cc: Fixed a blank space.

        * bin/PandoraAgent.exe: Updated to last commit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@643 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-09-05 16:22:26 +00:00
Esteban Sanchez d38e422804 2007-08-29 Esteban Sanchez <estebans@artica.es>
* pandora_windows_service.cc: Fixed a typo. Disconnect ftp client when
        an error happened.

        * ftp/pandora_ftp_client.cc: Set network timeout and ftp timeout.
        Ignore error when executing moving operations, this is compatible
        with FTP jails

        * windows/pandora_wmi.cc: Improved WQL queries and fixed some leaks.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@630 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-29 14:30:09 +00:00
Esteban Sanchez 3e0ed5ba6f 2007-08-24 Esteban Sanchez <estebans@artica.es>
* win32/windows/pandora_wmi.cc: Fixed a bug when reading free space
        from a read-only device such as CD-ROM by improving the WQL query.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@617 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-24 11:48:23 +00:00
Esteban Sanchez 611d7e3e1e 2006-11-27 Esteban Sánchez <estebans@artica.es>
* pandora_strutils.h, pandora_strutils.cc: strtoulong() now returns an
        unsigned long long. This will finally fixes the bug with freedisk big
        amounts.

        * windows/pandora_wmi.cc: Now the space amount is a unsigned long
        long enough to amounts up to PB (billions of GB).

        * bin/PandoraAgent.exe: Updated to new commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@284 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-11-27 11:59:52 +00:00
Esteban Sanchez 12ddf6dc7d 2006-11-24 Esteban Sánchez <estebans@artica.es>
* pandora_strutils.h, pandora_strutils.cc: Added strtoulong() to
        convert a string into a unsigned long integer.

        * wmi/pandora_wmi.h, pandora_wmi.cc: Modified getDisgkFreeSpace() to
        return a unsigned long integer. Used srttoulong() to transform the
        free disk into a log instead of an integer, that caused a negative
        value of free disk space when the amount was in the order of GB.

        * bin/PandoraAgent.exe: Updated to new commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@281 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-11-24 11:46:31 +00:00
Esteban Sanchez ca167a4d1b 2006-08-31 Esteban Sanchez <estebans@artica.es>
* pandora.cc, pandora_strutils.h, windows_service.h, wmi/pandora_wmi.cc, ssh/pandora_ssh_test.cc: Documentation comments updated.

        * ssh/pandora_ssh_client.[h,cc]: Documentation comments updated. Comment deleted.

        * windows_service.cc: Comment deleted.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@151 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-08-31 12:42:36 +00:00
Esteban Sanchez f0ca607e09 2006-08-15 Esteban Sanchez <estebans@artica.es>
* autogen.sh, configure.in, Makefile.am, Doxyfile.in: Added to
        repository. They are used to generate documentation, not to compile.

        * main.cc: Added some comments. Style correction.

        * pandora.[cc,h]: Added documentation comments. Changed visibility of
        some attributes.

        * pandora_agent_conf.[cc,h]: Added to Pandora namespace. Added
        documentation comments.

        * pandora_windows_service.[cc,h], pandora_strutils.[cc,h],
        windows/pandora_windows_infp.[cc,h], ssh/pandora_ssh_test.[cc,h]:
	Added documentation comments.

        * ssh/pandora_ssh_client.[cc,h]:Added documentation comments. Removed
        old method to connect with user and password. Style correction.

        * misc/pandora_file.[cc,h]: Added documentation comments. Renamed some
        parameters.

        * modules/pandora_module.[cc,h]: Added documentation comments. Put a
        name to the enumerators. Added a new class to agroupate all exceptions
        produced by Pandora_Module child class objects. Changed visibility of
        some attributes. Added some new methods and renamed others.

        * modules/pandora_module_cpuusage.[cc,h],
        modules/pandora_module_exec.[cc,h],
        modules/pandora_module_freememory.[cc,h],
        modules/pandora_module_freedisk.[cc,h], modules/pandora_module_proc.[cc,h],
        modules/pandora_module_service.[cc,h]: Added documentation comments.
        Some changes to adapt the objects to the Pandora_Module changes.

        * modules/pandora_module_list.[cc,h]: Added documentation comments.
        Some changes to adapt the objects to the Pandora_Module changes. Added
        to Pandora_Modules namespace.

        * windows/pandora_windows_wmi.[cc,h]: Added documentation comments.
        Renamed Pandora_Wmi_Error to Pandora_Wmi_Exception.

        * windows_service.[cc,h]: Added documentation comments. Changed
        visibility of some attributes. Style correction.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@150 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-08-25 13:02:03 +00:00
Esteban Sanchez 138bfc06a1 2006-07-14 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_factory.cc: Removed unnecessary debug.

        * windows/pandora_wmi.cc: Removed graphical exceptions to be executed when something happens with disphelper library. Get a string when retrieving the FreeSpace field on getDiskFreeSpace(), it solves a bug when the free space was a huge amount.

        * bin/PandoraAgent.exe: Updated to the new commit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@138 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-17 09:13:46 +00:00
Esteban Sanchez 05df7536d4 2006-07-12 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_freememory.[cc,h]: Added to repository. Implements a module to the the amount of free memory.

        * modules/pandora_module.h, modules/pandora_module_factory.cc, modules/pandora_module_list.cc: Added support to Pandora_Module_Freememory.

        * modules/pandora_wmi.[cc,h]: Added getFreememory () to get the amount of free memory.

        * pandora_windows_service.h: Removed public specificator from some functions.

        * PandoraAgent.dev: Added new files.

        * bin/PandoraAgent.exe: Updated to the new commit.

        * bin/pandora_agent.conf: Added example of free memory module.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@133 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-13 10:38:32 +00:00
Esteban Sanchez 207f8052b3 2006-07-11 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_cpuusage.[cc,h]: Added to repository. Implements a module to get the CPU usage percentage.

        * modules/pandora_module.h, modules/pandora_module_factory.cc, modules/pandora_module_list.cc: Added support to Pandora_Module_Cpuusage.

        * modules/pandora_module_freedisk.cc: Removed unnecessary debug output.

        * modules/pandora_module_service.h: Style correction.

        * windows/pandora_wmi.[cc,h]: Added getCpuUsagePercentage(). Removed unnecessary debug output.

        * PandoraAgent.dev: Added new files to the project.

        * bin/PandoraAgent.exe: Updated to the new commit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@129 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-12 09:15:00 +00:00
Esteban Sanchez 89bf49e977 2006-07-11 Esteban Sanchez <estebans@artica.es>
* pandora_windows_service.h: Public methods converted into private.

        * modules/pandora_module_freedisk.[cc,h]: Added to repository. Implements a module to check the free space in a disk.

        * modules/pandora_module.h, modules/pandora_module_factory.cc, pandora_module_list.cc: Added support to Pandora_Module_Freedisk modules.

        * ssh/libssh2/channel.c: Fixed a bug on libssh2_channel_wait_closed that caused to not copy the file to the remote host.

        * windows/wmi/pandora_wmi.[cc,h]: Added getDiskFreeSpace() to get support eh Pandora_Module_Freedisk modules.

        * pandora_strutils,[cc,h]: Added longtostr() to convert a long into a string.

        * PandoraAgent.dev: Added new files to the project.

        * bin/PandoraAgent.exe: Updated to the new commit.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@120 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-11 09:41:22 +00:00
Esteban Sanchez 9a5bea1f1f 2006-07-05 Esteban Sanchez <esteban@steve-o.org>
* pandora.[cc,h]: Program name and display name of the application.
        Added pandora_version variable and getPandoraAgentVersion()

        * pandora_windows_service.[cc,h]: Added checking of debug flag when
        reading the configuration file. Get the agent name from the machine if
        it was not defined in the configuration file. Date format on
        getXmlHeader() corrected. Style correction.

        * bin/README.txt: Fixed a error.

        * bin/PandoraAgent.tar.gz: Updated to the new commit.

        * windows/pandora_wmi.cc: The errors are now shown using pandoraLog().

        * modules/pandora_module.cc, modules/pandora_module_exec.cc,
        ChangeLog: Style correction.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@91 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-05 14:02:05 +00:00
Esteban Sanchez e6c81809f4 2006-07-05 Esteban Sanchez <esteban@steve-o.org>
* windows/pandora_wmi.cc: Removed unnecessary debug. Check the service state on isRunningService ()

        * pandora_agent_conf.cc, modules/pandora_module_factory.cc: Removed unnecessary debug.

        * bin/PandoraAgent.tar.gz: Added to repository.

        * ssh/pandora_ssh_client.cc: Debug converted into log.

        * pandora_windows_service.cc:  Get the interval value (in minutes) and set it to the service.
        Check if the XML of the module is NULL before adding it to the file. Added log output on error.
        Delete temporal file before finishing the run.

        * pandora_windows_service.h: Macro modified.

        * modules/pandora_module.h, modules/pandora_module.cc: Added new exception, raised when the interval
        is not fulfilled. Added code to the run funtion of the Pandora_Module class, to check the execution
        interval.

        * modules/pandora_module_proc.cc, modules/pandora_module_exec.cc, modules/pandora_module_service.cc:
        Call to the run() base class function before running the specific code.

        * modules/pandora_module_list.cc: Removed use of namespace and use a explicit specification.

        * Changelog: Renamed to ChangeLog.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@85 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-05 08:46:51 +00:00
Esteban Sanchez 54a0db6509 2006-07-04 Esteban Sanchez <esteban@steve-o.org>
* windows/pandora_wmi.*, windows/pandora_windows_info.*, windows/wmi/disphelper.*,
          misc/pandora_file.*, ssh/*, ssh/libssh2/*, modules/pandora_module_service.*,
        modules/pandora_module_proc.*: Added to repository

        * pandora_windows_service.cc, pandora_windows_service.h: getXMLHeader renamed to getXmlHeader
        and modified its behavior. Updated to the Pandora XML specification. Add SSH and XML generation
        functionallity.

        * modules/pandora_module_exec.cc: Added the execution to a job to prevent zombies process. Update
        the execution command.

        * modules/pandora_module_factory.cc: Added Pandora_Module_Proc and Pandora_Module_Service. Added
        the interval parameter.

        * modules/pandora_module_list.cc: Added support to Pandora_Module_Proc and Pandora_Module_Service.

        * modules/pandora_module.h: Added new types of modules. Added execution times and module description
        to the Pandora_Module class. Added support to Pandora_Module_Proc and Pandora_Module_Service. Added
        getXml, setInterval and setDescription functions.

        * pandora.h: Commentary fixed.

        * Changelog: Renamed to ChangeLog.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@83 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-04 14:07:08 +00:00