Commit Graph

34 Commits

Author SHA1 Message Date
eric_ross_c 353d7e5f79 2010-03-19 Eric Ross <eric.ross.c@gmail.com>
* util/pandora_db.pl: Added log4x tables to purge



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2518 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-19 14:54:16 +00:00
slerena 2869f4a377 2010-03-10 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/Core.pm: Automonitoring includes now status of 
        database maintance and warns if more than 24hrs without running 
        database maintance script.

        * util/pandora_db.pl: Added support to new purge parameters for
        event, audits, snmp traps, string data and gis data. Added new 
        section to clean orphaned information (using an application - 
        implemented database referencial integrity model).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-10 16:03:38 +00:00
slerena 5b1ce7cc82 2010-02-18 Sancho Lerena <slerena@artica.es>
* conf/pandora_server.conf: New option, self_monitoring.

	* lib/PandoraFMS/Config.pm: Support for new option self_monitoring.

	* lib/PandoraFMS/Core.pm: 	Access update is not refreshed by network 
	modules anymore (gaining a lot of performance here). Added new functions
	for internal statistics and automonitoring.

	* lib/PandoraFMS/Tools.pm: New funtions for self_monitoring.

	* bin/pandora_server: Modified error handler to avoid show info about bad
	load of some optional libraries. 
	Modified general loop of maintance tasks in three
	blocks: high, medium and low latency. Placed here in fixed steps (5, 30 and
	one minute) all tasks pending before by server_threshold. Added 
	self_monitoring and internal statistic mode (for group and servers).

	* util/pandora_db.pl: Update tconfig with last time of database maintance 
	time 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2377 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-18 17:21:40 +00:00
slerena 70feefaf5c 2010-02-10 Sancho Lerena <slerena@artica.es>
* bin/pandora_server: Better error management, avoiding to show Enterprise
	loading errors, and showing in console critical errors, helping to identify
	silly errors like DB credentials, etc.
	Added usage of pandora_get_sharedconfig() to get configuration from DB.

	* Config.pm: Updated build. Added pandora_get_sharedconfig(). Force three
	config tokens to be readed from DB, using default values if cannot be readen
	from database (agentaccess, realtimestat and stats_interval).

	* Core.pm: Added new parameter to pandora_event() to pass status of the 
	event (validated, not validated). Implemented auto-validation of low 
	priority events: normal/ok events will be always shown as autovalidated, and
	warning and normal events will be validated with critical events, and when
	a module is restored (normal/ok), all it's warning/critical pending events
	will be validated. 

	Fixed also bug with FF Threshold who doesnt' trigger events until FF + 1 
	instead FF value.

	* Server.pm,
	NetworkServer.pm,
	Dataserver.pm,
	ReconServer.pm: Raise event with status 0 (non validated) by default.

	* NetworkServer.pm: Implemented support for SNMP v3.

	* util/pandora_db.pm: Very important upgrade to this script. Now will
	delete all huge tables (tagente_datos, tagente_datos_string and 
	tagent_acccess) using several independent blocks (by default 100) avoiding
	mysql locks which happen in the past. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2341 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-10 17:32:10 +00:00
slerena 478ea21616 2010-02-08 Sancho Lerena <slerena@artica.es>
* util/pandora_db.pl: Script upgrade to purge data in several steps
        avoiding timeout and deadlocks() in high capacity enviroments.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-08 01:02:59 +00:00
raulmateos 206e69c947 2009-12-18 Raul Mateos <raulofpandora@gmail.com>
* pandora_dbstress.pl, pandora_db.pl: Clean code, updated year.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-18 13:43:02 +00:00
Ramon Novoa 3f7abb97a0 2009-12-18 Ramon Novoa <rnovoa@artica.es>
* DEBIAN/control: Updated version.

        * util/pandora_db.pl: Added history database support. Re-wrote some
          parts.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2215 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-18 11:26:13 +00:00
raulmateos af83debc73 2009-12-14 Raul Mateos <raulofpandora@gmail.com>
* util/pandora_db.pl: Improved help.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2194 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-14 09:37:41 +00:00
Ramon Novoa abc7664bf3 2009-11-23 Ramon Novoa <rnovoa@artica.es>
* util/pandora_db.pl: Removed the last call to UnixDate.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2125 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-23 17:57:52 +00:00
Ramon Novoa 071bf227bf 2009-11-06 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Tools.pm: Fixed bug #2893302.

        * util/pandora_db.pl: Fixed bug #2893303.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2090 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-06 15:57:06 +00:00
Ramon Novoa 9031e95e36 2009-11-04 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm, lib/PandoraFMS/Core.pm,
          lib/PandoraFMS/DataServer.pm, lib/PandoraFMS/WMIServer.pm,
          bin/pandora_server, util/pandora_db.pl: Fixed all pending tracker
          bugs.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2081 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-04 17:49:42 +00:00
Ramon Novoa 31fa8b3d93 2009-11-01 Ramon Novoa <rnovoa@artica.es>
* util/pandora_db.pl: Date::Manip is not used anymore.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2068 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-01 20:43:04 +00:00
slerena 585aef0535 2009-09-30 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/DataServer.pm: Reduced timeout for sleep
        on BADXML from 60 to 10 sec. This could result in bottleneck
        when several BADXML found at the same time. Default code
        retries 3 times x 10 secs, time enough to discard and retry.

        * util/pandora_db.pl: Disabled non-init modules are not deleted.
        This is needed for disabled modules coming from a remote conf
        (manual or by policy) who cannot execute in agent. If are
        deleted each day after purge, will appear as "unknown" and     
        admin will need to disable it again, and the same next day.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1994 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-30 16:24:02 +00:00
slerena e5defb12a8 2009-09-18 Sancho Lerena <slerena@artica.es>
*  util/pandora_db.pl: Minor improvements in script. Added
        a switch for mode without compact.

        * util/pandora_server: Added higher sleep in restart mode to
        wait some busy threads to stop before start.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1956 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-18 17:29:18 +00:00
slerena f21aa5a9d2 2009-09-16 Sancho Lerena <slerena@artica.es>
* util/pandora_exec -> bin/pandora_exec: Moved.

	* pandora_server -> util/pandora_server: Moved.

	* plugins/pandora_loadgen.pl
	plugins/pandora_server_status.pl: New plugins for generate data
	and get Pandora FMS server status and load.

	* Config.pm, pandora_db.pl: Version update.

	* pandora_server.spec, 
	Makefile.PL, 
	pandora_server_installer: Updated paths and dependencies



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1946 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-16 00:02:23 +00:00
slerena a71596aa8c 2009-09-07 Sancho Lerena <slerena@artica.es>
* util/pandora_db.pl: Fixed bad calculation of utimestamp limit
        purgin agent access data.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1918 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-07 00:14:43 +00:00
slerena e75d58adec 2009-06-08 Sancho Leren <slerena@artica.es>
* Header updates.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-08 15:12:32 +00:00
Ramon Novoa a90f94c9a5 2009-04-17 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm, lib/PandoraFMS/DataServer.pm: Properly set
          module interval when auto-creating modules.

        * lib/PandoraFMS/NetworkServer.pm: Disabled error messages from
          snmpget. The logs where flooded with timeout messages.

        * util/pandora_db.pl: Updated to work with the new code.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1626 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-17 11:52:28 +00:00
slerena 3a2aafd258 2000-02-03 Sancho Lerena <slerena@artica.es>
* pandora_db.pl: BUGFIX. DB Maintance was deleting data older than 24hr
	since commit of 12th January!.
	
	* pandora_wmi, pandora_network, pandora_plugin: Algorithm upgraded. 
	First are executed modules with less margin until be considered down and 
	modules with flag of manual execution.
	


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1419 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-03 13:16:31 +00:00
slerena 759260ba22 2009-01-26 Sancho Lerena <slerena@artica.es>
* DB.pm: Fixed NOT behaviour of alerts, now works as supposed to do.
	
	* pandora_db.pl: Deleted pending modules, fixed problems using bad DB
	function. 

	* Config.pm: Version update.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1402 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-26 15:05:33 +00:00
slerena b44782623b 2009-01-12 Sancho Lerena <slerena@artica.es>
* Makefile.PL: Path to libs was wrong. Fixed.

        * pandora_db.pl: Fixed small bug.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1336 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 16:20:33 +00:00
slerena bcf0d1e1c5 2009-01-12 Sancho Lerena <slerena@artica.es>
This is a MAJOR upgrade that _BREAK_ your current 2.1 trunk version.
	Needs an upgrade of DB Schema. At this time no conversion tool has been
	provided. Libs and console needs also to be re-deployed.
	
	* pandora_server: KeepAlive module is now processed OUTSIDE 
	pandora_lastagentcontact() function, in it's own function. This makes that
	keepalive only be refreshed on agent data, not network. This should 
	make keepalive works as "agent down detector" in a definitive way, also
	it's an important performance improvement operation.
	
	* pandora_db.pl: Performance improvements. If compact days = 0 skip. 
	Compactation and delete needs to be improved in speed.
	
	* DB.pm: Added more generic DB access functions (db_insert, db_update, 
	db_delete). Major rewrite of pandora_writestate(). Now uses three different
	values for status (NORMAL, WARNING, CRITICAL) and manage all modules like
	old monitor modules. Uses new fields for control event flip/flop with a 
	counter. Also uses new WARNING/CRITICAL thresholds to calculate in store-
	time the status.
	
	pandora_accessupdate() Function now uses only utimestamp. Tagente_datos and 
	tagente_datos_string has been updated and do not use timestamp (string) and
	id_agent index anymore. Big improvement has been noticed in performance 
	tests after this change !. tagente_datos_inc has been modified also.
	
	pandora_writedata() needs a lot of improvement :(. Added support for 
	modules without history. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1325 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 02:44:39 +00:00
slerena ede7475ef6 2008-10-10 Sancho Lerena <slerena@artica.es>
* bin/pandora_snmpconsole: Added support to get custom value, 
	custom type and custom OID. Code for trap2agent forward feature
	not fully implemented, don't work yet, need finish.
	
	* util/pandora_db.pl: Now delete also events and session information.
	String data is using utimestamp to purge (faster!).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1137 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-10-09 16:58:47 +00:00
raulmateos f66de3bce0 2008-09-08 Raul Mateos <raulofpandora@gmail.com>
* util/pandora_db.pl: Updated year and URL.
	* util/pandora_dbstress.pl: Updated year and build.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1087 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-09-08 14:30:25 +00:00
slerena 291b298565 2008-09-03 Sancho Lerena <slerena@gmail.com>
* pandora_server_installer: Added more info about some dependencies.

        * pandora_package_installer: The same.

        * util/pandora_db.pl: Fixed problem deleteing tevent table.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1082 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-09-03 16:54:18 +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
Ramon Novoa d4a09ca284 2008-04-24 Ramon Novoa <rnovoa@artica.es>
* util/pandora_db.pl: Rewrote and enabled pandora_compactdb.
          Small fix to pandora_purgedb.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@820 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-24 16:24:55 +00:00
slerena a29a60390d 2008-04-09 Sancho Lerena <slerena@gmail.com>
* AUTHORS, README: Updated.

        * util/pandora_db.pl: Modified version of compactation funtion
        needs to be tested, not functional yet.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-09 14:45:12 +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 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 6e854dc27b 2007-08-28 Sancho Lerena <slerena@gmail.com>
* util/pandora_db.pl: Added some fixes and new checks for database
        consistency. Also purge non-init modules (needed to avoid unused modules
        that take too much time on network servers!).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@627 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-28 15:09:04 +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
slerena 2452a7e164 2007-06-07 Sancho Lerena <slerena@artica.es>
Important update. Now all PM files (library) goes on PandoraFMS
        subdirectory from /bin. This should be copied/moved to system
        default Perl libraries (like /usr/lib/perl). All .PM files changes
        it's name.

        We also replace Net::Ping for Alive checks because recently
        problems discovered in packet lenght payload and problems with
        threads. We fallback to Net::Ping::External, now rewrapped to
        PandoraFMS::PingExternal and distributed with PandoraFMS for easy
        deployment.

        bin/*.pm: Renamed to equivalent files in ./bin/PandoraFMS dir

        * bin/pandora_network.pl: Now uses ping() from PingExternal to
        make alive checks. Latency checks is the only function that
        actually needs root now. External Ping could be executed from any
        user (it uses PING from system).

        * bin/PandoraFMS: Now contains all .PM files for PandoraFMS.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@490 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-06-07 10:30:03 +00:00
slerena 0cd002810a Initial Pandora load from our internal SVN
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-03-27 03:37:27 +00:00