* 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/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
* win32/pandora_windows_service.h,
win32/pandora_windows_service.cc: Added support for a secondary server
.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1288 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
* 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
* 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
* modules/pandora_data.[cc,h]: Added to repository. Implements a
Pandora_Data object, which holds a value and the timestamp when it
was created.
* modules/pandora_module.[cc,h]: It holds now a list of Pandora_Data
objects. The XML is generated based on the size of this list. Output
property has became obsolete and child modules must use setOutput().
* modules/pandora_module_cpuusage.cc,
modules/pandora_module_exec.cc,
modules/pandora_module_freedisk.cc,
modules/pandora_module_freememory.cc,
modules/pandora_module_odbc.cc, modules/pandora_module_proc.cc,
modules/pandora_module_service.cc: Updated to new Pandora_Module
parent class.
* modules/pandora_module_list.cc: Deleted debug output.
* pandora.cc: Now uses SYSTEMTIME instead of old time_t.
* pandora_windows_service.[cc,h]: Added Ramon Novoa to authors. Added
a new configuration token transfer_interval which sets the interval
where the data file will be sent to the server. If the current
interval token is lower than this transfer interval, the data will be
added into a data_list XML tag.
* PandoraAgent.dev: Added new files.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@803 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_agent_conf.[cc,h]: Object adapted to be a singleton so it
could be used in many parts of the code who can't access to it before.
* ftp/pandora_ftp_test.cc, ssh/pandora_ssh_test.cc: Adapted to
configuration object singleton.
* modules/pandora_module_odbc.[cc,h]: Added to repository. Implements
a ODBC interface to make SQL queries.
* modules/pandora_module.[cc,h], modules/pandora_module_list.cc,
modules/pandora_module_factory.cc: Added ODBC module support.
* bin/pandora_agent.conf: Added a ODBC module example.
* PandoraAgent.dev: Added new files to project.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@789 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* win32/pandora_windows_service.cc: Added support for Tentacle file transfers.
* win32/pandora_windows_service.h: Added support for Tentacle file transfers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@750 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cc: Date is now filled with zeros to the
left and two digits.
* bin/PandoraAgent.exe: Updated to last commmit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@645 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* 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
* 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
* pandora_windows_service.cc: Reduced output log level in normal use.
* main.cc: Added a new line on help output.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@613 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cc: Do not check debug flag if copying was
not successful.
* bin/README: Updated options.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@598 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora.cc: Updated agent version.
* pandora.h, modules/pandora_module_exec.cc: Redefine WINVER, so
CreateJobProject can be found without modifying windef.h.
* pandora_agent_conf.cc: Rewritten a loop.
* ftp/pandora_ftp_client.[cc,h]: Added to repository. Implemented FTP
transfer protocol using libcurl. It adds a library dependency.
* pandora_windows_service.cc: Added support for FTP transfers. Select
between SSH (default) or FTP. Improved file structure to be cleaner.
* pandora_windows_service.h: Added new private functions and removed
unneccessary private attribute.
* misc/pandora_file.[cc,h]: Added a function to get the filename of a
path.
* main.cc: Indentation fixed.
* bin/libcurl.dll: Added to repository. New dependency.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cc: Fixed a bug when the agent name is not
configured and should be getted from the system.
* bin/PandoraAgent.exe: Updated to last commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@309 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.[cc,h]: Added copyDataFile() method to
class, it will copy the data file to the remote host. Now the data
file is not copied when the debug flag is active. Changed some debug
output to log output and changed one log message.
* bin/pandora_agent.conf: Updated debug flag option to new format and
commented.
* bin/PandoraAgent.exe: Updated to new commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@293 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cpp: Fixed a bug when copying the data file
to server, which it didn't include the agent name if it was not
defined in configuration file and was taken from Windows functions.
* bin/PandoraAgent.exe: Updated to new commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@292 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora_windows_service.cc: Changed the debug option of the
configuration to "debug" instead of "pandora_debug".
* pandora.cc: Removed output to stdout when logging.
* bin/pandora_agent.conf: Removed " from module_proc example. Fixes
bug #1600008.
* bin/PandoraAgent.exe: Updated to new commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@265 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* pandora.cc, pandora.h: Added getPandoraDebug() to get the
debug
flag value.
* pandora_windows_service.cc: Do not remove the data file if
flag
debug is active.
* bin/PandoraAgent.exe: Updated to new changes.
* ChangeLog: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@218 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
* 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
* 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
* 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
* 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