Commit Graph

59 Commits

Author SHA1 Message Date
Daniel Maya c1a7fc2e9a Added snmp_storm_silence_period 2020-10-28 10:57:21 +01:00
Daniel Maya db3313c76d added exception handler 2020-03-25 15:42:55 +01:00
Ramon Novoa 9743f1a2d4 Fix storm protection for SNMPv2 traps. 2020-03-06 12:59:31 +01:00
Ramon Novoa 892185a8ca Style fix. 2018-08-08 10:09:48 +02:00
Ramon Novoa 27d1d1d745 Add support for trap data coming from XML files.
Ref pandora_enterprise#2333.
2018-08-08 09:08:08 +02:00
fermin831 cc26124289 Rebranding open server 2018-05-17 16:12:44 +02:00
Ramon Novoa 600c43935d Replace a 'next' statement that exits a subroutine with a 'return'.
Ref pandora_enterprise#1733.
2018-01-08 10:49:57 +01:00
daniel 62a273dbdc fixed minor error snmpserver 2017-12-29 11:43:15 +01:00
Arturo Gonzalez 3f77b3ae7d Added changes to snmp server to evaluate all filters in the same virtual world 2017-10-26 12:01:04 +02:00
Arturo Gonzalez 91a39ab01e Added visual upgrades to filter view 2017-10-26 11:03:08 +02:00
Arturo Gonzalez efd8c850a0 Added new filter function to snmp traps 2017-10-25 16:47:58 +02:00
Hirofumi Kosaka 660a4594e5 Changed verbosity level of the warning "snmpTrapOID not found" to 5. 2017-06-20 16:56:19 +09:00
Hirofumi Kosaka 09ddd9aa93 Improved SNMP trap handling against incomplete traps or partially delayed ones. 2017-06-19 15:54:27 +09:00
fbsanchez 24245b610e Fixed line ending
removed windows style
2016-10-31 12:41:16 +01:00
fbsanchez 0df53387a1 Fixed permissions over snmp IDX file 2016-10-31 12:36:54 +01:00
Ramon Novoa 00ba97f44b Added an option to delay SNMP trap processing. 2016-08-09 12:12:13 +02:00
hkosaka f37f9daf33 Read SNMPLOG with buffering in order to handle multi-line Traps. 2015-03-17 15:40:28 +09:00
Ramon Novoa 73636d1422 Do not change the server_threshold from the SNMP Server, since that
affects other servers too!

(cherry picked from commit ce9e337cb3)
2015-03-05 16:21:32 +01:00
Ramon Novoa cc196880a2 Read the trap type (notification type) of SNMPv2 traps. 2014-11-17 15:44:34 +01:00
Ramon Novoa 1122c578e6 Fixed a typo. 2014-09-25 10:56:08 +02:00
Ramon Novoa 0349404003 Fixed the master server query.
The master server should only take modules from servers of the same type.
2014-09-10 18:05:33 +02:00
Ramon Novoa 5282d9ef9a Added constants for server types. 2014-09-10 18:05:33 +02:00
Ramon Novoa d91a102537 2014-07-28 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf.new,
	  lib/PandoraFMS/Config.pm: Added configuration tokens to disable the
	  translation of enterprise strings and variable bindings (SNMP console).

	* lib/PandoraFMS/SNMPServer.pm: Added thread support to the SNMP console.

	* lib/PandoraFMS/DB.pm: Fixed a warning.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10359 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-28 16:24:40 +00:00
Ramon Novoa 012634abca 2014-05-22 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/NetworkServer.pm,
	  lib/PandoraFMS/NmapParser.pm,
	  lib/PandoraFMS/ReconServer.pm,
	  lib/PandoraFMS/SNMPServer.pm,
	  lib/PandoraFMS/Tools.pm,
	  lib/PandoraFMS/Traceroute.pm,
	  lib/PandoraFMS/WMIServer.pm: Fixes for win32.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9984 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-22 10:49:49 +00:00
hax0l 16e3576795 2013-11-07 Axel Amigo <axel.amigo@artica.es>
* pandora_server\lib\PandoraFMS\Config.pm: Added support for SNMP Forwarding tokens

         pandora_server\lib\PandoraFMS\SNMPServer.pm: Added new SNMP forwarding feature

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9033 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-11-07 16:23:44 +00:00
Ramon Novoa adfadf5e2d 2013-08-13 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/NetworkServer.pm: Use the agent's address if ip_target
	  is not set.

	* lib/PandoraFMS/Core.pm: Fixed a warning.

	* conf/pandora_server.conf.new,
	  lib/PandoraFMS/Config.pm,
	  lib/PandoraFMS/SNMPServer.pm: Added SNMP storm protection.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8658 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-13 17:04:56 +00:00
Ramon Novoa 87e009308a 2013-08-01 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DataServer.pm,
	  lib/PandoraFMS/SNMPServer.pm,
	  lib/PandoraFMS/Server.pm,
	  lib/PandoraFMS/PluginServer.pm,
	  lib/PandoraFMS/ProducerConsumerServer.pm,
	  lib/PandoraFMS/PredictionServer.pm,
	  lib/PandoraFMS/ReconServer.pm,
	  lib/PandoraFMS/NetworkServer.pm,
	  lib/PandoraFMS/WMIServer.pm: Added clean-up code to avoid resource
	  leaks when there is a crash and the server has to auto-restart.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8611 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-01 09:54:21 +00:00
Ramon Novoa b31630b986 2013-03-05 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Added an option to start the snmptrapd
	  daemon manually.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7788 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-05 17:59:46 +00:00
hkosaka b2698a1655 2013-01-10 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/SNMPServer.pm: Rewrite my commit at rev7388 in more
	general way. logger() call was deleted here, because the corresponding
	error message is recorded by pandora_crash(). Merged from 4.0.x.

	* lib/PandoraFMS/Core.pm: Fixed that invalid regex in
	critical_str or warning_str could make server down at worst.
	Not used logger() here, because the corresponding error
        message is recorded by pandora_crash(). Merged from 4.0.x.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-10 09:23:39 +00:00
hkosaka b872a94ad9 2013-01-09 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/SNMPServer.pm: Made sure SNMP filter is valid
	before performing string matching. It could make Pandora Server
	down at worst.  Merged from 4.0 branch.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7389 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-09 11:16:52 +00:00
hkosaka 71a67e8291 2012-11-30 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/SNMPServer.pm: Added missing safe_output()
	for trap filters. This fixed a bug that a backslash could not
	escape its following character.

	Merged from 4.0 branch.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7212 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-11-30 06:18:29 +00:00
koichirok 151024c1c3 2012-04-19 Koichiro Kikuchi <koichiro@rworks.jp>
* conf/pandora_server.conf.windows,
	  conf/pandora_server.conf,
	  lib/PandoraFMS/DB.pm
	  lib/PandoraFMS/Core.pm
	  lib/PandoraFMS/SNMPServer.pm
	  lib/PandoraFMS/Config.pm
	  lib/PandoraFMS/ProducerConsumerServer.pm
	  bin/pandora_server
	  FreeBSD/pandora_server.conf
	  util/pandora_db.pl
	  util/recon_scripts/snmpdevices.pl
	  util/recon_scripts/ipmi-recon.pl
	  util/plugin/pandora_inventory_change.pl
	  util/plugin/pandora_server_status.pl
	  util/pandora_manage.pl
	  util/pandora_recode_db.pl
	  util/pandora_dbstress.pl: Now pandora_server supports MySQL
	 server running on non-standard port.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6054 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-04-20 03:56:09 +00:00
koichirok d710a5f302 2012-02-20 Koichiro Kikuchi <koichiro@rworks.jp>
* lib/PandoraFMS/SNMPServer.pm: Parse source field to obtain source
	 IP address not only when trap version is SNMPv2, but also when
	 snmp_pdu_address set to 1.

	* conf/pandora_server.conf: Fixed comment.

	* FreeBSD/pandora_server.conf: Added missing configuration tokens.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5626 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-21 06:49:39 +00:00
Ramon Novoa fab2cefad5 2012-02-20 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf,
	  lib/PandoraFMS/SNMPServer.pm,
	  lib/PandoraFMS/Config.pm: Added two new configuration tokens
	  suggested by Koichiro: snmp_ignore_authfailure and snmp_pdu_address.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5623 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-20 17:47:08 +00:00
koichirok 2b173bedc5 2012-02-06 Koichiro Kikuchi <koichiro@rworks.jp>
* lib/PandoraFMS/SNMPServer.pm: Added SNMPv2 Trap support!



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5489 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-06 09:09:40 +00:00
slerena 29baddf275 2011-09-29 Sancho Lerena <slerena@artica.es>
* pandora_server/lib/PandoraFMS/SNMPServer.pm
        pandora_server/lib/PandoraFMS/Core.pm: SNMP Alerts now receibe
        trap type on the _data_ macro.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5028 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-09-30 11:32:02 +00:00
Ramon Novoa a2d3156f88 2011-09-01 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Kill snmptrapd if it's already running
	  when the SNMP Console starts and launch it again. Fixes bug #3402392.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4876 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-09-01 13:50:56 +00:00
slerena 1233edd112 2011-08-17 Sancho Lerena <slerena@artica.es>
* SNMPServer.pm: Custom value and custom type are not used anymore.
        All extended info comes into custom_oid which stores now all the
        raw info.

        * Core.pm: pandora_evaluate_snmp_alerts() function now uses complex
        regular expression and new macros to allow complex SNMP trap alerts 
        which takes information from the trap info and puts on the alert.

        * DataServer.pm: Fixed notice about undefined GIS position desc.

        * pandora_db.pl: Version update.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4761 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-08-17 20:11:32 +00:00
Ramon Novoa bb9cd2023f 2011-05-23 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Applied Koichiro's patch to reuse an
	  already running snmptrapd.

	* lib/PandoraFMS/DataServer.pm: Do not update the configuration of
	  policy modules.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4376 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-23 13:13:34 +00:00
Ramon Novoa e7e394009d 2011-04-18 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm,
	  lib/PandoraFMS/NetworkServer.pm,
	  lib/PandoraFMS/DB.pm,
	  lib/PandoraFMS/Core.pm: Adding support for Oracle. The main loop
	  works now.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4244 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-18 16:42:18 +00:00
Ramon Novoa c69f48e890 2011-04-13 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm,
	  lib/PandoraFMS/Config.pm,
	  lib/PandoraFMS/NetworkServer.pm,
	  lib/PandoraFMS/WMIServer.pm,
	  lib/PandoraFMS/PluginServer.pm,
	  lib/PandoraFMS/DB.pm,
	  lib/PandoraFMS/ProducerConsumerServer.pm,
	  lib/PandoraFMS/PredictionServer.pm,
	  lib/PandoraFMS/Core.pm,
	  lib/PandoraFMS/ReconServer.pm,
	  bin/pandora_server,
	  util/pandora_db.pl,
	  util/pandora_manage.pl,
	  util/recon_scripts/snmpdevices.pl: Adding support for PostgreSQL and
	  Oracle (not complete).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4213 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 16:28:59 +00:00
slerena c17b42d264 2010-09-08 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/SNMPServer.pm
        lib/PandoraFMS/Core.pm: SNMP Trap console doesnt send trap value
        to alert function. Now does :-)




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3230 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-08 16:53:44 +00:00
Ramon Novoa 6d2031dac1 2010-08-10 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Added support for SNMP filters.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3124 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-08-10 17:58:36 +00:00
Ramon Novoa a8a82a4cd8 2010-07-20 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Add extended information when saving
          an SNMP trap to a module.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3042 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-20 16:30:18 +00:00
Ramon Novoa 2579c0aecd 2010-06-01 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Set default values to avoid warnings.
          Fixes bug #3009858.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2829 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-06-01 12:20:10 +00:00
Ramon Novoa 6d8f871893 2010-05-19 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm, lib/PandoraFMS/Config.pm,
          lib/PandoraFMS/Server.pm, lib/PandoraFMS/NetworkServer.pm,
          lib/PandoraFMS/GIS.pm, lib/PandoraFMS/WMIServer.pm,
          lib/PandoraFMS/PluginServer.pm, lib/PandoraFMS/ProducerConsumerServer.pm,
          lib/PandoraFMS/PredictionServer.pm, lib/PandoraFMS/Core.pm,
          lib/PandoraFMS/ReconServer.pm, lib/PandoraFMS/DataServer.pm,
          bin/pandora_server, util/pandora_db.pl, util/gpx2pandora_agent_data.pl,
          util/pandora_manage.pl, util/pandora_dbstress.pl: Added the default library path
          used by RPM and DEB packages.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2755 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-05-19 16:59:00 +00:00
Ramon Novoa 287a76b751 2009-11-13 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf: Updated configuration tokens.

        * lib/PandoraFMS/SNMPServer.pm, lib/PandoraFMS/Config.pm,
          lib/PandoraFMS/PluginServer.pm, lib/PandoraFMS/PredictionServer.pm,
          lib/PandoraFMS/Core.pm, lib/PandoraFMS/ReconServer.pm,
          lib/PandoraFMS/DataServer.pm, lib/PandoraFMS/NetworkServer.pm,
          lib/PandoraFMS/Tools.pm, lib/PandoraFMS/WMIServer.pm,
          bin/pandora_server: Standardized and improved logging.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-13 13:52:48 +00:00
Ramon Novoa 63cfd01ff2 2009-10-20 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Save as much information as possible if
          the trap could not be properly parsed.

        * lib/PandoraFMS/Core.pm: Changed the name of the alert name macro to
          avoid conflicts with other macros.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2037 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-20 11:19:08 +00:00
slerena b56c3d8ef7 2009-10-15 Sancho lerena <slernea@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Fixed small problem in snmp2agent
        forwarding and better implementation of server error control.
        Also solved problem with duplicated traps in SNMP console.

        * lib/PandoraFMS/Server.pm: better implementation of server error control.

        * lib/PandoraFMS/Core.pm: SNMP alerts now show the IP in _agent_ macro   

        * lib/PandoraFMS/Tools.pm: Better management of enterprise_hook on 
        opensource version. 

        * util/alert_multicast.pl: Added sample of alert script for render
        alerts as multicast XML.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2023 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-15 11:23:40 +00:00
Ramon Novoa 0205f8fd9b 2009-10-07 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm,
          lib/PandoraFMS/DataServer.pm: Reverted the way enterprise functions
          are called.

        * lib/PandoraFMS/Server.pm
          lib/PandoraFMS/ProducerConsumerServer.pm: Handle fatal errors and
          save error messages (useful for console event generation).

        * lib/PandoraFMS/Tools.pm: Improved enterprise_hook.

        * lib/PandoraFMS/Core.pm: Merged pandora_event_status into
          pandora_event.

        * bin/pandora_server, lib/PandoraFMS/Config.pm: Added restart on error
          and auto-restart features.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2010 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 15:10:14 +00:00