Commit Graph

40 Commits

Author SHA1 Message Date
slerena 82542c0d3f ç2008-09-01 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm: Sending mail now replaces macros also
        in the subject.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1054 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-09-01 08:53:01 +00:00
slerena dc7c2b1f91 2008-08-22 Sancho Lerena <slerena@gmail.com>
* Makefile.PL: Added WMI and fixed lot of small things.

	* pandora_server_installer: Fixed several things.

	* pandora_wmi: Launcher script added.

	* lib/PandoraFMS/Config.pm: Update version.

	* lib/PandoraFMS/DB.pm

	* lib/PandoraFMS/Tools.pm: Added defined check in limpia_cadena().
	This should fix warning message on some calls.

	* bin/pandora_snmpconsole: Fixed code for SNMP TRAP alerts.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1024 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-22 18:02:23 +00:00
slerena ad2f4f0675 2008-08-21 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm, bin/pandora_server: Enabled again 
        downtime scheduler. Now works fine, tested.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-21 19:03:19 +00:00
slerena b8c5d66e8c 2008-08-05 Sancho Lerena <slerena@gmail.com>
* bin/pandora_recon: New functional recon server. It implements 
	different recon tasks based on OS type. Uses a production/consumer
	thread model, detec OS typew and assign automatically network profiles
	(including new WMI components) and WMI, Plugin, Network and Prediction
	servers, taken the first master server that could found. Uses xprobe2
	external tool to detect remote OS.

	* Makefile.PL: Added new dependencies (HTML::Entities), and new
	binary tool for controlled time executing (pandora_exec), used now
	by pandora_wmi and pandora_plugin.

	* Config.pm: Fixed problem parsing xprobe2 command.

	* DB.pm: Functions pandora_create_agent() and pandora_event() moved
	from Tools.pm to here. Removed some old DEBUG messages.

	* Tools.pm: Moved pandora_create_agent() and pandora_event() to DB.pm



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1002 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-05 10:55:41 +00:00
Ramon Novoa 9aa0c8c85e 2008-07-30 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm,
          bin/pandora_wmi: Small fixes.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@984 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-30 14:21:11 +00:00
slerena fe220658c2 2008-07-30 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm: FIXED a stupid bug that makes impossible to
        process any data :(. This bug was introducted by me at 25 July.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-30 10:44:43 +00:00
slerena df0127985c 2008-07-25 Sancho Lerena <slerena@gmail.com>
* pandora_network: Added a defined() check for tcp_send string.

	* pandora_server: Added call to function pandora_planned_downtime().
	This implements planned downtimes on data server only.

	* DB.pm: Small optimization on bad data: pandora_writedata and 
	pandora_writestate return -1 on bad values and skip processing data. 
	More checks on undefined data (pandora_writestate). 
	Added code for planned downtimes, in function pandora_planned_downtime().
	Patch for adding [RECOVER] on f2/f3 if blank. Submitted by Kato Atsushi
	Now Monitor down has priority Warning and Monitor UP priority normal.

	* pandora_*servers*: Added inmediatly status change in tserver table on 
	controlled shutdown, this could be a ordered shutdown, a kill or a CTRL-C



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@974 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-25 18:52:37 +00:00
slerena 0f1635a2fd 2008-07-23 Sancho Lerena <slerena@gmail.com>
* Makefile.PL: Removed reference to export_server.

        * DB.pm: Fixed bug that causes to do not store string data. Added checks
        for aviod null text and skip max/min checks for string types.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@972 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-24 11:04:55 +00:00
slerena 9bc457226c 2008-07-22 Sancho Lerena <slerena@gmail.com>
* pandora_network: Minimal style changes. Added status change in 
	tserver table on controlled shutdown.

	* pandora_server: Added status change in tserver table on controlled 
	shutdown. Minimal changes and optimizations. Recheck for bad XML is 
	adjusted to 3 instead 10.Fixed problem with "blank" agent names. Added
	support for async types (data, proc and string).

	* config.pm: Added support for new config token: max_log_size. This
	stablish a max log filesize.

	* DB.pm: Added support for postprocess (as simple multiplier value). 
	Fixed problem with continuous update of laststart in server keepalive.
	Updated also several logger priorities (raise them).

	* Config.pm: pandora_get_os() fixed for void OSes. Logger() implements
	a file-rotation system with a maximum in bytes for PandoraFMS log file.
	
	* pandora_server.conf: Updated with new options and removed some from 1.3.1
 	
	* pandora_export: Deleted skeleton file por export server. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@967 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-22 15:52:34 +00:00
slerena a980bb32cf 2008-06-18 Sancho Lerena <slerena@gmail.com>
* pandora_dbstress.pl: Added suppor for "text" moduletypes.
    
    * pandora_recon: Now is multithreaded. Better management of already
    registered IP's. Better status update. Some fixes (xprobe2 crash).

    * Config.pm: Added support for recon_threads token.

    * Tools.pm: added pandora_trash_ascii(), autocreate
    set agent in learning mode automatically.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@879 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 00:14:17 +00:00
slerena 6de72c6dac 2008-06-17 Sancho Lerena <slerena@artica.es>
* config.pm: Added options for xprobe2, and autocreate.

	* tools.pm: Added functions pandora_create_agent(), pandora_get_os(),
	and pandora_event() (this has been moved from DB.pm).

	* pandora_server.conf: Added options for xprobe2, autocreate and
	autocreate_group.

	* pandora_network: Added support for TCP scanning (not implemented in
	console yet), parent detection using traceroute, OS fingerprinting with
	xprobe2, event creation using central functions, and some optimizations.

	* pandora_server: Added support for agent autocreation, OS detection from
	the XML header, and event notification "new_agent" type.

	* pandora_recon: First code to implement traceroute functionality
	using Pureperl module.  Added code for remote OS fingerprinting.





git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@874 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 17:26:03 +00:00
slerena 9920b0609f 2008-06-13 Sancho Lerena <slerena@artica.es>
* conf/pandora_server.conf: Added new internal MTA feature config tokens .
    
    * pandora_server_installer: Copy default plugins to /usr/share/pandora/util
    
    * Config.pm: New MTA feature tokens, and added event when starting server.
    
    * DB.pm: Changes in execute_alert function (now passes several hash refs).
    Alerts and events now use new format of events. Add support for new inter-
    nal MTA/SMTP alert feature. Discovered and FIXED a very annoying bug on
    need_update usage in write_state function that was making a HUGE 
    degradation when too many non-init modules in network server.
        
    * Tools.pm: Added pandora_sendmail() function. Needs Mail::Sendmail dep.
    
    * All servers: Support for pandora_shutdown notify on event database.
    
    * pandora_snmpconsole: Updated SNMP alert mechanism. Need to be tested!.
    
    * pandora_recon: Now generate an event when discover a new host.
    
    * util/pandora_db.pl: Added support to automatically delete events.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@859 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 16:42:35 +00:00
slerena b1621c7302 2008-04-23 Sancho Lerena <slerena@artica.es>
* Config.pm: Added dataserver_thread config token

        * bin/pandora_plugin: Some minimal thread improvements (yield)

        * bin/pandora_server: Uses dataserver_thread token to set up
        number of starting threads.

        * bin/pandora_network: Added more thread yields.

        * util/plugin: Added new directory for "standard" plugins. 
        Added the first plugins here. Expect more in the future :-)

        * plugin/openvpn_pandoraplugin.pl: Connects to openvpn daemon
        and report number of active sessions.

        * plugin/ssh-exec_pandoraplugin.pl: Execute a remote command
        using Perl (Net::SSH::Perl) SSH functions.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@815 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-23 15:06:48 +00:00
slerena 68424bb75e 2008-04-17 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/Config.pm: Shorten description in help.

        * lib/PandoraFMS/DB.pm: Data server module autocreation don't
        assign a id_module to tagente_module record. Fixed.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@809 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-17 15:05:35 +00:00
Ramon Novoa 1280425526 2008-04-16 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Small code optimization. Took a couple
          of prepare statements out of a loop.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@808 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-16 16:52:34 +00:00
Ramon Novoa 86bb8b22fc 2008-04-16 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Rewrote the alert engine. Small fixes.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@807 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-16 11:03:03 +00:00
slerena 7029a85437 2008-04-09 Sancho Lerena <slerena@gmail.com>
*  pandora_server_installer: Updated some strings and version.
        Added new servers.

        * lib/PandoraFMS/Config.pm: Included support for export server.

        * bin/pandora_export: Export server skeleton.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@794 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-06 22:11:16 +00:00
slerena 1a88c6d931 2008-04-01 Sancho Lerena <slerena@gmail.com>
* bin/pandora_prediction: Fixed several problems with
        prediction on anomaly detection. Tested and works fine for me.

        * DB.pm: Fixed problem in combined alerts. Removed some
        log entries. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@784 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-01 17:00:09 +00:00
Ramon Novoa e06c11aef0 2008-03-27 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Config.pm, lib/PandoraFMS/DB.pm: Added
	  compound alert support.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-27 17:38:10 +00:00
slerena b2ece3be75 2008-03-13 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/Config.pm: New pandora_startlog function. Added support to manage PID
    in daemon mode. Added support for quiet mode. Added prediction_threads option. 

    * lib/PandoraFMS/Tools.pm: daemonize function now manages PID and store in a file when
    it forks. 

    * lib/PandoraFMS/DB.pm: Removed some gotos.  Modified generic-access DB functions and 
    added one to manage entire row in a hash: get_db_free_row ().

    * bin/pandora_plugin: A lot of fixes. This code actually works fine :-)

    * bin/pandora_prediction: First version of usable code. Works but not seriously tested.

    * bin/pandora_network: Adjusted to work with new features (quiet mode) and new db 
    schema. Some code cleanup.

    * util/pandora_dbstress.pl: Updated default values.

    * util/pandora_dbstress.README: Improved README documentation for dbstress tool.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@747 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-13 18:33:44 +00:00
slerena 111c842b62 2008-03-06 Sancho Lerena <slerena@gmail.com>
*  conf/pandora_server.conf: New tokens for the new servers.

        * lib/PandoraFMS/Config.pm: Added support for WMI Server.

        * lib/PandoraFMS/DB.pm: Updated pandora_updateserver function.

        * bin/pandora_wmi: Skeleton of WMI server, not functional, only
        a concept proof and initializacion for create a WMI server.

        * bin/pandora_plugin: Almost functional code, fully skeleton,
        initializacion and modules.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@740 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 16:25:50 +00:00
slerena 92f5f37291 2008-02-25 Sancho Lerena <slerena@gmail.com>
* conf/pandora_server.conf: Added new tokens.

        * lib/PandoraFMS/Config.pm: Code cleanup and add support for 
        new prediction and plugin server. Added better checks to clean  
        blank spaces inside config tokens.

        * lib/PandoraFMS/DB.pm: Added comment to the only generic function
        to database we have.            

        * lib/PandoraFMS/Tools.pm: Created a new function to clean 
        blank spaces, and used to clean setup file parsing.

        * bin/pandora_plugin: New plugin server skeleton, not functional
        yet. Need much more improvement, but code skeleton is done.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@725 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-02-25 18:00:09 +00:00
slerena f128742b02 2008-02-20 Sancho Lerena <slerena@gmail.com>
* Merged latest changes on stable branch to trunk. Let's go to
        1.4 version !!



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@722 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-02-20 02:09:36 +00:00
slerena bb4745b955 2008-01-08 Sancho Lerena <slerena@gmail.com>
* Config.pm: Updated version to 1.3.1-dev
        
        * DB.pm: Added generic db function give_db_free(). keepalive modules area
        managed differently. Now have type 100 and update only tagente_estado table
        discarding historic data, but are managed like other module. Update data (OK)
        when updating tagent_access. Old Keepalive modules are deprecated and not used
        since from 1.2 version was not working :(

        * pandora_snmpconsole: Some small fixes from unknown user.

        * pandora_server: Ignore files with size 0 (expect to solve problems with 
        zerobyte BADXML files, need more testing...). Keepalive module management
        are now managed in a different way. This works for me but needs more testing.

        * pandora_network: Minimal optimization in locking for SNMP threads.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@687 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-01-08 18:32:03 +00:00
slerena f585b216c5 2007-12-19 Sancho Lerena <slerena@gmail.com>
* bin/pandora_network: Fixed bug #1854340, problem with file descriptors
        on heavily loaded network servers. Other minor issues added.

        * lib/Config.pm: Upgraded version number to 1.4-dev




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@685 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-12-19 18:45:32 +00:00
slerena 7f60b3921f 2007-12-04 Sancho Lerena <slerena@gmail.com>
*  lib/PandoraFMS/Config.pm, bin/pandora_network: This little portion of
        code should fix problem detected in some very extrange module "blackout" 
        effect reported by Corona. Need check and testing before get as final.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@680 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-12-04 01:19:46 +00:00
slerena 1570ca0816 2007-10-08 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/Config.pm: Updated build number.

        * lib/PandoraFMS/DB.pm: Fixed some problems with alert recovery/expired method,
        that causes to do not recognize expired alerts in some situations (min_alert=0).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@669 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-10-08 14:07:51 +00:00
slerena e79fbfb592 2007-10-04 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm: Fixed a missing $ in sub header definition for args :(
        and some warnings also fixe



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@668 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-10-04 12:14:45 +00:00
slerena 24d3cf4077 2007-10-04 Sancho Lerena <slerena@gmail.com>
* conf/pandora_server.conf, lib/PandoraFMS/Config.pm, bin/pandora_network:

        Merged code from NG branch: Added multiping check (global setting 'icmp_checks')
        on network server because in some WAN enviroments with erratic packet loss on non TCP
        connections would cause recurrent false positives. New config token added to config
        file (icmp_checks). Updated default .conf



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@667 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-10-04 10:45:46 +00:00
slerena 7605305e28 2007-10-03 Sancho lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm: Fixed alert that fires always one time more than
        max_alert defined. Also fixed several issues with "Ceased" support for alerts
        and correct internal_counter problem. Now works fine !

        * util/pandora_db.pl: Purge of tagent_access was not working fine, and fixed
        another problem with id_agent 0 data in tagente_datos.

        After about 12 hours of intense testing this seems to work very fine, probably
        this server code will be the final ! :-)



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@664 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-10-03 01:13:47 +00:00
slerena 5e4a04b0d2 2007-10-02 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm: Updated and fixed several problems with alerts.
        Now notification of alert ceased is properly implemented and works
        inside threshold timegap. Event are fired using alert description and not
        alert type, and automatically ceased alerts (depending on min_alert and
        internal counter) give up alert status and generate event.

        * bin/pandora_snmpconsole: Updated call to execute_alert.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@663 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-10-02 16:23:48 +00:00
slerena 1f17677712 2007-10-01 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/DB.pm: Fixed bug for autoimported modules #1805654

        * lib/PandoraFMS/DB.pm: Fixed problem with fixed alerts. Now reports when
        problem its fixed in event manager (after threshold expires!).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@662 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-10-01 13:44:37 +00:00
slerena 274a61870d 2007-08-27 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/Config.pm: Updated version string.

        * bin/pandora_network: Fixed BUG with SNMP Timeout (net-snmp uses MICROSECONDS
        instead seconds!)




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-27 15:06:17 +00:00
slerena 2d7fdaa961 2007-08-23 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/Config.pm, bin/pandora_snmpconsole: Real fix for problem in
        snmplogfile.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@609 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-23 11:33:19 +00:00
slerena 45b4556b5e 2007-08-21 Sancho Lerena <slerena@gmail.com>
* conf/pandora_server.conf: Final fixes for default file.

        * lib/PandoraFMS/Config.pm: Fixed stupid typo in snmpconsole parameter.

        * bin/*: Disabled flush for each I/O (ready for production).

	This should be last commit before Beta2 :-)



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@607 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-21 18:14:40 +00:00
slerena 7a62ba22dd 2007-08-06 Sancho Lerena <slerena@gmail.com>
* DB.pm: Alert time support uses TIME format instead numeric (changes requested
        by esanchezm).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@592 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-06 15:48:57 +00:00
slerena 52980bd3dc 2007-08-02 Sancho Lerena <slerena@gmail.com>
* Makefile.PL: Missing dep updated and .pl extensions purged.

        * All (4) startup scripts: Updated startup script.

        * lib/PandoraFMS/Config.pm: Now servers dont get "Homedir" from command line, get
        config file directly

        * bin/pandora_recon, bin/pandora_server, bin/pandora_network, bin/pandora_snmpconsole:
        Renamed (deleted .pl).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@588 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-02 18:30:10 +00:00
slerena baa567710c 2007-08-02 Sancho Lerena <slerena@gmail.com>
* Final changes (link is now over bin, and lib is real dir, for work
        with Makefile.PL).




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@587 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-02 17:53:07 +00:00
slerena 780db4b48a Deleting other dir prev. to replace
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@586 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-02 17:51:21 +00:00
slerena 3b5c59a731 2007-08-02 Sancho Lerena <slerena@gmail.com>
* lib: Linked to bin/PandoraFMS, for use in Makefile.PL

        * Makefile.PL: Perl standard interface for make (to install)

        * bin/pandora_db.pl: Some small fixes and information strings updated.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@584 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-02 17:25:59 +00:00