diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/Changelog jffnms-0.8.2/Changelog --- jffnms-0.8.1/Changelog 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/Changelog 2005-05-09 21:04:25.850374744 -0300 @@ -1,5 +1,102 @@ When other people are involved is noted if not it was me: Javier Szyszlican. +JFFNMS 0.8.2 Released 2005-05-09 +================================ + +*New Features: + + - Host MIB hrSensor support, tested under net-snmp with lm_sensors patch. + It can graph Temperature, Voltages and Fan's RPM. + Requested by: Michael Fuereder + + - New SNMP Trap handler. It uses plugins (receivers) to parse the traps and send them to backends. + It provides a more flexible system for SNMP Trap processing. + By: Erno Rigo + + - SystemMIB Name, Contact and Location added to the Windows, Linux, Solaris, Cisco and Alteon System informantion interface types. + This information is also tracked via AD so you will be notified of any change. + Sponsored by: John Wagrowski of Moraine Valley Community College + + - UPS MIB support, this should enable support for the Riello UPS or any other that implements the UPSMIB. + Sponsored by: Novikmec Jozef of Zentiva + + - Linux IPTables Chain support. This Interface type will graph the IPTables build-in chains bytes and packets. + By: Hans Peter Dittler + + - Cisco BGP Neighbor Routes graphing. This will only work with Cisco IOS version 12.0(26)S or later. + Request and info from: Fabiano Rodrigo Boscatto and Jade JDeane@sungardfutures |d|o|t| com + + - Cisco PIX support, Number of connections graph included. + By: Mario Spendier + + - Windows SNMP Informant Logical Disk Interface Type, offer Windows Disk Usage stats. + by: David Lima + + - Cisco NAT support, Active Binds and Input/Output packets graph by protocol (UDP, TCP, ICMP, Others). + By: Karl S |d|o|t| Hagen + + - Support for PHP snmp2_* functions. + By: Karl S |d|o|t| Hagen + + - The host_information discovery script now tries to discovery how many CPUs the host has. + + - Added Alarmed Hosts & Events to the Default View profile option values. + + - Added PIX Event and PIX Port to the PIX filter + + - Added Cisco ISDN Syslog Events + Requested by: Roberto Veiga + + - Included the "simple" discovery script, takes a Test OID and an interface name as parameter and returns an interface + if the OID is available. + + - Compaq Temperature Graph can be displayed in Fahrenheit now + Requested by: Chad Markley + +*Fixes: + + - Start Page alarms now exclude the hidden interfaces, so now the number matches what is seen in the interfaces screen. + Reported by: Chris Hammond + + - Rechability interface information is correctly tracked now if the Host IP changes. + Reported by: Travis Johnson + + - The cpu_util no longer users the number of cpus to scale the graph, since the only ones using this are the Cisco System Info, + and the Windows System info, which we do an average of the CPU usage of all the CPUs, so the MAX is still 100%. + Reported by: David Lima + + - The jffnms-snmp system (for tc and iptables) now uses the pass_persist call in snmpd.conf please re check your configuration. + Reported by: Hans Peter Dittler + + - SNMPv2 GET now handles multi-line strings correctly. + Reported by: Manoj Khabe + + - is_process_running() function now works fine on BSDs, changed "ps -eo args" to "ps axo args". + Fixed by: Chris Cappuccio + + - Disabled ordering in edit mode. + + - Triggers Users filter by user when used by a User Admin. + + - Trigger analizer now again honors the default "from" field from the trigger definition, if the trigger action parameter is not set. + + - PIX Syslog messages should match better now, removed the ^ in the regexps + Reported by: GuruLeeNyc + + - Its now possible to ack a lot of events with one click. + Reported by: GuruLeeNyc + + - Alteon Polling and Syslog Fixes + By: Craig Small + + - Poller2 and NAD now work with PostgreSQL. + + - Zone and Map trigger fields work again. + Reported by: Karl S |d|o|t| Hagen + + - Windows Security events work better now. + Reported By: Brian Hoban Fixed by: LIMA David + JFFNMS 0.8.1 Released 2005-03-07 ================================ diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/INSTALL jffnms-0.8.2/INSTALL --- jffnms-0.8.1/INSTALL 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/INSTALL 2005-05-09 21:04:24.504579336 -0300 @@ -91,6 +91,7 @@ error_reporting = E_ALL & ~E_NOTICE allow_url_fopen = On include_path = .:/usr/share/pear + short_open_tag = On --------------------------------------------------- --------------------------------------------------- diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/UPGRADE jffnms-0.8.2/UPGRADE --- jffnms-0.8.1/UPGRADE 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/UPGRADE 2005-05-09 21:04:25.785384624 -0300 @@ -1,6 +1,6 @@ This file explains the upgrade procedure between versions: -0.8.0 to 0.8.1 +0.8.1 to 0.8.2 ============== 0. You are adviced to upgrade your PHP and PostgreSQL (if you use that) versions before the upgrade, @@ -9,32 +9,32 @@ The new poller is still experimental, and its not enabled by default. Replace the with the actual path to the patch files, - '../jffnms-upgrade-0.8.0-to-0.8.1' if you are using jffnms-upgrade-0.8.0-to-0.8.1.tar.gz or - '/opt/jffnms-0.8.1/docs/upgrade' if you are using jffnms-0.8.1.tar.gz + '../jffnms-upgrade-0.8.1-to-0.8.2' if you are using jffnms-upgrade-0.8.1-to-0.8.2.tar.gz or + '/opt/jffnms-0.8.2/docs/upgrade' if you are using jffnms-0.8.2.tar.gz 1. Apply the code patch: # cd /opt/jffnms - # patch -p1 < /jffnms-0.8.0-to-0.8.1.patch + # patch -p1 < /jffnms-0.8.1-to-0.8.2.patch If you have not changed the code, there should not be any errors. Replace apache.apache with your HTTPd username and group (nobody, httpd, etc) - 2. Upgrade the DB: (This step is not needed in the 0.8.0 to 0.8.1 upgrade) + 2. Upgrade the DB: MySQL: Backup in case of failure: # mysqldump --opt -ujffnms -pjffnms jffnms > /tmp/jffnms.backup.mysql Upgrade the MySQL Tables: - # cat docs/upgrade/mysql/jffnms-0.8.0-to-0.8.1.mysql.diff* | mysql -u jffnms -pjffnms jffnms + # cat docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff* | mysql -u jffnms -pjffnms jffnms PgSQL: Backup in case of failure: # pg_dump -U jffnms jffnms -dROc > /tmp/jffnms.backup.pgsql Upgrade the PgSQL Tables: - # cat docs/upgrade/pgsql/jffnms-0.8.0-to-0.8.1.pgsql.diff* | psql jffnms jffnms + # cat docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff* | psql jffnms jffnms - 3. Copy the new binary files: (This step is not needed in the 0.8.0 to 0.8.1 upgrade) + 3. Copy the new binary files: # cp -Rv /files/* /opt/jffnms/ diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/conf/config.parse.inc.php jffnms-0.8.2/conf/config.parse.inc.php --- jffnms-0.8.1/conf/config.parse.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/conf/config.parse.inc.php 2005-05-09 21:04:24.524576296 -0300 @@ -24,7 +24,7 @@ if ($jffnms_config_file==false) { //No Real configuration found, use defaults $jffnms_configuration = $jffnms_config_defaults; - $jffnm_config_type = "default"; + $jffnms_config_type = "default"; $jffnms_config_file = dirname($jffnms_config_defaults_file)."/jffnms.conf"; } diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/conf/jffnms.conf.defaults jffnms-0.8.2/conf/jffnms.conf.defaults --- jffnms-0.8.1/conf/jffnms.conf.defaults 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/conf/jffnms.conf.defaults 2005-05-09 21:04:25.853374288 -0300 @@ -1,6 +1,6 @@ jffnms_version:description = Version -jffnms_version:default = 0.8.1 +jffnms_version:default = 0.8.2 jffnms_version:type = label jffnms_site:description = Site Name diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/unix/snmptrap.txt jffnms-0.8.2/docs/unix/snmptrap.txt --- jffnms-0.8.1/docs/unix/snmptrap.txt 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/unix/snmptrap.txt 1969-12-31 21:00:00.000000000 -0300 @@ -1,84 +0,0 @@ - -SNMP Trap Handler -================= - - -Setting up SNMP traps ---------------------- - -To get jffnms receiving traps, you will need to install a snmp trapd from -net-snmp (formerly CMU snmp) package or one that works similarly. In -the configuration file for snmptrapd, eg /etc/snmp/snmptrapd.conf put a line -like: -traphandle default php -q /opt/jffnms/engine/trap_receiver.php - -This tells snmptrapd to run that trap receiver program every time it gets -a trap. See snmptrapd.conf(5) manual page for details about what this does. - -Please remember to use the 'printNumericOids yes' option in your /etc/snmp/snmp.conf -or include -On in the snmptrapd command line - - -Configuring SNMP Trap Events ----------------------------- - -To configure a trap event, you will need to know the trap OID and the order -of the variable bindings (if you are going to use them). You then go to -the menu Administration->Events->SNMP Trap Events. Click on Add to make a new -trap event - -The following fields are used: - Action - You can edit or delete an existing trap event type here - ID - A unique id for the type - OID Match - The trap OID to match, this is NOT the variable bindings OID. - Interface, Username, State and Extra Info Fields - Which variable binding - will be used to fill in a particular field. Eg putting 2 in the username - field means the value for varbind 2 for the trap will be used as the - username. Putting * puts all the fields on the line, good for working - out what varbinds give what information. Leaving blank means this - field is null. - -An example: - -You're worried the fan on your router might be broken, so you want to -know if the fan is broken trap is sent, 1.3.6.1.4.1.9.9.13.3.0.4 -This trap has 5 variable bindings: -1 the enterprise of the trap, for this trap it is enterprises.9.9.13.3 -2 Name of the fan that has the problem, eg ps2 -3 The IP address of the source of the trap -4 The SNMP community of the trap -5 The state of the trap (its a number 1-5) - -Most of this is pretty useless, we only really need to know something has -happened and then to what fan is it. - -So we setup the event to fill in varbind 2 into the info field and then -setup a new event which prints -Problem with fan at . - -So the result on the events screen is something like - - Problem with fan at ps2. - - -Tables Description ------------------- - -The traps table is where the raw traps come in from the snmp trap daemon. -They are stored here and then analyzed by the consolidator. The fields have the following meanings: - - id - incremental unique id - date - date the trap was recieved - ip - IP address the trap came from - trap_oid - The OID (Object Identifier) of the trap. - analized - Has the trap been processed by the consolidator (0 means not yet) - -Each trap has a number of variable bindings. These bindings are put into -a table before processing. - - id - incremental unique id - trapid - The id of the trap that these variable bindings are for, foriegn key to traps.id - oid - Object ID of the variable binding, not really used in jffnms - value - The value of the binding, eg the number or variable measurement. - oidid - sequence number of the OID, gives the order the bindings came in from in the trap. - EG the first varbind in every trap will have 1 here. diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/unix/snmptrapd.conf jffnms-0.8.2/docs/unix/snmptrapd.conf --- jffnms-0.8.1/docs/unix/snmptrapd.conf 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/unix/snmptrapd.conf 2005-05-09 21:04:25.459434176 -0300 @@ -1 +1 @@ -traphandle default sh -c "(cd /opt/jffnms/engine; php -q /opt/jffnms/engine/trap_receiver.php)" +traphandle default /opt/jffnms/engine/trap_receiver.sh diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.0-to-0.8.1.mysql.diff.x_fix_internal_ids jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.0-to-0.8.1.mysql.diff.x_fix_internal_ids --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.0-to-0.8.1.mysql.diff.x_fix_internal_ids 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.0-to-0.8.1.mysql.diff.x_fix_internal_ids 1969-12-31 21:00:00.000000000 -0300 @@ -1,25 +0,0 @@ -ALTER TABLE interface_types AUTO_INCREMENT = 10001; -ALTER TABLE interface_types_fields AUTO_INCREMENT = 10001; -ALTER TABLE interface_types_field_types AUTO_INCREMENT = 10001; -ALTER TABLE graph_types AUTO_INCREMENT = 10001; -ALTER TABLE alarm_states AUTO_INCREMENT = 10001; -ALTER TABLE severity AUTO_INCREMENT = 10001; -ALTER TABLE syslog_types AUTO_INCREMENT = 10001; -ALTER TABLE traps_types AUTO_INCREMENT = 10001; -ALTER TABLE types AUTO_INCREMENT = 10001; -ALTER TABLE slas AUTO_INCREMENT = 10001; -ALTER TABLE slas_cond AUTO_INCREMENT = 10001; -ALTER TABLE slas_sla_cond AUTO_INCREMENT = 10001; -ALTER TABLE filters AUTO_INCREMENT = 10001; -ALTER TABLE filters_fields AUTO_INCREMENT = 10001; -ALTER TABLE filters_cond AUTO_INCREMENT = 10001; -ALTER TABLE pollers AUTO_INCREMENT = 10001; -ALTER TABLE pollers_groups AUTO_INCREMENT = 10001; -ALTER TABLE pollers_backend AUTO_INCREMENT = 10001; -ALTER TABLE pollers_poller_groups AUTO_INCREMENT = 10001; -ALTER TABLE autodiscovery AUTO_INCREMENT = 10001; -ALTER TABLE hosts_config_types AUTO_INCREMENT = 10001; -ALTER TABLE tools AUTO_INCREMENT = 10001; -ALTER TABLE profiles_options AUTO_INCREMENT = 10001; -ALTER TABLE actions AUTO_INCREMENT = 10001; -ALTER TABLE profiles_values AUTO_INCREMENT = 300; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alarmed_hosts jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alarmed_hosts --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alarmed_hosts 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alarmed_hosts 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,3 @@ +DELETE FROM profiles_values where id = 66; +INSERT INTO profiles_values (id, profile_option, description, value) VALUES (66, 26, 'Alarmed Hosts & Events', 'alarmed-hosts-events'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alteon jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alteon --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alteon 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.alteon 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,4 @@ +UPDATE pollers_poller_groups SET backend = 37 WHERE id = 177; +UPDATE syslog_types SET type = 70 WHERE id = 56; +UPDATE syslog_types SET state = 'up' WHERE id = 57; + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.bgp jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.bgp --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.bgp 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.bgp 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,28 @@ +DELETE FROM graph_types where id = 90; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (90, 'Routes', 6, 'bgp_routes', '', 500, 150, 0, 0, 0); + +UPDATE interface_types SET graph_default = 90 WHERE id = 6; + +DELETE FROM interface_types_fields where id = 319; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (319, 'Accepted Routers', 'accepted_routes', 40, 6, 20, 0, 0, 0, 'DS:accepted_routes:GAUGE:600:0:900000'); + +DELETE FROM interface_types_fields where id = 320; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (320, 'Advertised Routers', 'advertised_routes', 50, 6, 20, 0, 0, 0, 'DS:advertised_routes:GAUGE:600:0:900000'); + +DELETE FROM pollers where id = 179; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (179, 'accepted_routes', 'BGP Accepted Routes', 'snmp_counter', '.1.3.6.1.4.1.9.9.187.1.2.4.1.1..1.1'); + +DELETE FROM pollers where id = 180; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (180, 'advertised_routes', 'BGP Advertised Routes', 'snmp_counter', '.1.3.6.1.4.1.9.9.187.1.2.4.1.6..1.1'); + +UPDATE pollers_poller_groups SET backend = 32 WHERE id = 30; +UPDATE pollers_poller_groups SET pos = 40, backend = 32 WHERE id = 31; +UPDATE pollers_poller_groups SET pos = 50, backend = 32 WHERE id = 32; + +DELETE FROM pollers_poller_groups where id = 33; + +DELETE FROM pollers_poller_groups where id = 220; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (220, 8, 20, 179, 32); + +DELETE FROM pollers_poller_groups where id = 221; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (221, 8, 30, 180, 32); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cisco_nat jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cisco_nat --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cisco_nat 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cisco_nat 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,105 @@ +DELETE FROM graph_types where id = 92; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (92, 'NAT Active Binds', 44, 'cisco_nat_active', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 93; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (93, 'NAT Packets', 44, 'cisco_nat_packets', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types where id = 44; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (44, 'Cisco NAT', 0, 1, 'simple', '.1.3.6.1.4.1.9.10.77.1.2.1.0,NAT', 45, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 93, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 326; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (326, 'Index', 'index', 10, 44, 3, 0, 0, 0, '1'); + +DELETE FROM interface_types_fields where id = 327; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (327, 'Description', 'description', 20, 44, 7, 2, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 328; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (328, 'Cisco Max Inbound NAT Bytes', 'NatInMax', 30, 44, 8, 2, 1, 0, '1000000000'); + +DELETE FROM interface_types_fields where id = 329; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (329, 'Cisco Max Outbound NAT Bytes', 'NatOutMax', 40, 44, 8, 2, 1, 0, '1000000000'); + +DELETE FROM interface_types_fields where id = 330; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (330, 'Cisco NAT Other IP Outbound', 'cisco_nat_other_ip_outbound', 10, 44, 20, 0, 0, 0, 'DS:cisco_nat_other_ip_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 331; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (331, 'Cisco NAT Other IP Inbound', 'cisco_nat_other_ip_inbound', 15, 44, 20, 0, 0, 0, 'DS:cisco_nat_other_ip_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 332; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (332, 'Cisco NAT ICMP Outbound', 'cisco_nat_icmp_outbound', 20, 44, 20, 0, 0, 0, 'DS:cisco_nat_icmp_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 333; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (333, 'Cisco NAT ICMP Inbound', 'cisco_nat_icmp_inbound', 25, 44, 20, 0, 0, 0, 'DS:cisco_nat_icmp_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 334; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (334, 'Cisco NAT UDP Outbound', 'cisco_nat_udp_outbound', 30, 44, 20, 0, 0, 0, 'DS:cisco_nat_udp_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 335; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (335, 'Cisco NAT UDP Inbound', 'cisco_nat_udp_inbound', 35, 44, 20, 0, 0, 0, 'DS:cisco_nat_udp_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 336; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (336, 'Cisco NAT TCP Outbound', 'cisco_nat_tcp_outbound', 40, 44, 20, 0, 0, 0, 'DS:cisco_nat_tcp_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 337; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (337, 'Cisco NAT TCP Inbound', 'cisco_nat_tcp_inbound', 45, 44, 20, 0, 0, 0, 'DS:cisco_nat_tcp_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 338; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (338, 'Cisco NAT Active Binds', 'cisco_nat_active_binds', 50, 44, 20, 0, 0, 0, 'DS:cisco_nat_active_binds:GAUGE:600:0:100000'); + +DELETE FROM pollers where id = 182; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (182, 'cisco_nat_other_ip_inbound', 'Cisco NAT Other IP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.1'); + +DELETE FROM pollers where id = 183; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (183, 'cisco_nat_icmp_inbound', 'Cisco NAT ICMP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.2'); + +DELETE FROM pollers where id = 184; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (184, 'cisco_nat_udp_inbound', 'Cisco NAT UDP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.3'); + +DELETE FROM pollers where id = 185; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (185, 'cisco_nat_tcp_inbound', 'Cisco NAT TCP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.4'); + +DELETE FROM pollers where id = 186; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (186, 'cisco_nat_other_ip_outbound', 'Cisco NAT Other IP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.1'); + +DELETE FROM pollers where id = 187; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (187, 'cisco_nat_icmp_outbound', 'Cisco NAT ICMP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.2'); + +DELETE FROM pollers where id = 188; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (188, 'cisco_nat_udp_outbound', 'Cisco NAT UDP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.3'); + +DELETE FROM pollers where id = 189; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (189, 'cisco_nat_tcp_outbound', 'Cisco NAT TCP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.4'); + +DELETE FROM pollers where id = 190; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (190, 'cisco_nat_active_binds', 'Cisco NAT Active Binds', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.2.1.0'); + +DELETE FROM pollers_groups where id = 45; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (45, 'Cisco NAT', 44); + +DELETE FROM pollers_poller_groups where id = 223; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (223, 45, 50, 190, 32); + +DELETE FROM pollers_poller_groups where id = 224; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (224, 45, 10, 186, 32); + +DELETE FROM pollers_poller_groups where id = 225; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (225, 45, 20, 187, 32); + +DELETE FROM pollers_poller_groups where id = 226; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (226, 45, 30, 188, 32); + +DELETE FROM pollers_poller_groups where id = 227; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (227, 45, 40, 189, 32); + +DELETE FROM pollers_poller_groups where id = 228; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (228, 45, 15, 182, 32); + +DELETE FROM pollers_poller_groups where id = 229; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (229, 45, 25, 183, 32); + +DELETE FROM pollers_poller_groups where id = 230; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (230, 45, 35, 184, 32); + +DELETE FROM pollers_poller_groups where id = 231; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (231, 45, 45, 185, 32); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cpq_far jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cpq_far --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cpq_far 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.cpq_far 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,3 @@ +DELETE FROM interface_types_fields where id = 343; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (343, 'Show in Celcius', 'show_in_celcius', 30, 26, 5, 2, 1, 0, '1'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.iptables jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.iptables --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.iptables 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.iptables 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,47 @@ +DELETE FROM graph_types where id = 89; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (89, 'IPTables Rate', 42, 'iptables_rate', '', 500, 150, 0, 170, 1); + +DELETE FROM interface_types where id = 42; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (42, 'IPTables Chains', 1, 1, 'linux_iptables', '.1.3.6.1.4.1.2021.5002', 43, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 89, 1, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 314; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (314, 'IPTables Chain', 'chainnumber', 10, 42, 3, 1, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 315; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (315, 'Default Policy', 'policy', 30, 42, 7, 1, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 316; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (316, 'Number of Packets', 'ipt_packets', 10, 42, 20, 0, 0, 0, 'DS:ipt_packets:COUNTER:600:0:9999999999999'); + +DELETE FROM interface_types_fields where id = 317; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (317, 'Number of Bytes', 'ipt_bytes', 20, 42, 20, 0, 0, 0, 'DS:ipt_bytes:COUNTER:600:0:9999999999999'); + +DELETE FROM interface_types_fields where id = 318; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (318, 'Description', 'description', 20, 42, 7, 2, 1, 0, 'IPTables Chain'); + +DELETE FROM pollers where id = 177; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (177, 'ipt_packets', 'IPTables Chain Packets', 'snmp_counter', '.1.3.6.1.4.1.2021.5002.1.4.'); + +DELETE FROM pollers where id = 178; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (178, 'ipt_bytes', 'IPTables Chainl Bytes', 'snmp_counter', '.1.3.6.1.4.1.2021.5002.1.5.'); + +DELETE FROM pollers_groups where id = 43; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (43, 'IPTable Chain', 42); + +DELETE FROM pollers_poller_groups where id = 218; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (218, 43, 10, 178, 32); + +DELETE FROM pollers_poller_groups where id = 219; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (219, 43, 20, 177, 32); + +UPDATE interface_types_fields SET showable = 2 WHERE id = 123; +UPDATE interface_types_fields SET default_value = '' WHERE id = 318; + +UPDATE interface_types SET autodiscovery_validate = 1 WHERE id = 35; + +UPDATE interface_types_fields SET default_value = 'DS:ipt_packets:COUNTER:600:0:1000000000' WHERE id = 316; +UPDATE interface_types_fields SET default_value = 'DS:ipt_bytes:COUNTER:600:0:' WHERE id = 317; + +DELETE FROM interface_types_fields where id = 322; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (322, 'Estimated Bandwidth', 'bandwidth', 40, 42, 8, 2, 1, 0, '10240000'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.isdn jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.isdn --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.isdn 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.isdn 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,9 @@ +DELETE FROM syslog_types where id = 59; +INSERT INTO syslog_types (id, match_text, interface, username, state, info, type, pos) VALUES (59, '%ISDN-6-CONNECT: Interface (\\S+) is now (\\S+) (.+)$', '1', '', '2', '3', 72, 1); + +DELETE FROM syslog_types where id = 60; +INSERT INTO syslog_types (id, match_text, interface, username, state, info, type, pos) VALUES (60, '%ISDN-6-DISCONNECT: Interface (\\S+) (\\S+) (.+)$', '1', '', '2', '3', 72, 1); + +DELETE FROM types where id = 72; +INSERT INTO types (id, description, severity, text, generate_alarm, alarm_up, alarm_duration, show_default, show_host) VALUES (72, 'ISDN', 14, ' ', 1, 1, 0, 1, 1); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,26 @@ +DELETE FROM graph_types where id = 91; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (91, 'PIX Connections', 43, 'pix_connections', '', 500, 175, 0, 0, 0); + +DELETE FROM interface_types where id = 43; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (43, 'PIX Connections', 0, 0, 'pix_connections', '', 44, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 91, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 323; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (323, 'Index', 'index', 10, 43, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 324; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (324, 'Connections', 'pix_connections', 10, 43, 20, 0, 0, 0, 'DS:pix_connections:GAUGE:600:0:1000000'); + +DELETE FROM interface_types_fields where id = 325; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (325, 'Description', 'description', 20, 43, 7, 1, 1, 0, ''); + +DELETE FROM pollers where id = 181; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (181, 'pix_connections', 'Pix Connections Poller', 'snmp_counter', '.1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.'); + +DELETE FROM pollers_groups where id = 44; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (44, 'PIX Connection Stat', 43); + +DELETE FROM pollers_poller_groups where id = 222; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (222, 44, 10, 181, 32); + +UPDATE interface_types SET description = 'Cisco PIX', autodiscovery_validate = 1, autodiscovery_enabled = 1 WHERE id = 43; + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix_syslog jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix_syslog --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix_syslog 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.pix_syslog 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,21 @@ +UPDATE syslog_types SET match_text = '%PIX-3-305006:.+|%PIX-2-106012:.+|%PIX-3-305005:.+|%PIX-3-307001:.+' WHERE id = 29; +UPDATE syslog_types SET match_text = '%PIX-1-(\\d*): (.*)' WHERE id = 44; +UPDATE syslog_types SET match_text = '%PIX-2-(\\d*): (.*)' WHERE id = 45; +UPDATE syslog_types SET match_text = '%PIX-3-(\\d*): (.*)' WHERE id = 46; +UPDATE syslog_types SET match_text = '%PIX-4-(\\d*): (.*)' WHERE id = 47; +UPDATE syslog_types SET match_text = '%PIX-6-(\\d*): (.*)' WHERE id = 48; +UPDATE syslog_types SET match_text = '%PIX-5-(\\d*): (.*)' WHERE id = 49; +UPDATE syslog_types SET match_text = '%PIX-7-(\\d*): (.*)' WHERE id = 50; + +DELETE FROM filters_cond where id = 44; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (44, 20, 14, 5, '=', ''); + +DELETE FROM filters_cond where id = 45; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (45, 20, 15, 2, '=', '29'); + +DELETE FROM filters_cond where id = 46; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (46, 20, 16, 5, '=', ''); + +DELETE FROM filters_cond where id = 47; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (47, 20, 17, 2, '=', '28'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.rechable jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.rechable --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.rechable 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.rechable 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1 @@ +UPDATE interface_types SET autodiscovery_validate = 1 WHERE id = 20; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.sensors jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.sensors --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.sensors 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.sensors 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,27 @@ +DELETE FROM graph_types where id = 94; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (94, 'Sensor Value', 45, 'sensor_value', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types where id = 45; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (45, 'Sensors', 1, 1, 'sensors', '', 46, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 94, 1, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 339; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (339, 'Index', 'index', 10, 45, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 340; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (340, 'Value', 'value', 10, 45, 20, 0, 0, 0, 'DS:value:GAUGE:600:-100000:100000'); + +DELETE FROM interface_types_fields where id = 341; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (341, 'Description', 'description', 20, 45, 7, 1, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 342; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (342, 'Show in Celcius', 'show_celcius', 31, 45, 5, 2, 1, 0, '1'); + +DELETE FROM pollers where id = 191; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (191, 'value', 'Sensor Value', 'snmp_counter', '.1.3.6.1.2.1.25.8.1.5.'); + +DELETE FROM pollers_groups where id = 46; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (46, 'Sensors', 45); + +DELETE FROM pollers_poller_groups where id = 232; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (232, 46, 20, 191, 32); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.system_mib jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.system_mib --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.system_mib 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.system_mib 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,44 @@ +DELETE FROM interface_types_fields where id = 279; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (279, 'System Name', 'name', 40, 11, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 280; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (280, 'Location', 'location', 50, 11, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 281; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (281, 'Contact', 'contact', 60, 11, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 282; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (282, 'System Name', 'name', 50, 12, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 283; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (283, 'Location', 'location', 60, 12, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 284; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (284, 'Contact', 'contact', 70, 12, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 285; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (285, 'System Name', 'name', 40, 3, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 286; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (286, 'Location', 'location', 50, 3, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 287; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (287, 'Contact', 'contact', 60, 3, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 288; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (288, 'System Name', 'name', 40, 10, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 289; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (289, 'Location', 'location', 50, 10, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 290; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (290, 'Contact', 'contact', 60, 10, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 291; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (291, 'System Name', 'name', 40, 35, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 292; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (292, 'Location', 'location', 50, 35, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 293; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (293, 'Contact', 'contact', 60, 35, 7, 1, 0, 1, ''); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.traps jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.traps --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.traps 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.traps 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,24 @@ +DROP TABLE traps_types; + +CREATE TABLE trap_receivers ( id int(10) NOT NULL auto_increment, position int(4) NOT NULL default '0', match_oid char(100) NOT NULL default '', description char(60) NOT NULL default '', command char(60) NOT NULL default '', parameters char(250) NOT NULL default '', backend int(10) NOT NULL default '1', interface_type int(10) NOT NULL default '1', stop_if_matches tinyint(1) NOT NULL default '1', PRIMARY KEY (id), UNIQUE KEY id (id), KEY id_2 (id)) TYPE=MyISAM; # --- MY --- + +--- PG --- CREATE SEQUENCE trap_receivers_id_seq; +--- PG --- CREATE TABLE trap_receivers ( id INT4 DEFAULT nextval('trap_receivers_id_seq'), position INT4 NOT NULL default '0', match_oid varchar(100) NOT NULL default '', description varchar(60) NOT NULL default '', command varchar(60) NOT NULL default '', parameters varchar(250) NOT NULL default '', backend INT4 NOT NULL default '1', interface_type INT4 NOT NULL default '1', stop_if_matches INT2 NOT NULL default '1', PRIMARY KEY (id)); + +UPDATE traps SET analized = 1; +DELETE FROM traps; +ALTER TABLE traps DROP COLUMN date; +ALTER TABLE traps ADD COLUMN date int(10) NOT NULL default '0'; + + +DELETE FROM trap_receivers where id = 1; +INSERT INTO trap_receivers (id, position, match_oid, description, command, parameters, backend, interface_type, stop_if_matches) VALUES (1, 99, '.*', 'Default Trap Receiver', 'unknown', '', 2, 1, 1); + +DELETE FROM trap_receivers where id = 2; +INSERT INTO trap_receivers (id, position, match_oid, description, command, parameters, backend, interface_type, stop_if_matches) VALUES (2, 10, '.1.3.6.1.6.3.1.1.5.4', 'Link Up', 'static', 'up,interfacenumber,1', 12, 4, 1); + +DELETE FROM trap_receivers where id = 3; +INSERT INTO trap_receivers (id, position, match_oid, description, command, parameters, backend, interface_type, stop_if_matches) VALUES (3, 10, '.1.3.6.1.6.3.1.1.5.3', 'Link Down', 'static', 'down,interfacenumber,1', 12, 4, 1); + +DELETE FROM pollers_backend where id = 2; +INSERT INTO pollers_backend (id, description, command, parameters, type) VALUES (2, 'Unknown Event', 'event', '1', 0); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.ups_mib jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.ups_mib --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.ups_mib 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.ups_mib 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,119 @@ +DELETE FROM alarm_states where id = 26; +INSERT INTO alarm_states (id, description, activate_alarm, sound_in, sound_out, state) VALUES (26, 'battery depleted', 3, '', '', 1); + +DELETE FROM graph_types where id = 83; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (83, 'Battery Temperature', 40, 'temperature', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 84; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (84, 'Time Remaining', 40, 'ups_time_remaining', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 85; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (85, 'UPS Voltage', 41, 'ups_voltage', '', 500, 150, 0, 0, 1); + +DELETE FROM graph_types where id = 86; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (86, 'UPS Current', 41, 'ups_current', '', 500, 150, 0, 0, 1); + +DELETE FROM graph_types where id = 87; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (87, 'UPS Load', 41, 'ups_load', '', 500, 150, 0, 0, 1); + +DELETE FROM graph_types where id = 88; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (88, 'Charge Remaining', 40, 'ups_charge_remaining', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types where id = 40; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (40, 'UPS', 1, 1, 'ups', '', 41, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 84, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types where id = 41; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (41, 'UPS Lines', 0, 1, 'ups_lines', '', 42, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 85, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 300; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (300, 'Index', 'index', 10, 40, 3, 0, 0, 0, '1'); + +DELETE FROM interface_types_fields where id = 301; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (301, 'Identification', 'ident', 20, 40, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 302; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (302, 'Description', 'description', 30, 40, 7, 2, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 303; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (303, 'Battery Temperature', 'temperature', 10, 40, 20, 0, 0, 0, 'DS:temperature:GAUGE:600:0:200'); + +DELETE FROM interface_types_fields where id = 304; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (304, 'Show in Celcius', 'show_celcius', 40, 40, 5, 2, 1, 0, '1'); + +DELETE FROM interface_types_fields where id = 305; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (305, 'Minutes Remaining', 'minutes_remaining', 20, 40, 20, 0, 0, 0, 'DS:minutes_remaining:GAUGE:600:0:10000'); + +DELETE FROM interface_types_fields where id = 306; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (306, 'Index', 'index', 10, 41, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 307; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (307, 'Line Type', 'line_type', 20, 41, 8, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 308; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (308, 'Line Index', 'line_index', 30, 41, 8, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 309; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (309, 'Description', 'description', 40, 41, 7, 2, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 310; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (310, 'Voltage', 'voltage', 10, 41, 20, 0, 0, 0, 'DS:voltage:GAUGE:600:0:500'); + +DELETE FROM interface_types_fields where id = 311; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (311, 'Current', 'current', 20, 41, 20, 0, 0, 0, 'DS:current:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 312; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (312, 'Load', 'load', 30, 41, 20, 0, 0, 0, 'DS:load:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 313; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (313, 'Charge Remaining', 'charge_remaining', 30, 40, 20, 0, 0, 0, 'DS:charge_remaining:GAUGE:600:0:100'); + +DELETE FROM pollers where id = 170; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (170, 'status', 'UPS Battery Status', 'snmp_status', '.1.3.6.1.2.1.33.1.2.1.0,2=battery normal|1=battery unknown|3=battery low|3=battery depleted'); + +DELETE FROM pollers where id = 171; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (171, 'temperature', 'UPS Battery Temperature', 'snmp_counter', '.1.3.6.1.2.1.33.1.2.7.0'); + +DELETE FROM pollers where id = 172; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (172, 'minutes_remaining', 'UPS Battery Minutes Remaining', 'snmp_counter', '.1.3.6.1.2.1.33.1.2.3.0'); + +DELETE FROM pollers where id = 173; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (173, 'charge_remaining', 'UPS Battery Charge Remaining', 'snmp_counter', '.1.3.6.1.2.1.33.1.2.4.0'); + +DELETE FROM pollers where id = 174; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (174, 'voltage', 'UPS Lines Voltage', 'ups_line', ''); + +DELETE FROM pollers where id = 175; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (175, 'current', 'UPS Lines Current', 'ups_line', ''); + +DELETE FROM pollers where id = 176; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (176, 'load', 'UPS Lines Load', 'ups_line', ''); + +DELETE FROM pollers_groups where id = 41; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (41, 'UPS', 40); + +DELETE FROM pollers_groups where id = 42; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (42, 'UPS Lines', 41); + + +DELETE FROM pollers_poller_groups where id = 211; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (211, 41, 10, 170, 20); + +DELETE FROM pollers_poller_groups where id = 212; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (212, 41, 20, 173, 32); + +DELETE FROM pollers_poller_groups where id = 213; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (213, 41, 30, 172, 32); + +DELETE FROM pollers_poller_groups where id = 214; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (214, 41, 40, 171, 32); + +DELETE FROM pollers_poller_groups where id = 215; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (215, 42, 10, 174, 32); + +DELETE FROM pollers_poller_groups where id = 216; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (216, 42, 20, 175, 32); + +DELETE FROM pollers_poller_groups where id = 217; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (217, 42, 30, 176, 32); + + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.win_security jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.win_security --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.win_security 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.win_security 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,2 @@ +UPDATE syslog_types SET match_text = '^security\\[failure\\] (\\d*) (.*)', interface = '', state = '1', info = '2' WHERE id = 43; +UPDATE types SET text = ' (ID:)' WHERE id = 49; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.windows_informant jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.windows_informant --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.windows_informant 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.windows_informant 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,55 @@ +DELETE FROM interface_types where id = 39; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (39, 'Windows Logical Disks', 1, 1, 'informant_ldisks', '', 40, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 82, 0, 'none', 0, 1, 0); + + +DELETE FROM graph_types where id = 81; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (81, 'Time Usage', 39, 'inf_ldisk_time', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 82; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (82, 'I/O Rate', 39, 'inf_ldisk_rate', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types_fields where id = 294; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (294, 'Index', 'index', 10, 39, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 295; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (295, 'Description', 'description', 20, 39, 7, 2, 1, 0, 'SNMP Informant Disk Stats'); + +DELETE FROM interface_types_fields where id = 296; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (296, 'lDisk % Read Time', 'inf_d_read_time', 20, 39, 20, 0, 0, 0, 'DS:inf_d_read_time:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 297; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (297, 'lDisk % Write Time', 'inf_d_write_time', 10, 39, 20, 0, 0, 0, 'DS:inf_d_write_time:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 298; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (298, 'lDisk Read Rate', 'inf_d_read_rate', 30, 39, 20, 0, 0, 0, 'DS:inf_d_read_rate:GAUGE:600:0:1048576000'); + +DELETE FROM interface_types_fields where id = 299; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (299, 'lDisk Write Rate', 'inf_d_write_rate', 25, 39, 20, 0, 0, 0, 'DS:inf_d_write_rate:GAUGE:600:0:1048576000'); + +DELETE FROM pollers where id = 166; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (166, 'inf_d_read_time', 'Informant Disk Read Time', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.2.'); + +DELETE FROM pollers where id = 167; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (167, 'inf_d_write_time', 'Informant Disk Write Time', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.4.'); + +DELETE FROM pollers where id = 168; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (168, 'inf_d_read_rate', 'Informant Disk Read Rate', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.15.'); + +DELETE FROM pollers where id = 169; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (169, 'inf_d_write_rate', 'Informant Disk Write Rate', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.18.'); + +DELETE FROM pollers_groups where id = 40; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (40, 'Windows Informant Disks', 39); + + +DELETE FROM pollers_poller_groups where id = 207; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (207, 40, 10, 168, 32); + +DELETE FROM pollers_poller_groups where id = 208; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (208, 40, 20, 169, 32); + +DELETE FROM pollers_poller_groups where id = 209; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (209, 40, 30, 166, 32); + +DELETE FROM pollers_poller_groups where id = 210; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (210, 40, 40, 167, 32); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.x_fix_internal_ids jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.x_fix_internal_ids --- jffnms-0.8.1/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.x_fix_internal_ids 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/mysql/jffnms-0.8.1-to-0.8.2.mysql.diff.x_fix_internal_ids 2005-05-09 21:04:25.855373984 -0300 @@ -0,0 +1,25 @@ +ALTER TABLE interface_types AUTO_INCREMENT = 10001; +ALTER TABLE interface_types_fields AUTO_INCREMENT = 10001; +ALTER TABLE interface_types_field_types AUTO_INCREMENT = 10001; +ALTER TABLE graph_types AUTO_INCREMENT = 10001; +ALTER TABLE alarm_states AUTO_INCREMENT = 10001; +ALTER TABLE severity AUTO_INCREMENT = 10001; +ALTER TABLE syslog_types AUTO_INCREMENT = 10001; +ALTER TABLE trap_receivers AUTO_INCREMENT = 10001; +ALTER TABLE types AUTO_INCREMENT = 10001; +ALTER TABLE slas AUTO_INCREMENT = 10001; +ALTER TABLE slas_cond AUTO_INCREMENT = 10001; +ALTER TABLE slas_sla_cond AUTO_INCREMENT = 10001; +ALTER TABLE filters AUTO_INCREMENT = 10001; +ALTER TABLE filters_fields AUTO_INCREMENT = 10001; +ALTER TABLE filters_cond AUTO_INCREMENT = 10001; +ALTER TABLE pollers AUTO_INCREMENT = 10001; +ALTER TABLE pollers_groups AUTO_INCREMENT = 10001; +ALTER TABLE pollers_backend AUTO_INCREMENT = 10001; +ALTER TABLE pollers_poller_groups AUTO_INCREMENT = 10001; +ALTER TABLE autodiscovery AUTO_INCREMENT = 10001; +ALTER TABLE hosts_config_types AUTO_INCREMENT = 10001; +ALTER TABLE tools AUTO_INCREMENT = 10001; +ALTER TABLE profiles_options AUTO_INCREMENT = 10001; +ALTER TABLE actions AUTO_INCREMENT = 10001; +ALTER TABLE profiles_values AUTO_INCREMENT = 300; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.0-to-0.8.1.pgsql.diff.x_fix_internal_ids jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.0-to-0.8.1.pgsql.diff.x_fix_internal_ids --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.0-to-0.8.1.pgsql.diff.x_fix_internal_ids 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.0-to-0.8.1.pgsql.diff.x_fix_internal_ids 1969-12-31 21:00:00.000000000 -0300 @@ -1,25 +0,0 @@ -SELECT SETVAL('interface_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from interface_types)); -SELECT SETVAL('interface_types_fields_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from interface_types_fields)); -SELECT SETVAL('interface_types_field_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from interface_types_field_types)); -SELECT SETVAL('graph_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from graph_types)); -SELECT SETVAL('alarm_states_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from alarm_states)); -SELECT SETVAL('severity_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from severity)); -SELECT SETVAL('syslog_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from syslog_types)); -SELECT SETVAL('traps_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from traps_types)); -SELECT SETVAL('types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from types)); -SELECT SETVAL('slas_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from slas)); -SELECT SETVAL('slas_cond_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from slas_cond)); -SELECT SETVAL('slas_sla_cond_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from slas_sla_cond)); -SELECT SETVAL('filters_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from filters)); -SELECT SETVAL('filters_fields_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from filters_fields)); -SELECT SETVAL('filters_cond_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from filters_cond)); -SELECT SETVAL('pollers_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers)); -SELECT SETVAL('pollers_groups_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers_groups)); -SELECT SETVAL('pollers_backend_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers_backend)); -SELECT SETVAL('pollers_poller_groups_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers_poller_groups)); -SELECT SETVAL('autodiscovery_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from autodiscovery)); -SELECT SETVAL('hosts_config_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from hosts_config_types)); -SELECT SETVAL('tools_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from tools)); -SELECT SETVAL('profiles_options_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from profiles_options)); -SELECT SETVAL('actions_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from actions)); -SELECT SETVAL('profiles_values_id_seq',(select case when max(id)>299 then max(id) else 299 end from profiles_values)); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alarmed_hosts jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alarmed_hosts --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alarmed_hosts 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alarmed_hosts 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,3 @@ +DELETE FROM profiles_values where id = 66; +INSERT INTO profiles_values (id, profile_option, description, value) VALUES (66, 26, 'Alarmed Hosts & Events', 'alarmed-hosts-events'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alteon jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alteon --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alteon 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.alteon 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,4 @@ +UPDATE pollers_poller_groups SET backend = 37 WHERE id = 177; +UPDATE syslog_types SET type = 70 WHERE id = 56; +UPDATE syslog_types SET state = 'up' WHERE id = 57; + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.bgp jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.bgp --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.bgp 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.bgp 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,28 @@ +DELETE FROM graph_types where id = 90; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (90, 'Routes', 6, 'bgp_routes', '', 500, 150, 0, 0, 0); + +UPDATE interface_types SET graph_default = 90 WHERE id = 6; + +DELETE FROM interface_types_fields where id = 319; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (319, 'Accepted Routers', 'accepted_routes', 40, 6, 20, 0, 0, 0, 'DS:accepted_routes:GAUGE:600:0:900000'); + +DELETE FROM interface_types_fields where id = 320; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (320, 'Advertised Routers', 'advertised_routes', 50, 6, 20, 0, 0, 0, 'DS:advertised_routes:GAUGE:600:0:900000'); + +DELETE FROM pollers where id = 179; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (179, 'accepted_routes', 'BGP Accepted Routes', 'snmp_counter', '.1.3.6.1.4.1.9.9.187.1.2.4.1.1..1.1'); + +DELETE FROM pollers where id = 180; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (180, 'advertised_routes', 'BGP Advertised Routes', 'snmp_counter', '.1.3.6.1.4.1.9.9.187.1.2.4.1.6..1.1'); + +UPDATE pollers_poller_groups SET backend = 32 WHERE id = 30; +UPDATE pollers_poller_groups SET pos = 40, backend = 32 WHERE id = 31; +UPDATE pollers_poller_groups SET pos = 50, backend = 32 WHERE id = 32; + +DELETE FROM pollers_poller_groups where id = 33; + +DELETE FROM pollers_poller_groups where id = 220; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (220, 8, 20, 179, 32); + +DELETE FROM pollers_poller_groups where id = 221; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (221, 8, 30, 180, 32); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cisco_nat jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cisco_nat --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cisco_nat 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cisco_nat 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,105 @@ +DELETE FROM graph_types where id = 92; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (92, 'NAT Active Binds', 44, 'cisco_nat_active', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 93; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (93, 'NAT Packets', 44, 'cisco_nat_packets', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types where id = 44; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (44, 'Cisco NAT', 0, 1, 'simple', '.1.3.6.1.4.1.9.10.77.1.2.1.0,NAT', 45, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 93, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 326; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (326, 'Index', 'index', 10, 44, 3, 0, 0, 0, '1'); + +DELETE FROM interface_types_fields where id = 327; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (327, 'Description', 'description', 20, 44, 7, 2, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 328; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (328, 'Cisco Max Inbound NAT Bytes', 'NatInMax', 30, 44, 8, 2, 1, 0, '1000000000'); + +DELETE FROM interface_types_fields where id = 329; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (329, 'Cisco Max Outbound NAT Bytes', 'NatOutMax', 40, 44, 8, 2, 1, 0, '1000000000'); + +DELETE FROM interface_types_fields where id = 330; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (330, 'Cisco NAT Other IP Outbound', 'cisco_nat_other_ip_outbound', 10, 44, 20, 0, 0, 0, 'DS:cisco_nat_other_ip_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 331; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (331, 'Cisco NAT Other IP Inbound', 'cisco_nat_other_ip_inbound', 15, 44, 20, 0, 0, 0, 'DS:cisco_nat_other_ip_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 332; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (332, 'Cisco NAT ICMP Outbound', 'cisco_nat_icmp_outbound', 20, 44, 20, 0, 0, 0, 'DS:cisco_nat_icmp_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 333; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (333, 'Cisco NAT ICMP Inbound', 'cisco_nat_icmp_inbound', 25, 44, 20, 0, 0, 0, 'DS:cisco_nat_icmp_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 334; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (334, 'Cisco NAT UDP Outbound', 'cisco_nat_udp_outbound', 30, 44, 20, 0, 0, 0, 'DS:cisco_nat_udp_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 335; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (335, 'Cisco NAT UDP Inbound', 'cisco_nat_udp_inbound', 35, 44, 20, 0, 0, 0, 'DS:cisco_nat_udp_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 336; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (336, 'Cisco NAT TCP Outbound', 'cisco_nat_tcp_outbound', 40, 44, 20, 0, 0, 0, 'DS:cisco_nat_tcp_outbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 337; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (337, 'Cisco NAT TCP Inbound', 'cisco_nat_tcp_inbound', 45, 44, 20, 0, 0, 0, 'DS:cisco_nat_tcp_inbound:COUNTER:600:0:'); + +DELETE FROM interface_types_fields where id = 338; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (338, 'Cisco NAT Active Binds', 'cisco_nat_active_binds', 50, 44, 20, 0, 0, 0, 'DS:cisco_nat_active_binds:GAUGE:600:0:100000'); + +DELETE FROM pollers where id = 182; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (182, 'cisco_nat_other_ip_inbound', 'Cisco NAT Other IP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.1'); + +DELETE FROM pollers where id = 183; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (183, 'cisco_nat_icmp_inbound', 'Cisco NAT ICMP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.2'); + +DELETE FROM pollers where id = 184; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (184, 'cisco_nat_udp_inbound', 'Cisco NAT UDP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.3'); + +DELETE FROM pollers where id = 185; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (185, 'cisco_nat_tcp_inbound', 'Cisco NAT TCP Inbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.2.4'); + +DELETE FROM pollers where id = 186; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (186, 'cisco_nat_other_ip_outbound', 'Cisco NAT Other IP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.1'); + +DELETE FROM pollers where id = 187; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (187, 'cisco_nat_icmp_outbound', 'Cisco NAT ICMP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.2'); + +DELETE FROM pollers where id = 188; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (188, 'cisco_nat_udp_outbound', 'Cisco NAT UDP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.3'); + +DELETE FROM pollers where id = 189; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (189, 'cisco_nat_tcp_outbound', 'Cisco NAT TCP Outbound', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.3.1.1.3.4'); + +DELETE FROM pollers where id = 190; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (190, 'cisco_nat_active_binds', 'Cisco NAT Active Binds', 'snmp_counter', '.1.3.6.1.4.1.9.10.77.1.2.1.0'); + +DELETE FROM pollers_groups where id = 45; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (45, 'Cisco NAT', 44); + +DELETE FROM pollers_poller_groups where id = 223; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (223, 45, 50, 190, 32); + +DELETE FROM pollers_poller_groups where id = 224; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (224, 45, 10, 186, 32); + +DELETE FROM pollers_poller_groups where id = 225; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (225, 45, 20, 187, 32); + +DELETE FROM pollers_poller_groups where id = 226; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (226, 45, 30, 188, 32); + +DELETE FROM pollers_poller_groups where id = 227; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (227, 45, 40, 189, 32); + +DELETE FROM pollers_poller_groups where id = 228; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (228, 45, 15, 182, 32); + +DELETE FROM pollers_poller_groups where id = 229; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (229, 45, 25, 183, 32); + +DELETE FROM pollers_poller_groups where id = 230; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (230, 45, 35, 184, 32); + +DELETE FROM pollers_poller_groups where id = 231; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (231, 45, 45, 185, 32); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cpq_far jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cpq_far --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cpq_far 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.cpq_far 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,3 @@ +DELETE FROM interface_types_fields where id = 343; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (343, 'Show in Celcius', 'show_in_celcius', 30, 26, 5, 2, 1, 0, '1'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.iptables jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.iptables --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.iptables 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.iptables 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,47 @@ +DELETE FROM graph_types where id = 89; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (89, 'IPTables Rate', 42, 'iptables_rate', '', 500, 150, 0, 170, 1); + +DELETE FROM interface_types where id = 42; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (42, 'IPTables Chains', 1, 1, 'linux_iptables', '.1.3.6.1.4.1.2021.5002', 43, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 89, 1, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 314; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (314, 'IPTables Chain', 'chainnumber', 10, 42, 3, 1, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 315; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (315, 'Default Policy', 'policy', 30, 42, 7, 1, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 316; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (316, 'Number of Packets', 'ipt_packets', 10, 42, 20, 0, 0, 0, 'DS:ipt_packets:COUNTER:600:0:9999999999999'); + +DELETE FROM interface_types_fields where id = 317; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (317, 'Number of Bytes', 'ipt_bytes', 20, 42, 20, 0, 0, 0, 'DS:ipt_bytes:COUNTER:600:0:9999999999999'); + +DELETE FROM interface_types_fields where id = 318; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (318, 'Description', 'description', 20, 42, 7, 2, 1, 0, 'IPTables Chain'); + +DELETE FROM pollers where id = 177; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (177, 'ipt_packets', 'IPTables Chain Packets', 'snmp_counter', '.1.3.6.1.4.1.2021.5002.1.4.'); + +DELETE FROM pollers where id = 178; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (178, 'ipt_bytes', 'IPTables Chainl Bytes', 'snmp_counter', '.1.3.6.1.4.1.2021.5002.1.5.'); + +DELETE FROM pollers_groups where id = 43; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (43, 'IPTable Chain', 42); + +DELETE FROM pollers_poller_groups where id = 218; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (218, 43, 10, 178, 32); + +DELETE FROM pollers_poller_groups where id = 219; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (219, 43, 20, 177, 32); + +UPDATE interface_types_fields SET showable = 2 WHERE id = 123; +UPDATE interface_types_fields SET default_value = '' WHERE id = 318; + +UPDATE interface_types SET autodiscovery_validate = 1 WHERE id = 35; + +UPDATE interface_types_fields SET default_value = 'DS:ipt_packets:COUNTER:600:0:1000000000' WHERE id = 316; +UPDATE interface_types_fields SET default_value = 'DS:ipt_bytes:COUNTER:600:0:' WHERE id = 317; + +DELETE FROM interface_types_fields where id = 322; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (322, 'Estimated Bandwidth', 'bandwidth', 40, 42, 8, 2, 1, 0, '10240000'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.isdn jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.isdn --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.isdn 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.isdn 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,9 @@ +DELETE FROM syslog_types where id = 59; +INSERT INTO syslog_types (id, match_text, interface, username, state, info, type, pos) VALUES (59, '%ISDN-6-CONNECT: Interface (\\S+) is now (\\S+) (.+)$', '1', '', '2', '3', 72, 1); + +DELETE FROM syslog_types where id = 60; +INSERT INTO syslog_types (id, match_text, interface, username, state, info, type, pos) VALUES (60, '%ISDN-6-DISCONNECT: Interface (\\S+) (\\S+) (.+)$', '1', '', '2', '3', 72, 1); + +DELETE FROM types where id = 72; +INSERT INTO types (id, description, severity, text, generate_alarm, alarm_up, alarm_duration, show_default, show_host) VALUES (72, 'ISDN', 14, ' ', 1, 1, 0, 1, 1); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,26 @@ +DELETE FROM graph_types where id = 91; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (91, 'PIX Connections', 43, 'pix_connections', '', 500, 175, 0, 0, 0); + +DELETE FROM interface_types where id = 43; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (43, 'PIX Connections', 0, 0, 'pix_connections', '', 44, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 91, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 323; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (323, 'Index', 'index', 10, 43, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 324; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (324, 'Connections', 'pix_connections', 10, 43, 20, 0, 0, 0, 'DS:pix_connections:GAUGE:600:0:1000000'); + +DELETE FROM interface_types_fields where id = 325; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (325, 'Description', 'description', 20, 43, 7, 1, 1, 0, ''); + +DELETE FROM pollers where id = 181; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (181, 'pix_connections', 'Pix Connections Poller', 'snmp_counter', '.1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.'); + +DELETE FROM pollers_groups where id = 44; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (44, 'PIX Connection Stat', 43); + +DELETE FROM pollers_poller_groups where id = 222; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (222, 44, 10, 181, 32); + +UPDATE interface_types SET description = 'Cisco PIX', autodiscovery_validate = 1, autodiscovery_enabled = 1 WHERE id = 43; + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix_syslog jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix_syslog --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix_syslog 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.pix_syslog 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,21 @@ +UPDATE syslog_types SET match_text = '%PIX-3-305006:.+|%PIX-2-106012:.+|%PIX-3-305005:.+|%PIX-3-307001:.+' WHERE id = 29; +UPDATE syslog_types SET match_text = '%PIX-1-(\\d*): (.*)' WHERE id = 44; +UPDATE syslog_types SET match_text = '%PIX-2-(\\d*): (.*)' WHERE id = 45; +UPDATE syslog_types SET match_text = '%PIX-3-(\\d*): (.*)' WHERE id = 46; +UPDATE syslog_types SET match_text = '%PIX-4-(\\d*): (.*)' WHERE id = 47; +UPDATE syslog_types SET match_text = '%PIX-6-(\\d*): (.*)' WHERE id = 48; +UPDATE syslog_types SET match_text = '%PIX-5-(\\d*): (.*)' WHERE id = 49; +UPDATE syslog_types SET match_text = '%PIX-7-(\\d*): (.*)' WHERE id = 50; + +DELETE FROM filters_cond where id = 44; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (44, 20, 14, 5, '=', ''); + +DELETE FROM filters_cond where id = 45; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (45, 20, 15, 2, '=', '29'); + +DELETE FROM filters_cond where id = 46; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (46, 20, 16, 5, '=', ''); + +DELETE FROM filters_cond where id = 47; +INSERT INTO filters_cond (id, filter_id, pos, field_id, op, value) VALUES (47, 20, 17, 2, '=', '28'); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.rechable jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.rechable --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.rechable 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.rechable 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1 @@ +UPDATE interface_types SET autodiscovery_validate = 1 WHERE id = 20; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.sensors jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.sensors --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.sensors 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.sensors 2005-05-09 21:04:25.857373680 -0300 @@ -0,0 +1,27 @@ +DELETE FROM graph_types where id = 94; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (94, 'Sensor Value', 45, 'sensor_value', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types where id = 45; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (45, 'Sensors', 1, 1, 'sensors', '', 46, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 94, 1, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 339; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (339, 'Index', 'index', 10, 45, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 340; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (340, 'Value', 'value', 10, 45, 20, 0, 0, 0, 'DS:value:GAUGE:600:-100000:100000'); + +DELETE FROM interface_types_fields where id = 341; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (341, 'Description', 'description', 20, 45, 7, 1, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 342; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (342, 'Show in Celcius', 'show_celcius', 31, 45, 5, 2, 1, 0, '1'); + +DELETE FROM pollers where id = 191; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (191, 'value', 'Sensor Value', 'snmp_counter', '.1.3.6.1.2.1.25.8.1.5.'); + +DELETE FROM pollers_groups where id = 46; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (46, 'Sensors', 45); + +DELETE FROM pollers_poller_groups where id = 232; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (232, 46, 20, 191, 32); + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.system_mib jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.system_mib --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.system_mib 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.system_mib 2005-05-09 21:04:25.858373528 -0300 @@ -0,0 +1,44 @@ +DELETE FROM interface_types_fields where id = 279; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (279, 'System Name', 'name', 40, 11, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 280; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (280, 'Location', 'location', 50, 11, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 281; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (281, 'Contact', 'contact', 60, 11, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 282; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (282, 'System Name', 'name', 50, 12, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 283; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (283, 'Location', 'location', 60, 12, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 284; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (284, 'Contact', 'contact', 70, 12, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 285; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (285, 'System Name', 'name', 40, 3, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 286; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (286, 'Location', 'location', 50, 3, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 287; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (287, 'Contact', 'contact', 60, 3, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 288; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (288, 'System Name', 'name', 40, 10, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 289; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (289, 'Location', 'location', 50, 10, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 290; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (290, 'Contact', 'contact', 60, 10, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 291; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (291, 'System Name', 'name', 40, 35, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 292; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (292, 'Location', 'location', 50, 35, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 293; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (293, 'Contact', 'contact', 60, 35, 7, 1, 0, 1, ''); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.traps jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.traps --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.traps 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.traps 2005-05-09 21:04:25.858373528 -0300 @@ -0,0 +1,25 @@ +DROP TABLE traps_types CASCADE; + + +CREATE SEQUENCE trap_receivers_id_seq; +CREATE TABLE trap_receivers ( id INT4 DEFAULT nextval('trap_receivers_id_seq'), position INT4 NOT NULL default '0', match_oid varchar(100) NOT NULL default '', description varchar(60) NOT NULL default '', command varchar(60) NOT NULL default '', parameters varchar(250) NOT NULL default '', backend INT4 NOT NULL default '1', interface_type INT4 NOT NULL default '1', stop_if_matches INT2 NOT NULL default '1', PRIMARY KEY (id)); + +UPDATE traps SET analized = 1; +DELETE FROM traps; +ALTER TABLE traps DROP COLUMN date; +ALTER TABLE traps ADD COLUMN date int4; +UPDATE traps SET date = '0'; +ALTER TABLE traps ALTER COLUMN date SET DEFAULT '0'; + + +DELETE FROM trap_receivers where id = 1; +INSERT INTO trap_receivers (id, position, match_oid, description, command, parameters, backend, interface_type, stop_if_matches) VALUES (1, 99, '.*', 'Default Trap Receiver', 'unknown', '', 2, 1, 1); + +DELETE FROM trap_receivers where id = 2; +INSERT INTO trap_receivers (id, position, match_oid, description, command, parameters, backend, interface_type, stop_if_matches) VALUES (2, 10, '.1.3.6.1.6.3.1.1.5.4', 'Link Up', 'static', 'up,interfacenumber,1', 12, 4, 1); + +DELETE FROM trap_receivers where id = 3; +INSERT INTO trap_receivers (id, position, match_oid, description, command, parameters, backend, interface_type, stop_if_matches) VALUES (3, 10, '.1.3.6.1.6.3.1.1.5.3', 'Link Down', 'static', 'down,interfacenumber,1', 12, 4, 1); + +DELETE FROM pollers_backend where id = 2; +INSERT INTO pollers_backend (id, description, command, parameters, type) VALUES (2, 'Unknown Event', 'event', '1', 0); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.ups_mib jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.ups_mib --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.ups_mib 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.ups_mib 2005-05-09 21:04:25.858373528 -0300 @@ -0,0 +1,119 @@ +DELETE FROM alarm_states where id = 26; +INSERT INTO alarm_states (id, description, activate_alarm, sound_in, sound_out, state) VALUES (26, 'battery depleted', 3, '', '', 1); + +DELETE FROM graph_types where id = 83; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (83, 'Battery Temperature', 40, 'temperature', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 84; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (84, 'Time Remaining', 40, 'ups_time_remaining', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 85; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (85, 'UPS Voltage', 41, 'ups_voltage', '', 500, 150, 0, 0, 1); + +DELETE FROM graph_types where id = 86; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (86, 'UPS Current', 41, 'ups_current', '', 500, 150, 0, 0, 1); + +DELETE FROM graph_types where id = 87; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (87, 'UPS Load', 41, 'ups_load', '', 500, 150, 0, 0, 1); + +DELETE FROM graph_types where id = 88; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (88, 'Charge Remaining', 40, 'ups_charge_remaining', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types where id = 40; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (40, 'UPS', 1, 1, 'ups', '', 41, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 84, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types where id = 41; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (41, 'UPS Lines', 0, 1, 'ups_lines', '', 42, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 85, 0, 'none', 0, 1, 0); + +DELETE FROM interface_types_fields where id = 300; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (300, 'Index', 'index', 10, 40, 3, 0, 0, 0, '1'); + +DELETE FROM interface_types_fields where id = 301; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (301, 'Identification', 'ident', 20, 40, 7, 1, 0, 1, ''); + +DELETE FROM interface_types_fields where id = 302; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (302, 'Description', 'description', 30, 40, 7, 2, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 303; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (303, 'Battery Temperature', 'temperature', 10, 40, 20, 0, 0, 0, 'DS:temperature:GAUGE:600:0:200'); + +DELETE FROM interface_types_fields where id = 304; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (304, 'Show in Celcius', 'show_celcius', 40, 40, 5, 2, 1, 0, '1'); + +DELETE FROM interface_types_fields where id = 305; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (305, 'Minutes Remaining', 'minutes_remaining', 20, 40, 20, 0, 0, 0, 'DS:minutes_remaining:GAUGE:600:0:10000'); + +DELETE FROM interface_types_fields where id = 306; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (306, 'Index', 'index', 10, 41, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 307; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (307, 'Line Type', 'line_type', 20, 41, 8, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 308; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (308, 'Line Index', 'line_index', 30, 41, 8, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 309; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (309, 'Description', 'description', 40, 41, 7, 2, 1, 0, ''); + +DELETE FROM interface_types_fields where id = 310; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (310, 'Voltage', 'voltage', 10, 41, 20, 0, 0, 0, 'DS:voltage:GAUGE:600:0:500'); + +DELETE FROM interface_types_fields where id = 311; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (311, 'Current', 'current', 20, 41, 20, 0, 0, 0, 'DS:current:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 312; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (312, 'Load', 'load', 30, 41, 20, 0, 0, 0, 'DS:load:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 313; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (313, 'Charge Remaining', 'charge_remaining', 30, 40, 20, 0, 0, 0, 'DS:charge_remaining:GAUGE:600:0:100'); + +DELETE FROM pollers where id = 170; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (170, 'status', 'UPS Battery Status', 'snmp_status', '.1.3.6.1.2.1.33.1.2.1.0,2=battery normal|1=battery unknown|3=battery low|3=battery depleted'); + +DELETE FROM pollers where id = 171; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (171, 'temperature', 'UPS Battery Temperature', 'snmp_counter', '.1.3.6.1.2.1.33.1.2.7.0'); + +DELETE FROM pollers where id = 172; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (172, 'minutes_remaining', 'UPS Battery Minutes Remaining', 'snmp_counter', '.1.3.6.1.2.1.33.1.2.3.0'); + +DELETE FROM pollers where id = 173; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (173, 'charge_remaining', 'UPS Battery Charge Remaining', 'snmp_counter', '.1.3.6.1.2.1.33.1.2.4.0'); + +DELETE FROM pollers where id = 174; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (174, 'voltage', 'UPS Lines Voltage', 'ups_line', ''); + +DELETE FROM pollers where id = 175; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (175, 'current', 'UPS Lines Current', 'ups_line', ''); + +DELETE FROM pollers where id = 176; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (176, 'load', 'UPS Lines Load', 'ups_line', ''); + +DELETE FROM pollers_groups where id = 41; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (41, 'UPS', 40); + +DELETE FROM pollers_groups where id = 42; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (42, 'UPS Lines', 41); + + +DELETE FROM pollers_poller_groups where id = 211; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (211, 41, 10, 170, 20); + +DELETE FROM pollers_poller_groups where id = 212; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (212, 41, 20, 173, 32); + +DELETE FROM pollers_poller_groups where id = 213; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (213, 41, 30, 172, 32); + +DELETE FROM pollers_poller_groups where id = 214; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (214, 41, 40, 171, 32); + +DELETE FROM pollers_poller_groups where id = 215; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (215, 42, 10, 174, 32); + +DELETE FROM pollers_poller_groups where id = 216; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (216, 42, 20, 175, 32); + +DELETE FROM pollers_poller_groups where id = 217; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (217, 42, 30, 176, 32); + + diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.win_security jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.win_security --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.win_security 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.win_security 2005-05-09 21:04:25.858373528 -0300 @@ -0,0 +1,2 @@ +UPDATE syslog_types SET match_text = '^security\\[failure\\] (\\d*) (.*)', interface = '', state = '1', info = '2' WHERE id = 43; +UPDATE types SET text = ' (ID:)' WHERE id = 49; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.windows_informant jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.windows_informant --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.windows_informant 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.windows_informant 2005-05-09 21:04:25.858373528 -0300 @@ -0,0 +1,55 @@ +DELETE FROM interface_types where id = 39; +INSERT INTO interface_types (id, description, autodiscovery_validate, autodiscovery_enabled, autodiscovery_function, autodiscovery_parameters, autodiscovery_default_poller, have_graph, rrd_structure_rra, rrd_structure_res, rrd_structure_step, graph_default, break_by_card, update_handler, allow_manual_add, sla_default, have_tools) VALUES (39, 'Windows Logical Disks', 1, 1, 'informant_ldisks', '', 40, 1, 'RRA:AVERAGE:0.5:1:', '103680', 300, 82, 0, 'none', 0, 1, 0); + + +DELETE FROM graph_types where id = 81; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (81, 'Time Usage', 39, 'inf_ldisk_time', '', 500, 150, 0, 0, 0); + +DELETE FROM graph_types where id = 82; +INSERT INTO graph_types (id, description, type, graph1, graph2, sizex1, sizey1, sizex2, sizey2, allow_aggregation) VALUES (82, 'I/O Rate', 39, 'inf_ldisk_rate', '', 500, 150, 0, 0, 0); + +DELETE FROM interface_types_fields where id = 294; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (294, 'Index', 'index', 10, 39, 3, 0, 0, 0, ''); + +DELETE FROM interface_types_fields where id = 295; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (295, 'Description', 'description', 20, 39, 7, 2, 1, 0, 'SNMP Informant Disk Stats'); + +DELETE FROM interface_types_fields where id = 296; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (296, 'lDisk % Read Time', 'inf_d_read_time', 20, 39, 20, 0, 0, 0, 'DS:inf_d_read_time:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 297; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (297, 'lDisk % Write Time', 'inf_d_write_time', 10, 39, 20, 0, 0, 0, 'DS:inf_d_write_time:GAUGE:600:0:100'); + +DELETE FROM interface_types_fields where id = 298; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (298, 'lDisk Read Rate', 'inf_d_read_rate', 30, 39, 20, 0, 0, 0, 'DS:inf_d_read_rate:GAUGE:600:0:1048576000'); + +DELETE FROM interface_types_fields where id = 299; +INSERT INTO interface_types_fields (id, description, name, pos, itype, ftype, showable, overwritable, tracked, default_value) VALUES (299, 'lDisk Write Rate', 'inf_d_write_rate', 25, 39, 20, 0, 0, 0, 'DS:inf_d_write_rate:GAUGE:600:0:1048576000'); + +DELETE FROM pollers where id = 166; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (166, 'inf_d_read_time', 'Informant Disk Read Time', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.2.'); + +DELETE FROM pollers where id = 167; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (167, 'inf_d_write_time', 'Informant Disk Write Time', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.4.'); + +DELETE FROM pollers where id = 168; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (168, 'inf_d_read_rate', 'Informant Disk Read Rate', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.15.'); + +DELETE FROM pollers where id = 169; +INSERT INTO pollers (id, name, description, command, parameters) VALUES (169, 'inf_d_write_rate', 'Informant Disk Write Rate', 'snmp_counter', '.1.3.6.1.4.1.9600.1.1.1.1.18.'); + +DELETE FROM pollers_groups where id = 40; +INSERT INTO pollers_groups (id, description, interface_type) VALUES (40, 'Windows Informant Disks', 39); + + +DELETE FROM pollers_poller_groups where id = 207; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (207, 40, 10, 168, 32); + +DELETE FROM pollers_poller_groups where id = 208; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (208, 40, 20, 169, 32); + +DELETE FROM pollers_poller_groups where id = 209; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (209, 40, 30, 166, 32); + +DELETE FROM pollers_poller_groups where id = 210; +INSERT INTO pollers_poller_groups (id, poller_group, pos, poller, backend) VALUES (210, 40, 40, 167, 32); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.x_fix_internal_ids jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.x_fix_internal_ids --- jffnms-0.8.1/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.x_fix_internal_ids 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/docs/upgrade/pgsql/jffnms-0.8.1-to-0.8.2.pgsql.diff.x_fix_internal_ids 2005-05-09 21:04:25.858373528 -0300 @@ -0,0 +1,25 @@ +SELECT SETVAL('interface_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from interface_types)); +SELECT SETVAL('interface_types_fields_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from interface_types_fields)); +SELECT SETVAL('interface_types_field_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from interface_types_field_types)); +SELECT SETVAL('graph_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from graph_types)); +SELECT SETVAL('alarm_states_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from alarm_states)); +SELECT SETVAL('severity_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from severity)); +SELECT SETVAL('syslog_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from syslog_types)); +SELECT SETVAL('trap_receivers_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from trap_receivers)); +SELECT SETVAL('types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from types)); +SELECT SETVAL('slas_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from slas)); +SELECT SETVAL('slas_cond_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from slas_cond)); +SELECT SETVAL('slas_sla_cond_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from slas_sla_cond)); +SELECT SETVAL('filters_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from filters)); +SELECT SETVAL('filters_fields_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from filters_fields)); +SELECT SETVAL('filters_cond_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from filters_cond)); +SELECT SETVAL('pollers_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers)); +SELECT SETVAL('pollers_groups_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers_groups)); +SELECT SETVAL('pollers_backend_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers_backend)); +SELECT SETVAL('pollers_poller_groups_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from pollers_poller_groups)); +SELECT SETVAL('autodiscovery_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from autodiscovery)); +SELECT SETVAL('hosts_config_types_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from hosts_config_types)); +SELECT SETVAL('tools_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from tools)); +SELECT SETVAL('profiles_options_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from profiles_options)); +SELECT SETVAL('actions_id_seq',(select case when max(id)>10000 then max(id) else 10000 end from actions)); +SELECT SETVAL('profiles_values_id_seq',(select case when max(id)>299 then max(id) else 299 end from profiles_values)); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/utils/export_custom.php jffnms-0.8.2/docs/utils/export_custom.php --- jffnms-0.8.1/docs/utils/export_custom.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/utils/export_custom.php 2005-05-09 21:04:25.697398000 -0300 @@ -15,7 +15,7 @@ @mkdir ($result_path."/".$result_name); // Files - $command = "diff -x*png -x*.ini* -x*rrd -x*log -x*sql -Nru ". + $command = "diff -x*png -x*.ini* -x*rrd -x*log -x*sql -xjffnms.conf* -Nru ". "$base_installation $current_installation > $result_path/$result_name/$result_name.patch"; exec ($command,$result); @@ -53,7 +53,7 @@ " autodiscovery ",-1, " hosts_config_types",-1, " tools ",-1, -" profiles_values ",299, +" profiles_values ",301, " profiles_options ",-1, " triggers ",-1, " triggers_rules ",-1, diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/utils/jffnms-snmp/iptables.inc.php jffnms-0.8.2/docs/utils/jffnms-snmp/iptables.inc.php --- jffnms-0.8.1/docs/utils/jffnms-snmp/iptables.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/utils/jffnms-snmp/iptables.inc.php 2005-05-09 21:04:25.688399368 -0300 @@ -1,75 +1,119 @@ Javier Szyszlican + * Copyright (C) <2004> Hans Peter Dittler + * Copyright (C) <2005> Javier Szyszlican * This program is licensed under the GNU GPL, full terms in the LICENSE file */ + function tree_iptables () { $table_names_file = "/proc/net/ip_tables_names"; - $iptables="/sbin/iptables"; + $iptables="/usr/sbin/iptables"; - $tables_names = file($table_names_file); + if (file_exists($iptables)!==true) + $iptables = "/sbin/iptables"; + $tables_names = file($table_names_file); // read the names of iptables from proc $table_id = 1; + + $chain_id = 1; + $dyn_chain_id = 1001; + //$rule_id = 1; + - foreach ($tables_names as $table) { + foreach ($tables_names as $table) { // dump now each table + $table = trim($table); - $tables[$table_id][index]=$table_id; - $tables[$table_id][name]=$table; + + $tables[$table_id]["index"]=$table_id; + $tables[$table_id]["name"]=$table; // insert table index and table name into array tables unset ($result); - exec("$iptables --line-numbers -xvnL -t $table ",$result); + exec($iptables." --line-numbers -xvnL -t ".$table, $result); //dump chains and rules for each table $pos = 0; - $chain_id = 1; - $rule_id = 1; + foreach ($result as $data) { $data = trim($data); - //echo "$data\n"; - if ($pos==0) - if (preg_match ("/^Chain (\S+) \(policy (\S+) (\d+) packets, (\d+) bytes\)/",$data,$parts)) { - $chains[$chain_id][index]=$chain_id; - $chains[$chain_id][table]=$table_id; - $chains[$chain_id][name]=$parts[1]; - $chains[$chain_id][policy]=$parts[2]; - $chains[$chain_id][packets]=$parts[3]; - $chains[$chain_id][bytes]=$parts[4]; + if ($pos==0) { // first line of a chain defines name + + // this is a built-in chain: Chain OUTPUT (policy ACCEPT 1 packets, 32 bytes) + if (preg_match ("/^Chain (\S+) \(policy (\S+) (\d+) packets, (\d+) bytes\)/", $data, $parts)) { + + $chains[$chain_id]["index"] = $chain_id; + $chains[$chain_id]["table"] = $table_id; + $chains[$chain_id]["name"] = $parts[1]; + $chains[$chain_id]["policy"]= $parts[2]; + $chains[$chain_id]["packets"]=$parts[3]; + $chains[$chain_id]["bytes"] = $parts[4]; + + truncate_counter($chains[$chain_id]["packets"]); + truncate_counter($chains[$chain_id]["bytes"]); - truncate_counter($chains[$chain_id][packets]); - truncate_counter($chains[$chain_id][bytes]); + $chain_id++; } - if ($pos>1) - if (is_array($chains[$chain_id]) && - preg_match ("/^(\d+)\s+(\d+)\s+(\d+) (\S.+)/",$data,$parts)) { - $rules[$rule_id][index]=str_pad($table_id,2,"0",STR_PAD_LEFT).str_pad($chain_id,2,"0",STR_PAD_LEFT).str_pad($parts[1],4,"0",STR_PAD_LEFT); - $rules[$rule_id][chain]=$chain_id; - $rules[$rule_id][description]=$parts[4]; - $rules[$rule_id][packets]=$parts[2]; - $rules[$rule_id][bytes]=$parts[3]; - - for ($i = 0; $i < 10 ; $i++) - $rules[$rule_id][description] = trim(str_replace(" "," ",$rules[$rule_id][description])); - - truncate_counter($rules[$rule_id][packets]); - truncate_counter($rules[$rule_id][bytes]); - - $rule_id++; + // this is a dynamic chain: Chain forward_dmz (1 references) + if (preg_match ("/^Chain ([\S\.]+) \((\S+) references\)/", $data, $parts)) { + + $chains[$dyn_chain_id]["index"] = $chain_id; + $chains[$dyn_chain_id]["table"] = $table_id; + $chains[$dyn_chain_id]["name"] = $parts[1]; + $chains[$dyn_chain_id]["policy"]= "dynamic"; + + // dynamic chains have no counters, must be added manually + $chains[$dyn_chain_id]["packets"]= 0; + $chains[$dyn_chain_id]["bytes"] = 0; + + $dyn_chain_id++; } + } + + //RULES DISABLED + // match a rule line of format + // line bytes packets rule proto opt ifin ifout source dest options + // 7 0 0 LOG all -- * * 0.0.0.0/0 217.160.132.152 LOG flags 6 level 4 prefix `SuSE-FW ON ' + /* + if (($pos>1) && is_array($chains[$chain_id]) && + preg_match ("/^(\d+)\s+(\d+)\s+(\d+)\s+([\S\.]+)\s+(\S.+)/",$data,$parts)) { + + $rules[$rule_id][index] = str_pad($table_id,2,"0",STR_PAD_LEFT). + str_pad($chain_id,3,"0",STR_PAD_LEFT). + str_pad($parts[1],4,"0",STR_PAD_LEFT); + + $rules[$rule_id][chain]=$chain_id; + $rules[$rule_id][target]=$parts[4]; + $rules[$rule_id][description]=$parts[5]; + + $rules[$rule_id][packets]=$parts[2]; + $rules[$rule_id][bytes]=$parts[3]; + + truncate_counter($rules[$rule_id][packets]); + truncate_counter($rules[$rule_id][bytes]); + + for ($i = 0; $i < 10 ; $i++) + $rules[$rule_id][description] = trim(str_replace(" "," ",$rules[$rule_id]["description"])); + $rule_id++; + } + */ + $pos++; - if (empty($data)) { + if (empty($data)) { // an empty line indicates end of chain $pos = 0; - $chain_id++; + //$chain_id++; } } + $table_id++; } - $info[tables]=$tables; - $info[chains]=$chains; - $info[rules]=$rules; - return $info; + + $info["tables"]=$tables; + $info["chains"]=$chains; + //$info[rules]=$rules; + + return $info; } ?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/utils/jffnms-snmp/jffnms-snmp.php jffnms-0.8.2/docs/utils/jffnms-snmp/jffnms-snmp.php --- jffnms-0.8.1/docs/utils/jffnms-snmp/jffnms-snmp.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/utils/jffnms-snmp/jffnms-snmp.php 2005-05-09 21:04:25.688399368 -0300 @@ -28,99 +28,128 @@ if ($max_pass >= 1) $value = floor($value - $max_less); } - function create_rama ($oid,$k,$data,$deep,&$tree) { if (!is_numeric(current(array_keys($data)))) $data = array_values ($data); - //echo "rama $oid -deep $deep -k $k\n"; - //var_dump($data); - while (list ($k1,$item) = each ($data)) { if (is_array($item)) create_rama ("$oid.$k",$k1,$item,++$deep,$tree); else - if ($deep==0) { + if ($deep==0) $tree["$oid.$k.$k1"]=$item; - //echo "B: $oid - $k - $k1 - $item\n"; - } else { + else $tree["$oid.$k1.$k"]=$item; - //echo "C: $oid - $k1 - $k - $item\n"; - } } } function create_tree ($oid,$data,&$tree) { + $start = time(); + $data = array_values($data); - //echo "tree\n"; + foreach ($data as $k=>$v) { if (is_array($v)) create_rama ($oid,$k,$v,0,$tree); - else { + else $tree["$oid.$k"]=$v; - //echo "A: $oid.$k - $v\n"; - } } - return $tree; + + uksort($tree,"oid_cmp"); + reset ($tree); + + return time()-$start; } function secho ($oid,$var = NULL) { + $out .= "$oid\n"; + if (!is_null($var)){ - if (is_numeric($var)) $out .="integer\n"; - else $out.= "string\n"; - $out.="$var\n"; + $out .= ((is_numeric($var))?"integer":"string")."\n"; + $out .= $var."\n"; } - echo $out; + + return $out; } function walk_tree ($start, &$tree) { $show_next = 0; + reset ($tree); while (list ($k,$v) = each ($tree)) { - if (($show_next == 1) || (preg_match("/^$start\S+/",$k,$aux))) { - secho ($k,$v); - break; - } + if (($show_next == 1) || ((strpos($k, $start)===0) && ($k!==$start))) + return secho ($k,$v); if ($k===$start) $show_next = 1; } + + return "NONE\n"; } + + list ($myself, $tree_to_use, $base, $tree_refresh) = $_SERVER["argv"]; -list ($myself, $tree_to_use, $base, $oper, $oid) = $_SERVER["argv"]; + if (!is_numeric($tree_refresh)) + $tree_refresh = (1*60); -$trees = array("tc","iptables"); + include ($tree_to_use.".inc.php"); -if (in_array($tree_to_use,$trees)) { - $tree = array(); + $in = fopen("php://stdin","r"); + $step = 0; - $tree_filename = dirname($myself)."/".$tree_to_use.".state"; - $generate_again = 1; - - if ((file_exists($tree_filename)===true) && ((time() - filemtime($tree_filename)) < 60)) { //if tree is less than 60 seconds old - $generate_again = 0; //don't generate it again - $tree = unserialize(join("",file($tree_filename))); //load it from file - } - - if ($generate_again == 1) { - include ("$tree_to_use.inc.php"); - create_tree ($base,call_user_func("tree_$tree_to_use"),$tree); - uksort($tree,"oid_cmp"); - reset ($tree); + while ($line = fgets($in)) { + + $line = trim($line); - //save tree - $fp = fopen($tree_filename,"w+"); - fputs($fp,serialize($tree)); - fclose($fp); - } - - switch ($oper) { - case "-n" : walk_tree ($oid,$tree); break; - case "-g" : if (isset($tree[$oid])) secho ($oid,$tree[$oid]); break; - case "debug" : print_r ($tree); echo "Gen: $generate_again\n"; break; + if ($tree_time+$tree_refresh < time()) { + $tree = array(); + $creation_time = create_tree ($base,call_user_func("tree_".$tree_to_use),$tree); + $tree_time = time(); + } + + switch ($line) { + + case "DEBUG": + print_r($tree); + echo "Tree creation time: $creation_time, Created ".(time()-$tree_time)." seconds ago.\n"; + break; + + case "PING": + $result = "PONG\n"; + $step = 0; + break; + + default: + + switch ($step) { + case 0: $oper = $line; $step = 1; break; + case 1: $oid = $line; $step = 2; break; + } + + if ($step==2) { + $step = 0; + + switch ($oper) { + case "getnext": + $result = walk_tree ($oid, $tree); + break; + + case "get": + if (isset($tree[$oid])) + $result = secho ($oid,$tree[$oid]); + break; + } + + if (!isset($result)) $result = "NONE\n"; + } + } + + if (isset($result)) { + echo $result; + unset ($result); + } } -} ?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/utils/jffnms-snmp/snmpd.conf.example jffnms-0.8.2/docs/utils/jffnms-snmp/snmpd.conf.example --- jffnms-0.8.1/docs/utils/jffnms-snmp/snmpd.conf.example 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/utils/jffnms-snmp/snmpd.conf.example 2005-05-09 21:04:25.669402256 -0300 @@ -1,5 +1,5 @@ # Add this to your /etc/snmpd.conf # Replace the paths as needed -pass .1.3.6.1.4.1.2021.5001 /usr/bin/php -q /opt/jffnms/docs/utils/jffnms-snmp/jffnms-snmp.php tc .1.3.6.1.4.1.2021.5001 -pass .1.3.6.1.4.1.2021.5002 /usr/bin/php -q /opt/jffnms/docs/utils/jffnms-snmp.php iptables .1.3.6.1.4.1.2021.5002 +pass_persist .1.3.6.1.4.1.2021.5001 /usr/bin/php -q /opt/jffnms/docs/utils/jffnms-snmp/jffnms-snmp.php tc .1.3.6.1.4.1.2021.5001 +pass_persist .1.3.6.1.4.1.2021.5002 /usr/bin/php -q /opt/jffnms/docs/utils/jffnms-snmp.php iptables .1.3.6.1.4.1.2021.5002 diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/docs/utils/makedb_release.php jffnms-0.8.2/docs/utils/makedb_release.php --- jffnms-0.8.1/docs/utils/makedb_release.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/docs/utils/makedb_release.php 2005-05-09 21:04:25.708396328 -0300 @@ -37,7 +37,7 @@ " alarm_states ",-1, " severity ",-1, " syslog_types ",-1, -" traps_types ",-1, +" trap_receivers ",-1, " types ",-1, " slas ",-1, " slas_cond ",-1, diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/autodiscovery_interfaces.php jffnms-0.8.2/engine/autodiscovery_interfaces.php --- jffnms-0.8.1/engine/autodiscovery_interfaces.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/autodiscovery_interfaces.php 2005-05-09 21:04:25.329453936 -0300 @@ -38,7 +38,7 @@ function iad_params($params) { $base = array(NULL,NULL,NULL,NULL); $params[2] = true; - $params[3] = ($_SERVER["argv"][3]=="nolog")?false:true; //Do not insert events + $params[3] = ($_SERVER["argv"][3]=="nolog")?false:true; // Do not insert events foreach ($params as $pos=>$value) $base[$pos] = $value; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/autodiscovery_network.php jffnms-0.8.2/engine/autodiscovery_network.php --- jffnms-0.8.1/engine/autodiscovery_network.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/autodiscovery_network.php 2005-05-09 21:04:25.339452416 -0300 @@ -81,9 +81,12 @@ foreach ($private_nets as $priv) { list ($private_net, $private_mask) = explode ("/", $priv); - list ($net) = explode ("/", $ip); + list ($net, $net_mask) = explode ("/", $ip); - if (ip_same_network($net, $private_net, bitsmask_to_mask($private_mask))) + if ( + (ip_same_network($net, $private_net, bitsmask_to_mask($private_mask))) || // base net is the same network as a private net + (ip_same_network($net, "0.0.0.0", bitsmask_to_mask($net_mask))) // base net is 0.0.0.0 + ) return true; } diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/backends/alarm.php jffnms-0.8.2/engine/backends/alarm.php --- jffnms-0.8.1/engine/backends/alarm.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/backends/alarm.php 2005-05-09 21:04:24.897519600 -0300 @@ -4,14 +4,24 @@ * This program is licensed under the GNU GPL, full terms in the LICENSE file */ - // backend_paramters = EventTypeId (to generate the alarm),[alarm_state|nothing] (if result is empty what to use), time_wait (seconds to wait before between down and up events + // backend_parameters = EventTypeId (to generate the alarm),[alarm_state|nothing] (if result is empty what to use), time_wait (seconds to wait before between down and up events function backend_alarm($options,$alarm_description) { - //if we recieved an | in the result, parse it to use the right part as th event_info for the new event - if (strpos($alarm_description,"|")!==FALSE) list ($alarm_description,$event_info) = explode ("|",$alarm_description); - if (strpos($alarm_description,";")!==FALSE) list ($alarm_description,$event_info) = explode (";",$alarm_description); + if (is_string($alarm_description)) { // This is used with the pollers + //if we recieved an | in the result, parse it to use the right part as th event_info for the new event + + if (strpos($alarm_description,"|")!==FALSE) list ($alarm_description,$event_info) = explode ("|",$alarm_description); + if (strpos($alarm_description,";")!==FALSE) list ($alarm_description,$event_info) = explode (";",$alarm_description); + + } else { // this is used by the trap system + + $alarm_description = $options["status"]; + $event_info = $options["info"]; + } + + // Parse paramters list($event_type_id,$assume,$time_wait) = explode(",",$options["backend_parameters"]); @@ -30,7 +40,8 @@ if ($event_type_id && $alarm_state) { $now = time(); - $now_date = date("Y-m-d H:i:s",$now); + $now_date = (isset($options["date"])?$options["date"]:date("Y-m-d H:i:s",$now)); // use date set in the params (traps), or now + $processed = 0; $other_alarm = have_other_alarm($options["interface_id"],$event_type_id,array(ALARM_DOWN,ALARM_TESTING)); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/backends/event.php jffnms-0.8.2/engine/backends/event.php --- jffnms-0.8.1/engine/backends/event.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/backends/event.php 2005-05-09 21:04:24.909517776 -0300 @@ -0,0 +1,23 @@ + Erno Rigo + * This program is licensed under the GNU GPL, full terms in the LICENSE file + * + * Unconditionally inserts an event based on parameters. + */ + + function backend_event($params, $aux) { // $aux is only to conform with pollers_backend API + + $event_type_id = $params["backend_parameters"]; + + if ($params["host_id"] == 1) $params["info"] .= " From: ".$params["host_ip"]; //record the HostIP in the info field + + if (empty($params["username"])) $params["username"] = $params["receiver_command"]; + + $event_id = insert_event($params["date"], $event_type_id, $params["host_id"], $params["interface"], $params["status"], + $params["username"], $params["info"], $params["referer"], 1); + + return "Inserted Event ID ".$event_id; + } + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/cleanup_raw_tables.php jffnms-0.8.2/engine/cleanup_raw_tables.php --- jffnms-0.8.1/engine/cleanup_raw_tables.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/cleanup_raw_tables.php 2005-05-09 21:04:25.339452416 -0300 @@ -20,18 +20,18 @@ logger ("Cleaning up raw messages older than $dtdelete ($raw_days days)...\n"); // Traps cleanup - $query_traps = "select id from traps where date <= '$dtdelete'"; + $query_traps = "select id from traps where date <= ".$period; $result_traps = db_query ($query_traps) or die ("Query failed - TC1 - ".db_error()); $result_del_varbinds = 0; while ($rows_traps = db_fetch_array($result_traps)) { $id = $rows_traps['id']; - $query="delete from traps_varbinds where trapid=$id"; + $query="delete from traps_varbinds where trapid = ".$id; $result_del_varbinds = db_query ($query) or die ("Query failed: TC2 - Delete varbinds - ".db_error()); } - $query = "delete from traps where date <= '$dtdelete'"; + $query = "delete from traps where date <= ".$period; $result_del_traps = db_query ($query) or die ("Query failed: TC3 - Delete traps - ".db_error()); logger ("Cleanup of traps/traps_varbinds tables finished... ($result_del_traps, $result_del_varbinds)\n"); // END Traps cleanup diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/consolidate/traps.php jffnms-0.8.2/engine/consolidate/traps.php --- jffnms-0.8.1/engine/consolidate/traps.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/consolidate/traps.php 2005-05-09 21:04:24.910517624 -0300 @@ -1,79 +1,104 @@ Javier Szyszlican + * Copyright (C) <2005> Erno Rigo * This program is licensed under the GNU GPL, full terms in the LICENSE file + * + * 2005-04-01 Extensive rewrite to support trap_receiver plugins by Erno Rigo + * 2005-04-06 Re-wrote again, implementing receiver positions following directions from Javier - Erno Rigo */ -if (!function_exists("get_varbind_value")) { - function get_varbind_value($trapid, $oidid) { - if ($oidid != '*') - $query_varbinds = "SELECT value, oidid FROM traps_varbinds WHERE trapid = $trapid AND oidid = $oidid"; - else - $query_varbinds = "SELECT value, oidid FROM traps_varbinds WHERE trapid = $trapid ORDER BY oidid"; - - $result_varbinds = db_query($query_varbinds) or die ("Query failed ($query_varbinds) get_varbind_value($trapid,$oidid) - ".db_error()); - if (db_num_rows ($result_varbinds) == 0) return ''; - - if ($oidid != '*') //if we're asked for a specific OID id - $varbind_value = current(db_fetch_array($result_varbinds)); //get first (value) field of the recordset - else //if we're asked for all varbinds - while ( $rows_varbinds = db_fetch_array($result_varbinds)) //save all varbinds with key and value - $varbind_value .= " ".$rows_varbinds["oidid"].": ".$rows_varbinds["value"]; - - return $varbind_value; - } -} + function consolidate_traps () { - $varbinds_fields = array("interface","state","username","info"); - - $query_traps = "select id as trap_id, date, ip, trap_oid from traps where analized = 0 order by id asc"; - $result_traps = db_query ($query_traps) or die ("Query failed - TA2 - ".db_error()); + $query_traps = "SELECT id, date, ip, trap_oid FROM traps WHERE analized = 0 ORDER BY id asc"; + $result_traps = db_query ($query_traps) or die ("Query failed - TA2 - ".db_error()); - logger( "SNMP Trap to Process: ".db_num_rows($result_traps)."\n"); + logger( "SNMP Traps to Process: ".db_num_rows($result_traps)."\n"); - while ($trap = db_fetch_array($result_traps)) { + while ($trap = db_fetch_array($result_traps)) { - $values = array(); - $trap_id = $trap["trap_id"]; - unset($output); + $matched = false; + // d ($trap); - //get Host ID - $query_host="Select id from hosts where hosts.ip = '".$trap["ip"]."'"; - $result_host = db_query ($query_host) or die ("Query failed - TA5 - ".db_error()); - $host_id = (db_num_rows ($result_host) > 0)?current(db_fetch_array($result_host)):1; //if not host is found use 1 (unknown) - - unset($query_host); - unset($result_host); + // Get Host ID + $query_host="SELECT id FROM hosts WHERE hosts.ip = '".$trap["ip"]."' OR hosts.name = '".$trap["ip"]."'"; + $result_host = db_query ($query_host) or die ("Query failed - TA5 - ".db_error()); + $host_id = (db_num_rows ($result_host) > 0)?current(db_fetch_array($result_host)):1; //if not host is found use 1 (unknown) - if ($host_id == 1) $values["info"] .= "Trap from: ".$trap["ip"]; //record the HostIP in the info field + $query_varbinds = "SELECT trap_oid, value, oidid FROM traps_varbinds WHERE trapid = ".$trap["id"]." ORDER BY oidid"; + $result_varbinds = db_query($query_varbinds) or die ("Query failed (".$query_varbinds.") - get varbinds - ".db_error()); - $query_types="Select type, interface, username, state, info FROM traps_types WHERE match_oid = '".$trap["trap_oid"]."'"; - $result_types = db_query ($query_types) or die ("Query failed - TA3 - ".db_error()); - - if (db_num_rows ($result_types) <= 0) { - $query_types="Select type, interface, username, state, info FROM traps_types where id = 1"; //get uknown trap type - $result_types = db_query ($query_types) or die ("Query failed - TA3 - ".db_error()); - $values["info"] .= " OID: ".$trap["trap_oid"]; //record the Trap OID in the info field - unset ($query_types); - } - $trap_type = db_fetch_array($result_types); //get the current record it will be only 1 - unset ($result_types); - - // Match varbinds to fields - foreach ($varbinds_fields as $field) //go thru all fields - if (!empty($trap_type[$field])) { //if they its not empty - if (is_numeric($trap_type[$field]) || ($trap_type[$field]=="*")) //if its numeric or * - $values[$field] .= get_varbind_value($trap_id, $trap_type[$field]); //look it up - else - $values[$field] .= $trap_type[$field]; //use the field contents as value + //save all varbinds with key and value + $trap_vars = array(); + $trap_vars_oid = array(); + if (db_num_rows ($result_varbinds) != 0) + while ($rows_varbinds = db_fetch_array($result_varbinds)) { + $trap_vars[$rows_varbinds["oidid"]] = $rows_varbinds["value"]; // indexed by VarBind ID (reception order) + $trap_vars_oid[$rows_varbinds["trap_oid"]] = $rows_varbinds["value"]; // indexed by VarBind OID + } + + $query_receiver = " + SELECT + tr.match_oid, + tr.position, + tr.interface_type, + tr.stop_if_matches, + tr.command as receiver_command, + tr.parameters as receiver_parameters, + rb.command as backend_command, + rb.parameters as backend_parameters + + FROM trap_receivers tr, pollers_backend rb + WHERE rb.id = tr.backend + ORDER BY tr.position"; + + $result_receiver = db_query($query_receiver) or die ("Query failed (".$query_receiver.") - get trap receiver - ".db_error()); + + while ($record = db_fetch_array($result_receiver)) + if (preg_match("/".$record["match_oid"]."/", $trap["trap_oid"]) && !$matched) { // if this trap regexp matches the trap OID + + $receiver_command = $record["receiver_command"]; + $receiver_filename = get_config_option("jffnms_real_path")."/engine/trap_receivers/".$receiver_command.".inc.php"; + + $backend_command = $record["backend_command"]; + $backend_filename = get_config_option("jffnms_real_path")."/engine/backends/".$backend_command.".php"; + + if (file_exists($receiver_filename) && file_exists($backend_filename)) { + + include_once($backend_filename); + include_once($receiver_filename); + + $parameters = $record; + $parameters["trap"] = $trap; + $parameters["trap_vars"] = $trap_vars; + $parameters["trap_vars_oid"] = $trap_vars_oid; + $parameters["host_id"] = $host_id; + $parameters["host_ip"] = $trap["ip"]; + + list($receiver_matched, $receiver_result) = call_user_func_array("trap_receiver_".$receiver_command, array($parameters)); + + if ($receiver_matched) { + + $backend_parameters = array_merge ($parameters, $receiver_result); + + $backend_result = call_user_func_array("backend_".$backend_command, array($backend_parameters, NULL)); + + logger( + "T ".$trap["id"].":= Recevier ".$receiver_command."(".vd($parameters).") => ". + "Backend ".$backend_command." (".vd($receiver_result).") => ".$backend_result."\n"); + + if ($record["stop_if_matches"]==1) //if we have to stop processing after this trap matches + $matched = true; // do not try other receivers + } else + logger( "T ".$trap["id"].":= Receiver ".$receiver_command." did not match.\n"); + } else + logger( "T ".$trap["id"].":= ERROR: Receiver '".$receiver_command."' or Backend '".$backend_command."' does not exists.\n"); + } - $output .= "\t".$field."(".$trap_type[$field]."): ".$values[$field]; - } else - $values[$field] .= ""; //if it was empty return empty - - logger("SNMP Trap ID: $trap_id \tHost: ".$trap["ip"]."\tType: ".$trap_type["type"].": ".$output."\n"); - - insert_event($trap["date"], $trap_type["type"], $host_id, $values["interface"], $values["state"], $values["username"], $values["info"], $trap_id); //insert the required event - traps_analized($trap_id); //mark trap as analized + if (!$matched) + logger( "T ".$trap["id"].":= Did not match any receiver.\n"); + + traps_analized($trap["id"]); //mark trap as analized + } } ?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/consolidate.php jffnms-0.8.2/engine/consolidate.php --- jffnms-0.8.1/engine/consolidate.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/consolidate.php 2005-05-09 21:04:25.339452416 -0300 @@ -19,6 +19,8 @@ if (is_process_running(NULL,2) === false) { //check if a process named as myself is already running (one instance is me) detach(); + + include_once("consolidate/traps.php"); logger ("Consolidator Starting...\n"); do { @@ -28,7 +30,10 @@ //FIXME replace this calls with functions include("consolidate/syslog.php"); flush(); include("consolidate/tacacs.php"); flush(); - include("consolidate/traps.php"); flush(); + + consolidate_traps(); + flush(); + include("consolidate/events.php"); flush(); include("consolidate/events_latest.php"); flush(); include("consolidate/alarms.php"); flush(); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/host_information.inc.php jffnms-0.8.2/engine/discovery/host_information.inc.php --- jffnms-0.8.1/engine/discovery/host_information.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/host_information.inc.php 2005-05-09 21:04:24.942512760 -0300 @@ -1,5 +1,5 @@ - Robert Bogdon * Copyright (C) <2002-2005> Modifications by Javier Szyszlican * This program is licensed under the GNU GPL, full terms in the LICENSE file @@ -7,35 +7,64 @@ function discovery_host_information ($ip,$rocommunity,$hostid,$param) { - if (strpos($param,",") > 1) - $systems = explode(",",$param); - else - $systems[]=$param; - - if ($ip && $hostid && $rocommunity) - $system_oid = snmp_walk($ip, $rocommunity, ".1.3.6.1.2.1.1.2"); // system.sysObjectID + $systemMIB_oid = ".1.3.6.1.2.1.1"; + $sysDescr_oid = $systemMIB_oid.".1.0"; + $sysObjectID_oid = $systemMIB_oid.".2.0"; + $sysContact_oid = $systemMIB_oid.".4.0"; + $sysName_oid = $systemMIB_oid.".5.0"; + $sysLocation_oid = $systemMIB_oid.".6.0"; - $system_oid = str_replace (".1.3.6.1.4.1","enterprises",$system_oid); //replace OID for enterprises + $hrDeviceType_oid = ".1.3.6.1.2.1.25.3.2.1.2"; - $found = 0; - foreach ($systems as $key=>$data) - if (strpos($system_oid[0],trim($data)) > 1) $found = 1; - - $cpu_info = array(); + $cpu_info = array(); + + if ($ip && !empty($rocommunity)) { - if ($found==1) { - if ($ip && $hostid && $rocommunity) - $system_description = snmp_get($ip, $rocommunity, ".1.3.6.1.2.1.1.1.0"); // system.sysDescr - - $cpu_info[1]["interface"] = "CPU"; - $cpu_info[1]["admin"] = "ok"; //to show - $cpu_info[1]["oper"] = "up"; //to be added by the AD - $cpu_info[1]["cpu_num"] = "1"; //FIXME detect more CPUs - - if (!empty($system_description)) - $cpu_info[1]["description"] = $system_description; - } + // Fetch the ObjectID + $system_oid = snmp_get($ip, $rocommunity, $sysObjectID_oid); + $system_oid = str_replace (".1.3.6.1.4.1","enterprises",$system_oid); //replace OID for enterprises + // Check if the ObjectID is in our parameters + $found = false; + $systems = explode(",",$param); + + foreach ($systems as $data) + if (strpos($system_oid,trim($data)) > 1) + $found = true; + + // If it was, get all the other information and return an interface + if ($found==true) { + + $description = snmp_get ($ip, $rocommunity, $sysDescr_oid); + $name = snmp_get ($ip, $rocommunity, $sysName_oid); + $contact = snmp_get ($ip, $rocommunity, $sysContact_oid); + $location = snmp_get ($ip, $rocommunity, $sysLocation_oid); + + // Try to discover the number of CPUs + $cpus = 0; + + $devices = snmp_walk ($ip, $rocommunity, $hrDeviceType_oid); + + if (is_array($devices)) + foreach ($devices as $device) + if ((strpos($device, "Processor")!==false) || (strpos($device, "25.3.1.3")!==false)) + $cpus++; + + if ($cpus==0) // if it didn't have any, or it didn't have support for that OID. + $cpus = 1; // we assume it has at least 1 CPU. + + $cpu_info[1] = array( + "interface" => "CPU", + "oper" => "up", + "cpu_num" => $cpus, + "name" => $name, + "location" => $location, + "contact" => $contact, + "description" => $description, + ); + } + } + return $cpu_info; - } + } ?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/informant_ldisks.inc.php jffnms-0.8.2/engine/discovery/informant_ldisks.inc.php --- jffnms-0.8.1/engine/discovery/informant_ldisks.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/informant_ldisks.inc.php 2005-05-09 21:04:24.989505616 -0300 @@ -0,0 +1,34 @@ + David LIMA + * This program is licensed under the GNU GPL, full terms in the LICENSE file +*/ + + function discovery_informant_ldisks($ip, $community, $hostid, $param) { + + $interfaces = array(); + + $SNMP_INFORMAT_MIB = ".1.3.6.1.4.1.9600.1.1"; + $lDiskEntry_oid = $SNMP_INFORMAT_MIB.".1.1.1.2"; + + if ($ip && $community && $hostid) { + + $DisksEntries = snmp_walk($ip, $community, $lDiskEntry_oid, true); + + if (is_array($DisksEntries)) + foreach ($DisksEntries as $oid=>$interface) { + + $index = join(".",array_slice(explode(".",$oid),7)); + + $interfaces[$index] = array ( + 'interface' => $interface." Stats", + 'oper' => "up" + ); + } + else + return false; + } + + return $interfaces; + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/linux_iptables.inc.php jffnms-0.8.2/engine/discovery/linux_iptables.inc.php --- jffnms-0.8.1/engine/discovery/linux_iptables.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/linux_iptables.inc.php 2005-05-09 21:04:25.055495584 -0300 @@ -0,0 +1,69 @@ + Hans Peter Dittler + * Copyright (C) <2005> Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function discovery_linux_iptables ($ip,$rocommunity,$hostid,$param) { + + $linux_iptables = array(); + $IPT_MIB = $param; + + if ($ip && $hostid && $rocommunity) + $tableIndex = snmp_walk($ip,$rocommunity, $IPT_MIB.".0.0", false, 5); + + if ((is_array($tableIndex)) && (count($tableIndex) > 0)) { + + $tableName = snmp_walk ($ip,$rocommunity, $IPT_MIB.".0.1"); + + $chainIndex = snmp_walk ($ip,$rocommunity, $IPT_MIB.".1.0"); + $chainTableIndex= snmp_walk ($ip,$rocommunity, $IPT_MIB.".1.1"); + + $chainName = snmp_walk ($ip,$rocommunity, $IPT_MIB.".1.2"); + $chainPolicy = snmp_walk ($ip,$rocommunity, $IPT_MIB.".1.3"); + + if (is_array($chainIndex) && is_array($tableName) && is_array($chainTableIndex) && is_array($chainName) && is_array($chainPolicy)) + + foreach ($chainIndex as $pos=>$chain_id) + if ($chainPolicy[$pos]!="dynamic") { + + $chain = $tableName[array_search($chainTableIndex[$pos],$tableIndex)]."/".$chainName[$pos]; + + $linux_iptables[$chain_id] = array( + "interface" => "IPTables ".$chain, + "policy" => $chainPolicy[$pos], + "description"=>$chain." Chain", + "oper" => "up" + ); + } + //d($linux_iptables); + } + return $linux_iptables; + } + +// iptables are transmitted in three sepearte tables +// rows in table 0 +// 0 - index of table +// 1 - name of table + +// rows in table 1 +// 0 - index of chain +// 1 - index of table where this chain belongs to +// 2 - name of chain +// 3 - default policy of chain or keyword dynamic for dymacally defined chains + +// 4 - packets worked by this chain (not counting LOG) +// 5 - bytes worked by this chain (not counting LOG) + +// 6 - packets ACCEPTED by this chain +// 7 - bytes ACCEPTED by this chain + +// rows in table 2 +// 0 - index of rule +// 1 - index of chain which contains this rule +// 2 - target of this rule +// 3 - parameters of this rule +// 4 - packets worked by this rule +// 5 - bytes worked by this rule +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/pix_connections.inc.php jffnms-0.8.2/engine/discovery/pix_connections.inc.php --- jffnms-0.8.1/engine/discovery/pix_connections.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/pix_connections.inc.php 2005-05-09 21:04:25.059494976 -0300 @@ -0,0 +1,34 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function discovery_pix_connections ($ip,$community, $host_id, $param) { + + $cnx_stats = array(); + + $cfwConnectionStatEntry = ".1.3.6.1.4.1.9.9.147.1.2.2.2.1"; + + $cfwConnectionStatValue = $cfwConnectionStatEntry.".5"; + $cfwConnectionStatDescription = $cfwConnectionStatEntry.".3"; + + if ($ip && $community && $host_id) { //check for required values + + $cnx_values = snmp_walk ($ip, $community, $cfwConnectionStatValue, INCLUDE_OID_2); + + if (is_array($cnx_values)) { + + $cnx_descr = snmp_walk ($ip, $community, $cfwConnectionStatDescription, INCLUDE_OID_2); + + while (list ($key) = each ($cnx_values)) + $cnx_stats[$key] = array ( + "interface" => "FW Stat ".$key, + "description" => $cnx_descr[$key], + "oper" => "up" + ); + } + } + return $cnx_stats; + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/reachability.inc.php jffnms-0.8.2/engine/discovery/reachability.inc.php --- jffnms-0.8.1/engine/discovery/reachability.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/reachability.inc.php 2005-05-09 21:04:24.966509112 -0300 @@ -17,6 +17,7 @@ $reach["1"]["description"] = "Reachability to ".$ip; $reach["1"]["interface"] = "Reachability Test"; $reach["1"]["admin"] = "Not Checked"; + $reach["1"]["oper"] = "reachable"; } return $reach; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/sensors.inc.php jffnms-0.8.2/engine/discovery/sensors.inc.php --- jffnms-0.8.1/engine/discovery/sensors.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/sensors.inc.php 2005-05-09 21:04:25.062494520 -0300 @@ -0,0 +1,42 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function discovery_sensors ($ip,$community, $host_id, $param) { + + $sensors = array(); + + $hrSensorEntry = ".1.3.6.1.2.1.25.8.1"; + $hrSensorMapping= $hrSensorEntry.".1"; + $hrSensorName = $hrSensorEntry.".3"; + $hrSensorLabel = $hrSensorEntry.".4"; + $hrSensorValue = $hrSensorEntry.".5"; + + if ($ip && $community && $host_id) { //check for required values + + $mappings = snmp_walk ($ip, $community, $hrSensorMapping, INCLUDE_OID_1); + + if (is_array($mappings)) { + + $labels = snmp_walk ($ip, $community, $hrSensorLabel, INCLUDE_OID_1); + $names = snmp_walk ($ip, $community, $hrSensorName, INCLUDE_OID_1); + $values = snmp_walk ($ip, $community, $hrSensorValue, INCLUDE_OID_1); + + while (list ($key,$mapping) = each ($mappings)) + if (($mapping=="-1") && // Its a parent sensor + isset($values[$key])) // it has a value + + $sensors[$key] = array ( + "interface" => "Sensor ".$names[$key], + "description" => $labels[$key], + "oper" => "up" + ); + } + } + + return $sensors; + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/simple.inc.php jffnms-0.8.2/engine/discovery/simple.inc.php --- jffnms-0.8.1/engine/discovery/simple.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/simple.inc.php 2005-05-09 21:04:25.060494824 -0300 @@ -0,0 +1,26 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function discovery_simple ($ip, $rocommunity, $hostid, $param) { + + $simple = array(); + + if (!empty($rocommunity) && !empty($ip)) { + + list ($test_oid, $interface_name) = explode (",", $param); + + $test = snmp_get($ip, $rocommunity, $test_oid); // query the Test OID + + if ($test!==false) // if the OID exists + $simple[1] = array( // return a new interface + "interface" => $interface_name, // with the specified name + "oper" => "up" + ); + } + + return $simple; + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/snmp_interfaces.inc.php jffnms-0.8.2/engine/discovery/snmp_interfaces.inc.php --- jffnms-0.8.1/engine/discovery/snmp_interfaces.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/snmp_interfaces.inc.php 2005-05-09 21:04:24.947512000 -0300 @@ -115,6 +115,7 @@ $aux1["description"] = str_replace("'","", $aux1["description"]); //Strip Quotes FIXME $aux1["interface"] = substr(snmp_hex_to_string($ifDescr[$i]),0,30); + $aux1["interface"] = str_replace("'","", $aux1["interface"]); //Strip Quotes for PIX if ($ifSpeed[$i] == 0) $ifSpeed[$i] = 128; //default Speed Value $aux1["bandwidthin"] = $ifSpeed[$i]*1000; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/ups.inc.php jffnms-0.8.2/engine/discovery/ups.inc.php --- jffnms-0.8.1/engine/discovery/ups.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/ups.inc.php 2005-05-09 21:04:25.046496952 -0300 @@ -0,0 +1,35 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function discovery_ups ($ip,$rocommunity,$hostid,$param) { + + $ups = array(); + $UPSMIB = ".1.3.6.1.2.1.33"; //SNMPv2-SMI::mib-2.33 + $upsIdentName_oid = $UPSMIB.".1.1.5.0"; //UPS-MIB::upsIdentName.0 + $upsBatteryStatus_oid = $UPSMIB.".1.2.1.0"; //UPS-MIB::upsBatteryStatus.0 + $battery_status = array (1=>"battery unknown", 2=>"battery normal", 3=>"battery low", 4=>"batter depleted"); + + if (!empty($ip) && !empty($rocommunity)) { + + $upsIdentName = snmp_get($ip, $rocommunity, $upsIdentName_oid); + + if ($upsIdentName!==false) { + + $upsBatteryStatus = snmp_get($ip, $rocommunity, $upsBatteryStatus_oid); + + if (!empty($upsIdentName) && !empty($upsBatteryStatus)) + $ups[1] = array( + "interface"=>"UPS", + "ident"=>$upsIdentName, + "admin"=>"ok", + "oper"=>$battery_status[$upsBatteryStatus] + ); + } + } + + return $ups; + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/discovery/ups_lines.inc.php jffnms-0.8.2/engine/discovery/ups_lines.inc.php --- jffnms-0.8.1/engine/discovery/ups_lines.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/discovery/ups_lines.inc.php 2005-05-09 21:04:25.046496952 -0300 @@ -0,0 +1,45 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function discovery_ups_lines ($ip,$rocommunity,$hostid,$param) { + + $ups_lines = array(); + $UPSMIB = ".1.3.6.1.2.1.33"; //SNMPv2-SMI::mib-2.33 + + $upsInputs = $UPSMIB.".1.3.3.1"; //UPS-MIB::upsInputEntry + $upsOutputs = $UPSMIB.".1.4.4.1"; //UPS-MIB::upsOutputEntry + + $upsInputsIndex = $upsInputs.".1"; //UPS-MIB::upsInputLineIndex + $upsOutputsIndex = $upsOutputs.".1"; //UPS-MIB::upsOutputLineIndex + + if (!empty($ip) && !empty($rocommunity)) { + + $upsInputLines = snmp_walk($ip, $rocommunity, $upsInputsIndex); + $upsOutputLines = snmp_walk($ip, $rocommunity, $upsOutputsIndex); + + if (is_array($upsInputLines) && is_array($upsOutputLines)) { + + foreach ($upsInputLines as $index) + $ups_lines[10+$index] = array( + "interface"=>"Input Line ".$index, + "line_type"=>"INPUT", + "line_index"=>$index, + "admin"=>"up", "oper"=>"up" + ); + + foreach ($upsOutputLines as $index) + $ups_lines[20+$index] = array( + "interface"=>"Output Line ".$index, + "line_type"=>"OUTPUT", + "line_index"=>$index, + "admin"=>"up", "oper"=>"up" + ); + } + } + + return $ups_lines; + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/bgp_routes.inc.php jffnms-0.8.2/engine/graphs/bgp_routes.inc.php --- jffnms-0.8.1/engine/graphs/bgp_routes.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/bgp_routes.inc.php 2005-05-09 21:04:25.150481144 -0300 @@ -0,0 +1,27 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_bgp_routes ($data) { + + $opts_DEF = rrdtool_get_def($data,array("in"=>"accepted_routes", "out"=>"advertised_routes")); + + $opts_GRAPH = array( + "LINE2:in#00CC00:'Accepted Routes '", + "GPRINT:in:MAX:'Max\:%8.2lf %s'", + "GPRINT:in:AVERAGE:'Average\:%8.2lf %s'", + "GPRINT:in:LAST:'Last\:%8.2lf %s\\n'", + + "LINE2:out#0000FF:'Advertised Routes'", + "GPRINT:out:MAX:'Max\:%8.2lf %s'", + "GPRINT:out:AVERAGE:'Average\:%8.2lf %s'", + "GPRINT:out:LAST:'Last\:%8.2lf %s'", + ); + + $opts_header[] = "--vertical-label='Routes'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/cisco_nat_active.inc.php jffnms-0.8.2/engine/graphs/cisco_nat_active.inc.php --- jffnms-0.8.1/engine/graphs/cisco_nat_active.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/cisco_nat_active.inc.php 2005-05-09 21:04:25.169478256 -0300 @@ -0,0 +1,23 @@ + Karl S. Hagen + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_cisco_nat_active ($data) { + extract($data); + + $opts_DEF = rrdtool_get_def($data,array("cisco_nat_active_binds")); + + $opts_GRAPH = array( + "LINE3:cisco_nat_active_binds#00CC00:'Cisco NAT Active Binds '", + "GPRINT:cisco_nat_active_binds:MAX:'Max\:%5.0lf'", + "GPRINT:cisco_nat_active_binds:AVERAGE:'Average\:%5.0lf'", + "GPRINT:cisco_nat_active_binds:LAST:'Last\:%5.0lf \\n'" + ); + + $opts_header[] = "--vertical-label='Active NAT Binds'"; + + return array ($opts_header, array_merge($opts_DEF,$opts_GRAPH)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/cisco_nat_packets.inc.php jffnms-0.8.2/engine/graphs/cisco_nat_packets.inc.php --- jffnms-0.8.1/engine/graphs/cisco_nat_packets.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/cisco_nat_packets.inc.php 2005-05-09 21:04:25.169478256 -0300 @@ -0,0 +1,73 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_cisco_nat_packets ($data) { + + $result = array_merge( + rrdtool_get_def($data, array( + "icmp_in" => "cisco_nat_icmp_inbound", + "tcp_in" => "cisco_nat_tcp_inbound", + "udp_in" => "cisco_nat_udp_inbound", + "other_in" => "cisco_nat_other_ip_inbound", + "_icmp_out" => "cisco_nat_icmp_outbound", + "_tcp_out" => "cisco_nat_tcp_outbound", + "_udp_out" => "cisco_nat_udp_outbound", + "_other_out" => "cisco_nat_other_ip_outbound" + )),array( + + "CDEF:icmp_out=_icmp_out,-1,*", + "CDEF:tcp_out=_tcp_out,-1,*", + "CDEF:udp_out=_udp_out,-1,*", + "CDEF:other_out=_other_out,-1,*", + + + "LINE2:icmp_in#8D00BA:'+ Inbound ICMP '", + "GPRINT:icmp_in:MAX:'Max\: %8.2lf %spps'", + "GPRINT:icmp_in:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:icmp_in:LAST:'Last\:%8.2lf %spps \\n'", + + "LINE2:tcp_in#00CC00:'+ Inbound TCP '", + "GPRINT:tcp_in:MAX:'Max\: %8.2lf %spps'", + "GPRINT:tcp_in:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:tcp_in:LAST:'Last\:%8.2lf %spps\\n'", + + "LINE2:udp_in#FF0000:'+ Inbound UDP '", + "GPRINT:udp_in:MAX:'Max\: %8.2lf %spps'", + "GPRINT:udp_in:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:udp_in:LAST:'Last\:%8.2lf %spps \\n'", + + "LINE2:other_in#0090F0:'+ Inbound Other'", + "GPRINT:other_in:MAX:'Max\: %8.2lf %spps'", + "GPRINT:other_in:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:other_in:LAST:'Last\:%8.2lf %spps \\n'", + + "LINE2:icmp_out#8D00BA:'- Outbound ICMP '", + "GPRINT:_icmp_out:MAX:'Max\: %8.2lf %spps'", + "GPRINT:_icmp_out:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:_icmp_out:LAST:'Last\:%8.2lf %spps \\n'", + + "LINE2:tcp_out#00CC00:'- Outbound TCP '", + "GPRINT:_tcp_out:MAX:'Max\: %8.2lf %spps'", + "GPRINT:_tcp_out:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:_tcp_out:LAST:'Last\:%8.2lf %spps\\n'", + + "LINE2:udp_out#FF0000:'- Outbound UDP '", + "GPRINT:_udp_out:MAX:'Max\: %8.2lf %spps'", + "GPRINT:_udp_out:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:_udp_out:LAST:'Last\:%8.2lf %spps \\n'", + + "LINE2:other_out#0090F0:'- Outbound Other'", + "GPRINT:_other_out:MAX:'Max\: %8.2lf %spps'", + "GPRINT:_other_out:AVERAGE:'Average\:%8.2lf %spps'", + "GPRINT:_other_out:LAST:'Last\:%8.2lf %spps \\n'" + + )); + + $opts_header[] = "--vertical-label='Packets per Second'"; + + return array ($opts_header, $result); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/cpu_util.inc.php jffnms-0.8.2/engine/graphs/cpu_util.inc.php --- jffnms-0.8.1/engine/graphs/cpu_util.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/cpu_util.inc.php 2005-05-09 21:04:25.084491176 -0300 @@ -1,17 +1,18 @@ Javier Szyszlican * This program is licensed under the GNU GPL, full terms in the LICENSE file */ + function graph_cpu_util ($data) { $opts_DEF = rrdtool_get_def($data,"cpu"); - $limit = 100*$data["cpu_num"]; + $limit = 100; $opts_GRAPH = array( - "HRULE:$limit#FF0000:", + "HRULE:".$limit."#FF0000:", "AREA:cpu#00CC00:'CPU Utilization '", "LINE1:cpu#0000FF:''", @@ -23,7 +24,7 @@ $opts_header[] = "--vertical-label='CPU Utilization %'"; $opts_header[] = "--rigid"; - $opts_header[] = "--upper-limit=$limit"; + $opts_header[] = "--upper-limit=".$limit; return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); } diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/inf_ldisk_rate.inc.php jffnms-0.8.2/engine/graphs/inf_ldisk_rate.inc.php --- jffnms-0.8.1/engine/graphs/inf_ldisk_rate.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/inf_ldisk_rate.inc.php 2005-05-09 21:04:25.120485704 -0300 @@ -0,0 +1,36 @@ + David LIMA + * This program is licensed under the GNU GPL, full terms in the LICENSE file +*/ + + function graph_inf_ldisk_rate ($data) { + + $opts_DEF = rrdtool_get_def($data,array("read_rate"=>"inf_d_read_rate","write_rate"=>"inf_d_write_rate")); + + $opts_GRAPH = array( + "CDEF:ldisk_rate_total=read_rate,write_rate,+", + "CDEF:write_rate_graph=write_rate,-1,*", + + "COMMENT:' Disk Total '", + "GPRINT:ldisk_rate_total:MAX:'Max\:%8.2lf %sBps '", + "GPRINT:ldisk_rate_total:AVERAGE:'Average\:%8.2lf %sBps '", + "GPRINT:ldisk_rate_total:LAST:'Last\:%8.2lf %sBps \\n'", + + "AREA:read_rate#0000CC:'Disk Reads '", + "GPRINT:read_rate:MAX:'Max\:%8.2lf %sBps '", + "GPRINT:read_rate:AVERAGE:'Average\:%8.2lf %sBps '", + "GPRINT:read_rate:LAST:'Last\:%8.2lf %sBps \\n'", + + "AREA:write_rate_graph#FF0000:'Disk Writes'", + "GPRINT:write_rate:MAX:'Max\:%8.2lf %sBps '", + "GPRINT:write_rate:AVERAGE:'Average\:%8.2lf %sBps '", + "GPRINT:write_rate:LAST:'Last\:%8.2lf %sBps \\n'" + ); + + $opts_header[] = "--vertical-label='Disk Rate (Bytes per Second)'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); + } + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/inf_ldisk_time.inc.php jffnms-0.8.2/engine/graphs/inf_ldisk_time.inc.php --- jffnms-0.8.1/engine/graphs/inf_ldisk_time.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/inf_ldisk_time.inc.php 2005-05-09 21:04:25.130484184 -0300 @@ -0,0 +1,37 @@ + David LIMA + * This program is licensed under the GNU GPL, full terms in the LICENSE file +*/ + + function graph_inf_ldisk_time ($data) { + + $opts_DEF = rrdtool_get_def($data,array("read_time"=>"inf_d_read_time","write_time"=>"inf_d_write_time")); + + $opts_GRAPH = array( + + "CDEF:idle_time=100,read_time,-,write_time,-", + + "AREA:read_time#0000CC:'Disk Read Time'", + "GPRINT:read_time:MAX:'Max\: %6.2lf %%'", + "GPRINT:read_time:AVERAGE:'Average\: %6.2lf %%'", + "GPRINT:read_time:LAST:'Last\: %6.2lf %% \\n'", + + "STACK:write_time#FF0000:'Disk Write Time'", + "GPRINT:write_time:MAX:'Max\: %6.2lf %%'", + "GPRINT:write_time:AVERAGE:'Average\: %6.2lf %%'", + "GPRINT:write_time:LAST:'Last\: %6.2lf %% \\n'", + + "STACK:idle_time#00CC00:'Disk Idle Time'", + "GPRINT:idle_time:MAX:'Max\: %6.2lf %%'", + "GPRINT:idle_time:AVERAGE:'Average\: %6.2lf %%'", + "GPRINT:idle_time:LAST:'Last\: %6.2lf %% \\n'" + ); + + $opts_header[] = "--vertical-label='Disk Time Usage'"; + $opts_header[] = "--rigid"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); + } + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/iptables_rate.inc.php jffnms-0.8.2/engine/graphs/iptables_rate.inc.php --- jffnms-0.8.1/engine/graphs/iptables_rate.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/iptables_rate.inc.php 2005-05-09 21:04:25.138482968 -0300 @@ -0,0 +1,29 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_iptables_rate ($data) { + + $opts_DEF = rrdtool_get_def($data,array("bytes"=>"ipt_bytes","packets"=>"ipt_packets")); + + $opts_DEF["bits"]="CDEF:bits=bytes,UN,bytes,bytes,IF,8,*"; + + $opts_GRAPH = array( + "AREA:bits#00CC00:'Rate '", + "GPRINT:bits:MAX:'Max\:%8.2lf %sbps'", + "GPRINT:bits:AVERAGE:'Average\:%8.2lf %sbps'", + "GPRINT:bits:LAST:'Last\:%8.2lf %sbps\\n'", + + "LINE2:packets#0000FF:Packets", + "GPRINT:packets:MAX:'Max\:%8.0lf %spps'", + "GPRINT:packets:AVERAGE:'Average\:%8.0lf %spps'", + "GPRINT:packets:LAST:'Last\:%8.0lf %spps'", + ); + + $opts_header[] = "--vertical-label='Bits per Second'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/iptables_rate_aggregation.inc.php jffnms-0.8.2/engine/graphs/iptables_rate_aggregation.inc.php --- jffnms-0.8.1/engine/graphs/iptables_rate_aggregation.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/iptables_rate_aggregation.inc.php 2005-05-09 21:04:25.139482816 -0300 @@ -0,0 +1,47 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_iptables_rate_aggregation ($data) { + + $color_array = array("0","7","D"); + foreach ($color_array as $a) + foreach ($color_array as $c) + foreach ($color_array as $e) + $colors[] = $a.$a.$c.$c.$e.$e; + + $color_array = array("3","9","F"); + foreach ($color_array as $a) + foreach ($color_array as $c) + foreach ($color_array as $e) + $colors[] = $a.$a.$c.$c.$e.$e; + + $defs = array(); + $graph = array(); + + foreach ($data[id] as $id) { + $interface=$data[$id]; + $used_color = $colors[++$i*4]; + + list(,$interface["interface"]) = explode (" ", $interface["interface"]); + + $defs = @array_merge ($defs, + rrdtool_get_def($interface,array("bytes$id"=>"ipt_bytes")), + array("CDEF:bits$id=bytes$id,UN,bytes$id,bytes$id,IF,8,*")); + + $graph = @array_merge ($graph, array( + "LINE2:bits$id#$used_color:'".str_pad($interface["interface"],25)."'", + "GPRINT:bits$id:MAX:'Max\:%8.2lf %sbps'", + "GPRINT:bits$id:AVERAGE:'Average\:%8.2lf %sbps'", + "GPRINT:bits$id:LAST:'Last\:%8.2lf %sbps\\n'", + )); + + } + + $opts_header[] = "--vertical-label='Bits per Second'"; + + return array ($opts_header, @array_merge($defs,$graph)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/pix_connections.inc.php jffnms-0.8.2/engine/graphs/pix_connections.inc.php --- jffnms-0.8.1/engine/graphs/pix_connections.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/pix_connections.inc.php 2005-05-09 21:04:25.164479016 -0300 @@ -0,0 +1,24 @@ + Mario Spendier + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_pix_connections ($data) { + + $opts_DEF = rrdtool_get_def($data,array("pix_connections")); + + $opts_GRAPH = array( + + "AREA:pix_connections#00CC00:'Established Connections '", + "GPRINT:pix_connections:MAX:'Max\:%8.0lf %s'", + "GPRINT:pix_connections:AVERAGE:'Average\:%8.0lf %s'", + "GPRINT:pix_connections:LAST:'Last\:%8.0lf %s'", + ); + + $opts_header[] = "--vertical-label='Established Connections'"; + + return array ($opts_header, array_merge($opts_DEF,$opts_GRAPH)); +} + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/sensor_value.inc.php jffnms-0.8.2/engine/graphs/sensor_value.inc.php --- jffnms-0.8.1/engine/graphs/sensor_value.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/sensor_value.inc.php 2005-05-09 21:04:25.179476736 -0300 @@ -0,0 +1,64 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function graph_sensor_value ($data) { + + $def = rrdtool_get_def($data, "value"); + + switch (true) { + + case (strpos($data["interface"],"temp")!==false): + + $far = (isset($data["show_celcius"]) && ($data["show_celcius"]==0))?1:0; + + $graph = array ( + "CDEF:temperature=value,".(($far==1)?"1.8,*,32,+":"1,*"), + "AREA:temperature#DD0000:'Temperature in degrees ".(($far==1)?"Fahrenheit":"Celcius")."\:'", + "GPRINT:temperature:MAX:'Max\:%5.2lf'", + "GPRINT:temperature:AVERAGE:'Average\:%5.2lf'", + "GPRINT:temperature:LAST:'Last\:%5.2lf \\n'" + ); + + $label = "Temperature"; + break; + + case (strpos($data["interface"],"in")!==false): + + $graph = array ( + "AREA:value#0000DD:'Voltage\:'", + "GPRINT:value:MAX:'Max\:%5.2lf %sV'", + "GPRINT:value:AVERAGE:'Average\:%5.2lf %sV'", + "GPRINT:value:LAST:'Last\:%5.2lf %sV\\n'" + ); + + $label = "Voltage"; + break; + + case (strpos($data["interface"],"fan")!==false): + + $graph = array ( + "AREA:value#00DD00:'RPM\:'", + "GPRINT:value:MAX:'Max\:%5.2lf rpm'", + "GPRINT:value:AVERAGE:'Average\:%5.2lf rpm'", + "GPRINT:value:LAST:'Last\:%5.2lf rpm\\n'" + ); + + $label = "RPM"; + break; + + + default: + // Should we have a Default Case? + break; + } + + return array ( + array("--vertical-label='".$label."'"), + @array_merge($def, $graph) + ); + } + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/tc_rate_aggregation.inc.php jffnms-0.8.2/engine/graphs/tc_rate_aggregation.inc.php --- jffnms-0.8.1/engine/graphs/tc_rate_aggregation.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/tc_rate_aggregation.inc.php 2005-05-09 21:04:25.095489504 -0300 @@ -29,8 +29,8 @@ $interface["interface"] = str_replace(":","\:",$interface["interface"]); $name = substr( - substr(str_pad($interface["interface"]." ".$interface["description"],22," "),0,22). - str_pad(($interface["rate"]/1000),4," ",STR_PAD_LEFT)." kbps" + substr(str_pad($interface["interface"]." ".$interface["description"],20," "),0,20). + str_pad(($interface["rate"]/1000),5," ",STR_PAD_LEFT)." kbps" ,0,35); $defs = @array_merge ($defs, diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_charge_remaining.inc.php jffnms-0.8.2/engine/graphs/ups_charge_remaining.inc.php --- jffnms-0.8.1/engine/graphs/ups_charge_remaining.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_charge_remaining.inc.php 2005-05-09 21:04:25.133483728 -0300 @@ -0,0 +1,22 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function graph_ups_charge_remaining ($data) { + + $opts_DEF = rrdtool_get_def($data,array("charge_remaining")); + + $opts_GRAPH = array( + "AREA:charge_remaining#00DD00:'Charge Remaining\:'", + "GPRINT:charge_remaining:MAX:'Max\: %3.0lf %%'", + "GPRINT:charge_remaining:AVERAGE:'Average\: %3.0lf %%'", + "GPRINT:charge_remaining:LAST:'Last\: %3.0lf %%\\n'", + ); + + $opts_header[] = "--vertical-label='Charge Remaining %'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_current.inc.php jffnms-0.8.2/engine/graphs/ups_current.inc.php --- jffnms-0.8.1/engine/graphs/ups_current.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_current.inc.php 2005-05-09 21:04:25.133483728 -0300 @@ -0,0 +1,23 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_ups_current ($data) { + + $opts_DEF = rrdtool_get_def($data,array("current")); + + $opts_GRAPH = array( + "AREA:current#DD3300:'Current '", + "GPRINT:current:MAX:'Max\: %3.0lf %sAmps'", + "GPRINT:current:AVERAGE:'Average\: %3.0lf %sAmps'", + "GPRINT:current:LAST:'Last\: %3.0lf %sAmps\\n'", + ); + + $opts_header[] = "--vertical-label='Current'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_current_aggregation.inc.php jffnms-0.8.2/engine/graphs/ups_current_aggregation.inc.php --- jffnms-0.8.1/engine/graphs/ups_current_aggregation.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_current_aggregation.inc.php 2005-05-09 21:04:25.133483728 -0300 @@ -0,0 +1,43 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_ups_current_aggregation ($data) { + + $color_array = array("2","9","F"); + foreach ($color_array as $a) + foreach ($color_array as $c) + foreach ($color_array as $e) + $colors[] = $e."0".$c."0".$a."0"; + + $opts_DEF = array(); + $opts_GRAPH = array(); + + foreach ($data["id"] as $id) { + $interface=$data[$id]; + + $defs = rrdtool_get_def($interface,array("current$id"=>"current")); + + $opts_DEF = @array_merge($opts_DEF, $defs); + + $description = + substr(str_pad($interface["host_name"]." ".$interface["zone_shortname"],20," ",STR_PAD_RIGHT),0,20)." ". + substr(str_pad($interface["interface"]." ".$interface["description"],20," ",STR_PAD_RIGHT),0,20); + + $used_color = $colors[++$i*2]; + + $opts_GRAPH = array_merge ($opts_GRAPH,array( + "LINE2:current$id#$used_color:'".$description."\:'", + "GPRINT:current$id:MAX:'Max\: %3.0lf %sA'", + "GPRINT:current$id:AVERAGE:'Average\: %3.0lf %sA'", + "GPRINT:current$id:LAST:'Last\: %3.0lf %sA\\n'" + )); + } + + $opts_header[] = "--vertical-label='Currents'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_load.inc.php jffnms-0.8.2/engine/graphs/ups_load.inc.php --- jffnms-0.8.1/engine/graphs/ups_load.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_load.inc.php 2005-05-09 21:04:25.133483728 -0300 @@ -0,0 +1,24 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_ups_load ($data) { + + $opts_DEF = rrdtool_get_def($data,array("load")); + + $opts_GRAPH = array( + "AREA:load#0033FF:'Load '", + "GPRINT:load:MAX:'Max\: %3.0lf %%'", + "GPRINT:load:AVERAGE:'Average\: %3.0lf %%'", + "GPRINT:load:LAST:'Last\: %3.0lf %%\\n'", + ); + + $opts_header[] = "--vertical-label='Load %'"; + $opts_header[] = "--rigid"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_load_aggregation.inc.php jffnms-0.8.2/engine/graphs/ups_load_aggregation.inc.php --- jffnms-0.8.1/engine/graphs/ups_load_aggregation.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_load_aggregation.inc.php 2005-05-09 21:04:25.133483728 -0300 @@ -0,0 +1,47 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_ups_load_aggregation ($data) { + + $color_array = array("3","C","F"); + foreach ($color_array as $a) + foreach ($color_array as $c) + foreach ($color_array as $e) + $colors[] = $e."0".$c."0".$a."0"; + + $opts_DEF = array(); + $opts_GRAPH = array(); + + foreach ($data["id"] as $id) { + $interface=$data[$id]; + + if ($interface["line_type"]=="OUTPUT") { + + $defs = rrdtool_get_def($interface,array("load$id"=>"load")); + + $opts_DEF = @array_merge($opts_DEF, $defs); + + $description = + substr(str_pad($interface["host_name"]." ".$interface["zone_shortname"],20," ",STR_PAD_RIGHT),0,20)." ". + substr(str_pad($interface["interface"]." ".$interface["description"],20," ",STR_PAD_RIGHT),0,20); + + $used_color = $colors[++$i*2]; + + $opts_GRAPH = array_merge ($opts_GRAPH,array( + "LINE2:load$id#$used_color:'".$description."\:'", + "GPRINT:load$id:MAX:'Max\: %3.0lf %%'", + "GPRINT:load$id:AVERAGE:'Average\: %3.0lf %%'", + "GPRINT:load$id:LAST:'Last\: %3.0lf %%\\n'" + )); + } + } + + $opts_header[] = "--vertical-label='Loads'"; + $opts_header[] = "--rigid"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_time_remaining.inc.php jffnms-0.8.2/engine/graphs/ups_time_remaining.inc.php --- jffnms-0.8.1/engine/graphs/ups_time_remaining.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_time_remaining.inc.php 2005-05-09 21:04:25.134483576 -0300 @@ -0,0 +1,24 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function graph_ups_time_remaining ($data) { + + $opts_DEF = rrdtool_get_def($data,array("minutes_remaining")); + + $opts_GRAPH = array( + "CDEF:minutes_remaining_h=minutes_remaining,60,/", + "AREA:minutes_remaining#00DD00:'Time Remaining\:'", + "GPRINT:minutes_remaining:MAX:'Max\: %3.0lf min'", + "GPRINT:minutes_remaining:AVERAGE:'Average\: %3.0lf min'", + "GPRINT:minutes_remaining:LAST:'Last\: %3.0lf min'", + "GPRINT:minutes_remaining_h:LAST:'(%3.2lf Hours)\\n'", + ); + + $opts_header[] = "--vertical-label='Time Remaining'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_voltage.inc.php jffnms-0.8.2/engine/graphs/ups_voltage.inc.php --- jffnms-0.8.1/engine/graphs/ups_voltage.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_voltage.inc.php 2005-05-09 21:04:25.134483576 -0300 @@ -0,0 +1,23 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_ups_voltage ($data) { + + $opts_DEF = rrdtool_get_def($data,array("voltage")); + + $opts_GRAPH = array( + "AREA:voltage#0033AA:'Voltage '", + "GPRINT:voltage:MAX:'Max\: %3.0lf %sVolts'", + "GPRINT:voltage:AVERAGE:'Average\: %3.0lf %sVolts'", + "GPRINT:voltage:LAST:'Last\: %3.0lf %sVolts\\n'", + ); + + $opts_header[] = "--vertical-label='Voltage'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/graphs/ups_voltage_aggregation.inc.php jffnms-0.8.2/engine/graphs/ups_voltage_aggregation.inc.php --- jffnms-0.8.1/engine/graphs/ups_voltage_aggregation.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/graphs/ups_voltage_aggregation.inc.php 2005-05-09 21:04:25.134483576 -0300 @@ -0,0 +1,43 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function graph_ups_voltage_aggregation ($data) { + + $color_array = array("4","B","D"); + foreach ($color_array as $a) + foreach ($color_array as $c) + foreach ($color_array as $e) + $colors[] = $e."0".$c."0".$a."0"; + + $opts_DEF = array(); + $opts_GRAPH = array(); + + foreach ($data["id"] as $id) { + $interface=$data[$id]; + + $defs = rrdtool_get_def($interface,array("voltage$id"=>"voltage")); + + $opts_DEF = @array_merge($opts_DEF, $defs); + + $description = + substr(str_pad($interface["host_name"]." ".$interface["zone_shortname"],20," ",STR_PAD_RIGHT),0,20)." ". + substr(str_pad($interface["interface"]." ".$interface["description"],20," ",STR_PAD_RIGHT),0,20); + + $used_color = $colors[++$i*2]; + + $opts_GRAPH = array_merge ($opts_GRAPH,array( + "LINE2:voltage$id#$used_color:'".$description."\:'", + "GPRINT:voltage$id:MAX:'Max\: %3.0lf %sV'", + "GPRINT:voltage$id:AVERAGE:'Average\: %3.0lf %sV'", + "GPRINT:voltage$id:LAST:'Last\: %3.0lf %sV\\n'" + )); + } + + $opts_header[] = "--vertical-label='Voltages'"; + + return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH)); +} +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/poller2.php jffnms-0.8.2/engine/poller2.php --- jffnms-0.8.1/engine/poller2.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/poller2.php 2005-05-09 21:04:25.342451960 -0300 @@ -17,12 +17,12 @@ function hosts_random_list($interval = false) { //FIXME Add Satellite $query_hosts=" - SELECT hosts.id, count(interfaces.id) as cant_interfaces + SELECT hosts.id, count(interfaces.id) as cant_interfaces, hosts.last_poll_date FROM hosts, interfaces WHERE hosts.id > 1 and hosts.poll = 1 and interfaces.id > 1 and interfaces.poll > 1 and interfaces.host = hosts.id". (($interval)?" and ((hosts.last_poll_date + hosts.poll_interval - (hosts.last_poll_time/2)) < ".time().")":""). - "\n\t GROUP BY hosts.id ORDER BY hosts.last_poll_date asc"; + "\n\t GROUP BY hosts.id, hosts.last_poll_date ORDER BY hosts.last_poll_date asc"; $result_hosts = db_query ($query_hosts) or die ("Query failed - R2 - ".db_error()); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/pollers/buffer.php jffnms-0.8.2/engine/pollers/buffer.php --- jffnms-0.8.1/engine/pollers/buffer.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/pollers/buffer.php 2005-05-09 21:04:25.191474912 -0300 @@ -11,6 +11,8 @@ $buffer = &$GLOBALS["session_vars"]["poller_buffer"]; + $values = array(); + foreach ($buffer_names as $buffer_name) if (isset($buffer[$buffer_name."-".$options["interface_id"]])) $values[] = $buffer[$buffer_name."-".$options["interface_id"]]; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/pollers/livingston_serial_port_status.php jffnms-0.8.2/engine/pollers/livingston_serial_port_status.php --- jffnms-0.8.1/engine/pollers/livingston_serial_port_status.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/pollers/livingston_serial_port_status.php 2005-05-09 21:04:25.219470656 -0300 @@ -29,8 +29,9 @@ $names = $pm3["names"]; $total_ports = 0; - //$selected_ports = 0; + $selected_ports = 0; + if (is_array($lines)) foreach ( $lines as $line ) { if ( $line == $option and (strpos($names[$total_ports],"S") !== false) ) $selected_ports ++; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/pollers/ups_line.php jffnms-0.8.2/engine/pollers/ups_line.php --- jffnms-0.8.1/engine/pollers/ups_line.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/pollers/ups_line.php 2005-05-09 21:04:25.233468528 -0300 @@ -0,0 +1,42 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + +function poller_ups_line ($options) { + + $UPSMIB = ".1.3.6.1.2.1.33"; //SNMPv2-SMI::mib-2.33 + + $upsInputs = $UPSMIB.".1.3.3.1"; //UPS-MIB::upsInputEntry + $upsOutputs = $UPSMIB.".1.4.4.1"; //UPS-MIB::upsOutputEntry + + $upsInputsIndex = $upsInputs.".1"; //UPS-MIB::upsInputLineIndex + $upsOutputsIndex = $upsOutputs.".1"; //UPS-MIB::upsOutputLineIndex + + $upsInputVoltage = $upsInputs.".3"; //UPS-MIB::upsInputVoltage + $upsOutputVoltage = $upsOutputs.".2"; //UPS-MIB::upsOutputVoltage + + $upsInputCurrent = $upsInputs.".4"; //UPS-MIB::upsInputCurrent + $upsOutputCurrent = $upsOutputs.".3"; //UPS-MIB::upsOutputCurrent + + $upsOutputLoad = $upsOutputs.".5"; //UPS-MIB::upsOutputLoad + + $input = ($options["line_type"]=="INPUT")?true:false; + + switch ($options["poller_name"]) { + case "voltage": $oid = ($input)?$upsInputVoltage:$upsOutputVoltage; break; + case "current": $oid = ($input)?$upsInputCurrent:$upsOutputCurrent; break; + case "load" : $oid = ($input)?false:$upsOutputLoad; break; + } + + if (!empty($oid)) { + $oid .= ".".$options["line_index"]; + + $value = snmp_get($options["host_ip"], $options["ro_community"], $oid); + } + + return $value; +} + +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/rrd_analizer.php jffnms-0.8.2/engine/rrd_analizer.php --- jffnms-0.8.1/engine/rrd_analizer.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/rrd_analizer.php 2005-05-09 21:04:25.348451048 -0300 @@ -27,8 +27,9 @@ function analyzer_fetch($interface_id,$from,$to,$dss) { $dss_names = array_keys($dss); - + $values = rrdtool_fetch_ds($interface_id, $dss_names, "-$from", "-$to"); + if (is_array($values)) { foreach ($values as $value_name=>$value_data) diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/trap_receiver.php jffnms-0.8.2/engine/trap_receiver.php --- jffnms-0.8.1/engine/trap_receiver.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/engine/trap_receiver.php 2005-05-09 21:04:25.351450592 -0300 @@ -15,49 +15,62 @@ $jffnms_functions_include="engine"; include_once("../conf/config.php"); + + + function trap_duplicate ($current_oid, $span = 5) { + $query = "SELECT id FROM traps WHERE trap_oid = '".$current_oid."' AND date > ".(time()-$span)." ORDER BY id desc"; + $rs = db_query($query); + + return (db_num_rows($rs) > 0)?true:false; + } $stdin = fopen('php://stdin', 'r'); $hostname = trim(fgets($stdin,4096)) or die("Could not get hostname"); $ipaddr = trim(fgets($stdin,4096)) or die("Could not get IP"); - //snmptrapd seems to prefer hostnames, and they become longer than 20 chars... - if(strlen($ipaddr) > 20) $ipaddr = gethostbyname($ipaddr); + $ipaddr = extract_ip($ipaddr); // ipaddr may be UDP: [1.1.1.1] + + if ((ip2long($ipaddr) == -1) || (ip2long($ipaddr) == false)) // if its not an IP address, it may be a hostname + $ipaddr = gethostbyname($ipaddr); // resolve it using DNS - $uptime = fgets($stdin,4096) or die("Could not get uptime"); + $uptime = trim(fgets($stdin,4096)) or die("Could not get uptime"); $trapoid = fgets($stdin,4096) or die("Could not get trapoid"); $trapoid = preg_replace("/^\S+\s+(\S+)\s*$/", "$1", $trapoid); - $output = "------\nUptime: $uptime\nTrap OID: $trapoid\n"; + $output = "------\nIP: ".$ipaddr."\nUptime: $uptime\nTrap OID: $trapoid\n"; - //prevent warnings: - $varbinds = array(); + if (!trap_duplicate($trapoid)) { - while($line=trim(fgets($stdin,4096))) - //if (preg_match ("/^(\S+)\s+\"?([^\" \t]+)\"?$/", $line, $matches)) - if (preg_match ("/^(\S+)\s+=?\s?\"?([^\" \t]+)\"?$/", $line, $matches)) - $varbinds[$matches[1]] = $matches[2]; - else - $output .= "Not Matched: $line\n"; + //prevent warnings: + $varbinds = array(); - fclose($stdin); + while($line=trim(fgets($stdin,4096))) + if (preg_match ("/^(\S+)\s+=?\s?\"?([^\" \t]+)\"?$/", $line, $matches)) + $varbinds[$matches[1]] = $matches[2]; + else + $output .= "Not Matched: $line\n"; - foreach ($varbinds as $key=>$var) - $output .= "Line ".(++$varnum)." is: $key ==> $var\n"; + foreach ($varbinds as $key=>$var) + $output .= "Line ".(++$varnum)." is: ".$key." ==> ".$var."\n"; - logger ($output); - // Insert into database: - $now = date("Y-m-d H:i:s",time()); - $trap_id = db_insert ("traps",array("date"=>$now, "ip"=>$ipaddr, "trap_oid"=>$trapoid)); + // Insert into database: + $trap_id = db_insert ("traps",array("date"=>time(), "ip"=>$ipaddr, "trap_oid"=>$trapoid)); - logger ("New Trap ID: $trap_id\n"); + $oidid = 1; + foreach ($varbinds as $key=>$var) + db_insert("traps_varbinds",array("trapid"=>$trap_id, "oidid"=>$oidid++, "trap_oid"=>$key, "value"=>$var)); + + $output .= "New Trap ID: ".$trap_id."\n\n\n"; + } else + $output .= "Duplicate Trap\n"; - $oidid = 1; - foreach ($varbinds as $key=>$var) - db_insert("traps_varbinds",array("trapid"=>$trap_id, "oidid"=>$oidid++, "trap_oid"=>$key, "value"=>$var)); - db_close(); + + logger ($output); + fclose($stdin); + exit(0); ?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/trap_receiver.sh jffnms-0.8.2/engine/trap_receiver.sh --- jffnms-0.8.1/engine/trap_receiver.sh 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/trap_receiver.sh 2005-05-09 21:04:25.411441472 -0300 @@ -0,0 +1,4 @@ +#!/bin/bash +JFFNMS=`dirname $0` +cd $JFFNMS +php -q trap_receiver.php diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/trap_receivers/none.inc.php jffnms-0.8.2/engine/trap_receivers/none.inc.php --- jffnms-0.8.1/engine/trap_receivers/none.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/trap_receivers/none.inc.php 2005-05-09 21:04:25.381446032 -0300 @@ -0,0 +1,11 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function trap_receiver_none ($params) { + // Never Matches + return array(false, array()); + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/trap_receivers/static.inc.php jffnms-0.8.2/engine/trap_receivers/static.inc.php --- jffnms-0.8.1/engine/trap_receivers/static.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/trap_receivers/static.inc.php 2005-05-09 21:04:25.387445120 -0300 @@ -0,0 +1,41 @@ + Erno Rigo + * This program is licensed under the GNU GPL, full terms in the LICENSE file + * + * Trap sink receiver. Meant to be used in conjunction with the 'event' backend plugin. + * + * Parameters: + * alarm_state,[interface_index_field],[interface_index_varbind] + * + * Where: + * alarm_state - alarm state to send to backend + * interface_index_field - interface index field name (eg. "index"), + * interface_index_varbind - interface index value SNMP Varbind number + * + */ + + function trap_receiver_static ($params) { + + $res = array(); + + list ($res["status"], $interface_index_field, $interface_index_varbind) = explode(",", $params["receiver_parameters"]); + + // Match interface (name and id) by index field + if (($interface_index_field !== "") && ($interface_index_varbind !== "")) { + $int_data = interfaces_get_by_field_value ($params["host_id"], $params["interface_type"], + $interface_index_field, $params["trap_vars"][$interface_index_varbind]); + + if (is_numeric($int_data["interface_id"])) { + $res["interface"] = $int_data["interface"]; // for event backend + $res["interface_id"] = $int_data["interface_id"]; // for alarm backend + } + } + + // for event or alarm backend + $res["date"] = date("Y-m-d H:i:s", $params["trap"]["date"]); + $res["referer"] = $params["trap"]["id"]; + + return array(true, $res); + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/engine/trap_receivers/unknown.inc.php jffnms-0.8.2/engine/trap_receivers/unknown.inc.php --- jffnms-0.8.1/engine/trap_receivers/unknown.inc.php 1969-12-31 21:00:00.000000000 -0300 +++ jffnms-0.8.2/engine/trap_receivers/unknown.inc.php 2005-05-09 21:04:25.395443904 -0300 @@ -0,0 +1,21 @@ + Javier Szyszlican + * This program is licensed under the GNU GPL, full terms in the LICENSE file + */ + + function trap_receiver_unknown ($params) { + + $info_aux = array(); + foreach($params["trap_vars"] as $id => $value) + $info_aux[] = $id.": ".$value; + + $res = array( + "info" => "Trap OID ".$params["trap"]["trap_oid"]." Values: ".join(", ", $info_aux), + "date" => date("Y-m-d H:i:s", $params["trap"]["date"]), + "referer" => $params["trap"]["id"] + ); + + return array(true, $res); + } +?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/adm/adm_hosts.inc.php jffnms-0.8.2/htdocs/admin/adm/adm_hosts.inc.php --- jffnms-0.8.1/htdocs/admin/adm/adm_hosts.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/adm/adm_hosts.inc.php 2005-05-09 21:04:24.679552736 -0300 @@ -219,7 +219,7 @@ //other fields foreach ($fields as $fdata) if (($fdata["showable"]==1) && ($fdata["ftype_handler"]!="bool")) - echo td(substr($value[$fdata["name"]],0,30),"field_".$fdata["name"]); + echo td(htmlspecialchars(substr($value[$fdata["name"]],0,30)),"field_".$fdata["name"]); if ($fields_left > 0) echo td(" ","empty_fields","",$fields_left); @@ -240,7 +240,7 @@ if (is_array($bulk_add) && (count($bulk_add)>0)) { while ( list($key,$data) = each ($bulk_add)) { while ( list($field,$value) = each ($data)) - $html.=hidden("bulk_add[".$key."][".$field."]",$value,0); + $html.=hidden("bulk_add[".$key."][".$field."]",htmlspecialchars($value),0); $html.="\n"; } diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/adm/adm_interfaces.php jffnms-0.8.2/htdocs/admin/adm/adm_interfaces.php --- jffnms-0.8.1/htdocs/admin/adm/adm_interfaces.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/adm/adm_interfaces.php 2005-05-09 21:04:24.635559424 -0300 @@ -57,7 +57,7 @@ foreach ($fields as $field_name=>$data) if ($data["showable"] > 0) { if (isset($values[$field_name])) - $value = $values[$field_name]; + $value = htmlspecialchars($values[$field_name]); else $value = $data["default_value"]; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/adm/adm_nad.php jffnms-0.8.2/htdocs/admin/adm/adm_nad.php --- jffnms-0.8.1/htdocs/admin/adm/adm_nad.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/adm/adm_nad.php 2005-05-09 21:04:24.647557600 -0300 @@ -46,18 +46,20 @@ function nad_view_host($host_id, $host, $ips, $ints) { $host_ips = array(); + $ip_types = array(); foreach ($host["ips"] as $net=>$net_ips) - foreach ($net_ips as $ip) { - $nets .= - tr(array( - linktext($net, $GLOBALS["REQUEST_URI"]."&nad_type=net&nad_id=".$net), - $ip, - (!empty($ips[$ip]["dns"])?$ips[$ip]["dns"]:" "), - nad_ip_type($ips[$ip]["type"])) - ); - $host_ips[] = $ip; - $ip_types[$ip] = $ips[$ip]["type"]; - } + foreach ($net_ips as $ip) + if (ip2long($ip)!=-1) { + $nets .= + tr(array( + linktext($net, $GLOBALS["REQUEST_URI"]."&nad_type=net&nad_id=".$net), + $ip, + (!empty($ips[$ip]["dns"])?$ips[$ip]["dns"]:" "), + nad_ip_type($ips[$ip]["type"])) + ); + $host_ips[] = $ip; + $ip_types[$ip] = $ips[$ip]["type"]; + } reset($ints); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/adm/adm_standard.php jffnms-0.8.2/htdocs/admin/adm/adm_standard.php --- jffnms-0.8.1/htdocs/admin/adm/adm_standard.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/adm/adm_standard.php 2005-05-09 21:04:24.648557448 -0300 @@ -24,7 +24,7 @@ if (!profile($st["profile"])) die ("

".$st["deny"]."

"); } - if (!$st["no_records_message"]) $st["no_records_message"] = "No Records Found."; + if (!$st["no_records_message"]) $st["no_records_message"] = "No Records Found"; if (isset($st["include"])) include_once("adm_".$st["include"].".inc.php"); @@ -260,9 +260,12 @@ case "html": echo td( - linktext($field_data["name"], - $REQUEST_URI."&action=list&sf=".$field_name."&so=".((($sf==$field_name) && ($so=="asc"))?"desc":"asc") - ,"","field"). + //ordering + (($action=="list") + ?linktext($field_data["name"], + $REQUEST_URI."&action=list&sf=".$field_name."&so=".((($sf==$field_name) && ($so=="asc"))?"desc":"asc") + ,"","field") + :$field_data["name"]). //filter ((($field_data["filter"]!==false) && ($field_name!=="id") && ($action=="list") && (isset($filters[$field_name]))) @@ -284,11 +287,15 @@ } $shown = 0; - + if ($cant > 0) { while (list(, $record) = each($records)) - if ((($st["hide_record_one"]==0) || ($record["id"] > 1) || ($record["id"]=="new")) && //hide record number 1 - (($st["filter_by_user"]=="") || $admin_users || ($record[$st["filter_by_user"]]==$auth_user_id)) //filter by user + if ((($st["hide_record_one"]==0) || ($record["id"] > 1) || ($record["id"]=="new")) && //hide record number 1, allow new record + + (!isset($st["filter_by_user"]) || //filter by user is not set or + ($record[$st["filter_by_user"]]==$auth_user_id) || //filter-by-user-record = logged in user + ($admin_users && (empty($filter) || ($record[$st["filter_by_user"]]==$filter))) //is admin and filter not set or filter matches + ) ) { //debug ($record); @@ -460,7 +467,7 @@ if (function_exists($st["after_record_function"])) call_user_func_array($st["after_record_function"], array($record)); - } //while + } //while } // cant if ($shown==0) diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/adm/structures.php jffnms-0.8.2/htdocs/admin/adm/structures.php --- jffnms-0.8.1/htdocs/admin/adm/structures.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/adm/structures.php 2005-05-09 21:04:24.665554864 -0300 @@ -107,23 +107,6 @@ ); - $structures["traps_types"] = array( - "title"=>"SNMP Trap Events Types", - "object"=>"traps_types", - "show_id"=>1, - "action_type"=>1, - "profile"=>"ADMIN_SYSTEM", - - "fields"=>array( - "match_oid"=>array( "name"=>"OID Match", "type"=>"textbox", "size"=>100), - "interface"=>array( "name"=>"Interface Field", "type"=>"textbox", "size"=>10), - "username"=>array( "name"=>"Username Field", "type"=>"textbox", "size"=>10), - "state"=>array( "name"=>"State Field", "type"=>"textbox", "size"=>10), - "info"=>array( "name"=>"Extra Info Field", "type"=>"textbox", "size"=>10), - "type"=>array( "name"=>"Event Type", "type"=>"select", "func"=>"select_event_types", "view"=>"types_description", "size"=>30), - NULL) - ); - $structures["syslog_types"] = array( "title"=>"Syslog Events Types", "object"=>"syslog_types", @@ -349,6 +332,26 @@ NULL) ); + $structures["trap_receivers"] = array( + "title"=>"SNMP Trap Receivers", + "object"=>"trap_receivers", + "show_id"=>1, + "action_type"=>1, + "hide_record_one"=>0, + "profile"=>"ADMIN_SYSTEM", + + "fields"=>array( + "position"=>array( "name"=>"Position", "type"=>"textbox", "size"=>3), + "description"=>array( "name"=>"Description", "type"=>"textbox","size"=>30), + "interface_type"=>array( "name"=>"Interface Type", "type"=>"select", "func"=>"select_interface_types", "view"=>"interface_type_description", "size"=>30), + "match_oid"=>array( "name"=>"OID Match", "type"=>"textbox","size"=>50), + "command"=>array( "name"=>"Receiver Command (file)", "type"=>"textbox","size"=>30), + "parameters"=>array( "name"=>"Parameters", "type"=>"textbox","size"=>100), + "backend"=>array( "name"=>"Backend", "type"=>"select", "func"=>"select_backends", "size"=>30, "view"=>"backend_description"), + "stop_if_matches"=>array( "name"=>"Stop if Matches", "type"=>"checkbox"), + NULL) + ); + $structures["pollers_backend"] = array( "title"=>"Pollers Backends", "object"=>"pollers_backend", @@ -462,6 +465,7 @@ "show_id"=>0, "action_type"=>1, "filter_by_user"=>"user_id", + "filter_field"=>"user_id", "fields"=>array( "trigger_id"=>array( "name"=>"Trigger", "type"=>"select", "func"=>"select_triggers", "size"=>30, "view"=>"trigger_description"), diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/menu.php jffnms-0.8.2/htdocs/admin/menu.php --- jffnms-0.8.1/htdocs/admin/menu.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/menu.php 2005-05-09 21:04:24.709548176 -0300 @@ -29,11 +29,11 @@ "nad" =>array("title"=>"Network Discovery", "type"=>"admframe", "image"=>"world"), "events" =>array("title"=>"Event Analyzer", "image"=>"event", - "items" =>array("severity","event_types","syslog_types","traps_types","alarm_states")), + "items" =>array("severity","event_types","syslog_types","trap_receivers","receiver_backends","alarm_states")), "severity" =>array("title"=>"Severities", "type"=>"standard", "image"=>"" ), "event_types" =>array("title"=>"Event Types", "type"=>"standard", "image"=>"event"), "syslog_types" =>array("title"=>"Syslog Message Rules","type"=>"standard", "image"=>"" ), - "traps_types" =>array("title"=>"SNMP Trap Rules", "type"=>"standard", "image"=>"" ), + "trap_receivers" =>array("title"=>"SNMP Trap Receivers", "type"=>"standard", "image"=>"" ), "alarm_states" =>array("title"=>"Alarm States & Sounds","type"=>"standard", "image"=>"alert"), "polling" =>array("title"=>"Polling & Discovery", "image"=>"", @@ -41,7 +41,7 @@ "interface_types" =>array("title"=>"Interface Types", "type"=>"standard", "image"=>"" ), "pollers_groups" =>array("title"=>"Poller Grouping", "type"=>"stdframe", "image"=>"" ), "pollers" =>array("title"=>"Poller Items", "type"=>"standard", "image"=>"" ), - "pollers_backend" =>array("title"=>"Backend Items", "type"=>"standard", "image"=>"" ), + "pollers_backend" =>array("title"=>"Poller Backends", "type"=>"standard", "image"=>"" ), "graph_types" =>array("title"=>"Graph Types", "type"=>"standard", "image"=>"graph"), "autodiscovery" =>array("title"=>"Autodiscovery Policy", "type"=>"standard", "image"=>"" ), diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/admin/menu_frame.php jffnms-0.8.2/htdocs/admin/menu_frame.php --- jffnms-0.8.1/htdocs/admin/menu_frame.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/admin/menu_frame.php 2005-05-09 21:04:24.702549240 -0300 @@ -27,7 +27,7 @@ echo tag("!DOCTYPE", "", "","HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\"", false); - adm_header($menu." Menu","","",true); + adm_header("Menu","","",true); echo tag("frameset", $menu, "", $frame_def." frameborder='no' framespacing='0'"). diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/default.css jffnms-0.8.2/htdocs/default.css --- jffnms-0.8.1/htdocs/default.css 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/default.css 2005-05-09 21:04:24.883521728 -0300 @@ -6,10 +6,12 @@ text-align: center; padding: 0px 0px 0px 0px; font-family: tahoma, arial, sans-serif; + color: black; } body { background-color: #fbfbfb; + color: black; } html>body, html>body #contents { @@ -22,6 +24,7 @@ font-size: 11px; font-family: tahoma, arial, sans-serif; background-color: inherit; + color: black; } input[type="text"], @@ -32,11 +35,12 @@ select { border: 2px solid black; background-color: #f5f5f5; + color: black; } -input[type="submit"] { background-color: #aaa; } +input[type="submit"] { background-color: #aaa; color: black; } -input:hover { background-color: #ddd; border-color: #55a; } +input:hover { background-color: #ddd; border-color: #55a; color: black; } select { border-color: white; } @@ -73,6 +77,7 @@ height: 100%; top:0; left:0; + color: black; } #login #box { @@ -82,6 +87,7 @@ border: 2px solid #bbb; padding: 10px; background-color: #fbfbfb; + color: black; } #login #box .title a { @@ -125,6 +131,7 @@ height: 100%; border-collapse: collapse; vertical-align: top; + color: black; } #mainmenu td { text-align: center; } @@ -161,6 +168,7 @@ text-align: center; border-top: 1px solid black; border-bottom: 1px solid black; + color: black; } #events .header td { @@ -819,6 +827,11 @@ .admintable#admin_interfaces #itype_4 #field_interface, .admintable#admin_pollers #field_parameters, +.admintable#admin_pollers_backend #field_parameters, +.admintable#admin_trap_receivers #field_parameters, +.admintable#admin_trap_receivers #field_match_oid, +.admintable#admin_receiver_backends #field_parameters, +.admintable#admin_event_types #field_text, .admintable#admin_syslog_types #field_match_text { font-family: monospace; text-align:left; } diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/start.php jffnms-0.8.2/htdocs/start.php --- jffnms-0.8.1/htdocs/start.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/start.php 2005-05-09 21:04:24.863524768 -0300 @@ -28,8 +28,8 @@ if ($view_stats==1) { $alarms = ($map_id==1) - ?$jffnms->interfaces->status(NULL,array("in_maps"=>1, "client"=>$client_id)) //all interfaces in rootmap - :$jffnms->interfaces->status(NULL,array("map"=>$map_id, "client"=>$client_id)); //all interfaces in map + ?$jffnms->interfaces->status(NULL,array("in_maps"=>1, "client"=>$client_id, "only_visible"=>true)) //all interfaces in rootmap + :$jffnms->interfaces->status(NULL,array("map"=>$map_id, "client"=>$client_id, "only_visible"=>true)); //all interfaces in map foreach ($alarms as $key=>$value) if ($key!="total") $alarms_text .= "".$key.": ".$value["qty"]."
"; diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/htdocs/views/source_interfaces_infobox.inc.php jffnms-0.8.2/htdocs/views/source_interfaces_infobox.inc.php --- jffnms-0.8.1/htdocs/views/source_interfaces_infobox.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/htdocs/views/source_interfaces_infobox.inc.php 2005-05-09 21:04:24.818531608 -0300 @@ -6,7 +6,7 @@ unset ($aux_description_formated); foreach ($item["description"] as $aux_desc=>$aux_value) - $aux_description_formated .= "
$aux_desc: $aux_value"; + $aux_description_formated .= "
$aux_desc: ".htmlentities($aux_value); $aux_description = join(" ",$item["description"]); //to be used elsewere diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/api.classes.inc.php jffnms-0.8.2/lib/api.classes.inc.php --- jffnms-0.8.1/lib/api.classes.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/api.classes.inc.php 2005-05-09 21:04:25.731392832 -0300 @@ -123,20 +123,6 @@ var $jffnms_insert = array("severity"=>"New Severity",bgcolor=>"000000",fgcolor=>"FFFFFF"); } - class jffnms_traps_types extends internal_base_standard { - var $jffnms_class = "traps_types"; - var $jffnms_insert = array("match_oid"=>"New Trap OID"); - - function get_all($ids = NULL) { - return get_db_list( - array($this->jffnms_class,"types"), $ids, - array($this->jffnms_class.".*","types_description"=>"types.description") , - array(array($this->jffnms_class.".type","=","types.id"),array($this->jffnms_class.".id",">",1)), - array(array($this->jffnms_class.".id","desc")) - ); - } - } - class jffnms_journal extends internal_base_standard { var $jffnms_class = "journal"; var $jffnms_insert = array("subject"=>"New Journal"); @@ -298,6 +284,32 @@ var $jffnms_order_type = "asc"; } + class jffnms_trap_receivers extends internal_base_standard { + var $jffnms_class = "trap_receivers"; + var $jffnms_insert = array("description"=>"a New Trap Receiver", "match_oid"=>"Trap OID", "position"=>"10", "command"=>"none"); + var $jffnms_filter_record = 0; + + function get_all($ids = NULL) { + return get_db_list( + array($this->jffnms_class,"interface_types","pollers_backend"), $ids, + array( + $this->jffnms_class.".*", + "interface_type_description"=>"interface_types.description", + "backend_description"=>"pollers_backend.description" + ) , + array( + array($this->jffnms_class.".interface_type","=","interface_types.id"), + array($this->jffnms_class.".backend","=","pollers_backend.id") + ), + array( + array($this->jffnms_class.".position","asc"), + array($this->jffnms_class.".description","asc"), + array($this->jffnms_class.".id","desc") + ) + ); + } + } + class jffnms_pollers_groups extends internal_base_standard { var $jffnms_class = "pollers_groups"; var $jffnms_insert = array("description"=>"New Poller Group"); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/api.inc.php jffnms-0.8.2/lib/api.inc.php --- jffnms-0.8.1/lib/api.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/api.inc.php 2005-05-09 21:04:25.731392832 -0300 @@ -304,7 +304,7 @@ if ($process_name_len > 1) //if name is rigth if (get_config_option ("os_type")=="unix") { //if we are on a Unix OS - exec("ps -eo args",$ps_list); //call 'ps' + exec("ps axo args",$ps_list); //call 'ps' if (count($ps_list) > 0) foreach ($ps_list as $process) { diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/api.interface.inc.php jffnms-0.8.2/lib/api.interface.inc.php --- jffnms-0.8.1/lib/api.interface.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/api.interface.inc.php 2005-05-09 21:04:25.731392832 -0300 @@ -4,6 +4,24 @@ * This program is licensed under the GNU GPL, full terms in the LICENSE file */ + function interfaces_get_by_field_value($host_id, $interface_type, $field_name, $field_value) { + + $query= + "SELECT i.id as interface_id,i.interface as interface ". + "FROM interfaces_values iv, interface_types_fields itf, interfaces i ". + "WHERE iv.field=itf.id AND iv.interface=i.id ". + "AND itf.name='".$field_name."' AND itf.itype=".$interface_type." AND i.host=".$host_id." AND value='".$field_value."'"; + + $result=db_query($query) or die("query failed ($query) - interfaces_get_id_by_field_value: ".db_error()); + + if(0 < db_num_rows($result)) { + $row=db_fetch_array($result); + return $row; + } else { + return array("interface"=>NULL,"interface_id"=>-1); + } + } + function interfaces_filter($filters = NULL) { $from = array(); $where = array(); @@ -91,6 +109,14 @@ $fields["host_rwcommunity"] ="hosts.rwcommunity"; $fields["host_satellite"] ="hosts.satellite"; break; + + case "only_visible": + if ($filter_value) { + $where[] = array("interfaces.show_rootmap", "=", "1"); + $where[] = array("hosts.show_host", "=", "1"); + $where[] = array("zones.show_zone", "=", "1"); + } + break; } $where[]=array("interfaces.id",">",$interface_id_filter); //filter interface id @@ -128,12 +154,12 @@ else $alarm_join_type = "LEFT OUTER"; //show null if not found - $from = "FROM hosts".(($aux_from!="")?", $aux_from":"").", interfaces"; + $from = "FROM zones, hosts".(($aux_from!="")?", $aux_from":"").", interfaces"; $joins = "$alarm_join_type JOIN alarms on (alarms.interface = interfaces.id and interfaces.check_status = 1 and $alarms_filter)\n". "LEFT OUTER JOIN types on (types.id = alarms.type)\n". "LEFT OUTER JOIN severity on (types.severity = severity.id)\n". "LEFT OUTER JOIN alarm_states on (alarms.active = alarm_states.id and $alarm_state_filter)"; - $where = "WHERE interfaces.id > 1 and interfaces.host = hosts.id"; + $where = "WHERE interfaces.id > 1 and interfaces.host = hosts.id and hosts.zone = zones.id"; if (is_array($where_special)) foreach ($where_special as $aux) diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/api.network.inc.php jffnms-0.8.2/lib/api.network.inc.php --- jffnms-0.8.1/lib/api.network.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/api.network.inc.php 2005-05-09 21:04:25.731392832 -0300 @@ -5,19 +5,26 @@ */ // Frontend SNMP Functions for Current code. - function snmp_walk ($host, $comm, $oid, $include_oid = false, $retries = 2) { + define ("INCLUDE_OID_NONE", false); + define ("INCLUDE_OID_ALL", true); + define ("INCLUDE_OID_BASE", "10"); + define ("INCLUDE_OID_1", "11"); + define ("INCLUDE_OID_2", "12"); + define ("INCLUDE_OID_3", "13"); + + function snmp_walk ($host, $comm, $oid, $include_oid = INCLUDE_OID_NONE, $retries = 2) { $result = snmp_wrapper("walk", $host, $comm, $oid, $include_oid, $retries); - if (is_array($result)) - foreach ($result as $key=>$aux) { - $aux = snmp_netsnmp_fix($aux); - - if (strpos($aux,"=")!==false) - $aux = substr($aux, strpos($aux,"=")+2, strlen($aux)); + if (is_array($result)) { + while (list ($key, $entry) = each ($result)) + $result[$key] = snmp_fix_value ($entry); + + if ($include_oid > INCLUDE_OID_BASE) //if we're asked to reduce the table key + $result = snmp_reduce_table_key ($result, $include_oid-INCLUDE_OID_BASE); - $result[$key]=$aux; - } + reset($result); + } //logger ("\nsnmpwalk $host:$comm $oid = ".vd($result)."\n"); return $result; @@ -25,15 +32,13 @@ function snmp_get ($host, $comm, $oid, $retries = 2) { - $aux = snmp_wrapper("get", $host, $comm, $oid, false, $retries); + $result = snmp_wrapper("get", $host, $comm, $oid, false, $retries); - if ($aux!==false) { - $aux = snmp_netsnmp_fix($aux); - if (strpos($aux,"=")) $aux = substr($aux,strpos($aux,"=")+2,strlen($aux)); - } + if ($result!==false) + $result = snmp_fix_value($result); //logger ("\nsnmpget $host:$comm $oid = $aux\n"); - return $aux; + return $result; } function snmp_set ($host, $comm, $oid, $type, $value, $timeout = 2) { @@ -83,15 +88,36 @@ return @call_user_func_array("snmp".$p["action"].((($p["action"]=="walk") && ($p["include_oid"]))?"oid":""), $params); } + function jffnms_snmp2_internal ($p) { + + $params = array_merge( + array($p["ip"], $p["community"], $p["oid"]), + (($p["action"]=="set") + ?array($p["set_type"], $p["set_value"]) + :array()), + array($p["timeout"]*1000000,$p["retries"])); + + $result = @call_user_func_array("snmp2_".((($p["action"]=="walk") && ($p["include_oid"]))?"real_":"").$p["action"], $params); + + if (is_string($result) && + (preg_match("/No Such (Object|Instance)/i", $result) || preg_match("/No more variables left/i", $result))) + $result = false; + + return $result; + } + function jffnms_snmp2 ($p) { + if (function_exists("snmp2_get")) //if we have native SNMPv2 functions + return jffnms_snmp2_internal ($p); //call the internal SNMPv2 functions + $func = "snmp".$p["action"]." -v2c ".(!$p["include_oid"]?"-Oqv":"")." -c '".$p["community"]."' -t ".$p["timeout"]." -r ".$p["retries"]." ". $p["ip"]." ".$p["oid"]. (($p["action"]=="set")?" ".$p["set_type"]." ".$p["set_value"]:""); //logger ("Command ".$func."\n"); @exec($func, $result, $aux); - + if ((count($result)==1) && (preg_match("/No Such (Object|Instance)/i", current($result)) || preg_match("/No more variables left/i", current($result)))) @@ -99,7 +125,7 @@ else { - if ($p["action"]=="get") $result = current($result); + if ($p["action"]=="get") $result = join("\n",$result); if ($p["include_oid"]) foreach ($result as $key=>$aux) { @@ -137,9 +163,11 @@ // Aux SNMP Functions function get_snmp_counter ($ip,$community,$oid) { + $aux = explode(":",@snmp_get($ip,$community,$oid)); - if (count($aux)==1) $result = $aux[0]; - else $result = $aux[1]; + + $result = (count($aux)==1)?$aux[0]:$aux[1]; + return $result; } @@ -149,22 +177,45 @@ return (($version=="v1") || empty($oid_64))?$oid_32:$oid_64; } - function snmp_netsnmp_fix ($value) { - //BUGFIXES FOR NET-SNMP 5 + function snmp_fix_value ($value) { + $value=preg_replace("/INTEGER: /","",$value); + if (preg_match("/^\"(\S.+)\"$/",$value,$parts)) $value = $parts[1]; if (preg_match("/STRING: \"(\S.+)\"/",$value,$parts)) $value = $parts[1]; $value=preg_replace("/STRING: /","",$value); $value = preg_replace("/IpAddress: /","",$value); $value = preg_replace("/Gauge32: /","",$value); + $value = preg_replace("/Counter32: /","",$value); + $value = preg_replace("/Counter64: /","",$value); + + if (strpos($value,"=")!==false) // if it has = in the value + $value = substr($value, strpos($value,"=")+2, strlen($value)); // return only the data after the = $value = trim ($value); return $value; } + function snmp_reduce_table_key ($table, $important = 1) { + + if (is_array($table) && (count($table) > 0)) { + + reset ($table); + $new_table = array(); + while (list ($key, $value) = each ($table)) { + + $new_key = join (".",array_slice(explode (".",$key),-($important))); + $new_table[$new_key] = $value; + } + + return $new_table; + } else + return $table; + } + function snmp_hex_to_string ($hex) { $value = trim($hex); if (substr($value,0,3)=="Hex") { @@ -399,4 +450,13 @@ return $result; } + function extract_ip ($text) { + + $num= "(2[0-5]{2}|1\d\d|[0-9]{2}|[0-9])"; + + if (preg_match("/$num\.$num\.$num\.$num/", $text, $matches)) + return join(".", array_slice($matches,1)); + else + return $text; + } ?> diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/api.rrdtool.inc.php jffnms-0.8.2/lib/api.rrdtool.inc.php --- jffnms-0.8.1/lib/api.rrdtool.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/api.rrdtool.inc.php 2005-05-09 21:04:25.732392680 -0300 @@ -67,33 +67,37 @@ if ($method=="fetch") { $start=0; reset ($ret1); - while (list ($key,$line) = each ($ret1)) - if (!empty($line)) { - - $line1 = explode(" ",$line); - - if (strpos($line,":") > 0) { - - for ($i = 1; $i < count($line1); $i++) // Part 1 is timestamp - if ($line1[$i]!=="") // Part 2 maybe is a space - $value[] = ($line1[$i]=="nan")?0:(float)$line1[$i]; // Part 3 (or 2) has the data - - $date = (int)$line1[0]; // Time Stamp - if (!isset($stop)) $stop=0; - if ($date > $stop) $stop = $date; - if (($date < $start) or ($start==0)) $start = $date; - - } else { - foreach ($line1 as $aux) - if (!empty($aux) && ($aux!="timestamp")) // Avoid the timestamp as a DS (rrdtool >= 1.0.49) - $ds_namv[]=trim($aux); - - $dn_cnt = count($ds_namv); + $ret = false; + + if (count($ret1) > 1) + while (list ($key,$line) = each ($ret1)) + if (!empty($line)) { + + $line1 = explode(" ",$line); + + if (strpos($line,":") > 0) { + + for ($i = 1; $i < count($line1); $i++) // Part 1 is timestamp + if ($line1[$i]!=="") // Part 2 maybe is a space + $value[] = ($line1[$i]=="nan")?0:(float)$line1[$i]; // Part 3 (or 2) has the data + + $date = (int)$line1[0]; // Time Stamp + if (!isset($stop)) $stop=0; + if ($date > $stop) $stop = $date; + if (($date < $start) or ($start==0)) $start = $date; + + } else { + foreach ($line1 as $aux) + if (!empty($aux) && ($aux!="timestamp")) // Avoid the timestamp as a DS (rrdtool >= 1.0.49) + $ds_namv[]=trim($aux); + + $ds_cnt = count($ds_namv); + } + unset($ret1[$key]); } - unset($ret1[$key]); - } - $ret = array("start"=>$start,"end"=>$stop,"step"=>300,"ds_cnt"=>$dn_cnt,"ds_namv"=>$ds_namv,"data"=>$value); - //var_dump($ret); + + $ret = array("start"=>$start,"end"=>$stop,"step"=>300,"ds_cnt"=>$ds_cnt,"ds_namv"=>$ds_namv,"data"=>$value); + //var_dump($ret); } $ret2 = 0; //FIXME why update goes bad with satellites @@ -303,7 +307,7 @@ $values["information"]["start"]=$ret["start"]; $values["information"]["stop"]=$ret["end"]; } - + return $values; } diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/api.triggers.inc.php jffnms-0.8.2/lib/api.triggers.inc.php --- jffnms-0.8.1/lib/api.triggers.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/api.triggers.inc.php 2005-05-09 21:04:25.732392680 -0300 @@ -96,7 +96,7 @@ if ($aux) { $pair = explode(":",$aux); - if ($pair[0]=="from") $parameters_array[$pair[0]]=""; //EXCEPTION "from" handling, keep the last one + if (($pair[0]=="from") && (!empty($pair[1]))) $parameters_array[$pair[0]]=""; //EXCEPTION "from" handling, keep the last one $parameters_array[$pair[0]].=" ".$pair[1]; $parameters_array[$pair[0]] = trim($parameters_array[$pair[0]]); @@ -304,6 +304,8 @@ function triggers_users_list($ids = NULL, $user_id = NULL,$trigger_id = NULL,$only_active = 0) { $where = array(); + if (is_array($user_id)) $user_id = current($user_id); //fix for adm_standard filter_field + if ($user_id) $where[]=array("triggers_users.user_id","=",$user_id); if ($trigger_id) $where[]=array("triggers_users.trigger_id","=",$trigger_id); if ($only_active==1) $where[]=array("triggers_users.active","=",1); diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/gui.controls.inc.php jffnms-0.8.2/lib/gui.controls.inc.php --- jffnms-0.8.1/lib/gui.controls.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/gui.controls.inc.php 2005-05-09 21:04:25.732392680 -0300 @@ -260,26 +260,26 @@ $trigger_fields = array( "event"=>array( "any"=> array("name"=>"Any"), - "date"=> array("name"=>"Hour", "function"=>"select_hours", "params"=>NULL), + "date"=> array("name"=>"Hour", "function"=>"select_hours", "params"=>array()), "host_id"=> array("name"=>"Host", "function"=>"select_hosts", "params"=>array(3)), - "zone_id"=> array("name"=>"Zone", "function"=>"select_zones", "params"=>NULL), + "zone_id"=> array("name"=>"Zone", "function"=>"select_zones", "params"=>array()), "type_id"=> array("name"=>"Type", "function"=>"select_event_types", "params"=>array(3)), "text"=> array("name"=>"Event Text", "function"=>"textbox", "params"=>array(30)), "interface_id"=> array("name"=>"Interface", "function"=>"select_interfaces", "params"=>array(6)), - "map"=> array("name"=>"Interface Maps", "function"=>"select_maps", "params"=>NULL), + "map"=> array("name"=>"Interface Maps", "function"=>"select_maps", "params"=>array()), "interface_client_id"=> array("name"=>"Client", "function"=>"select_clients", "params"=>array(3)), "none"=> array("name"=>"None") ), "alarm"=>array( "any"=> array("name"=>"Any"), - "date"=> array("name"=>"Hour", "function"=>"select_hours", "params"=>NULL), + "date"=> array("name"=>"Hour", "function"=>"select_hours", "params"=>array()), "type"=> array("name"=>"Type", "function"=>"select_event_types_alarms","params"=>array(3)), - "duration"=> array("name"=>"Duration", "function"=>"select_alarm_duration", "params"=>NULL), - "active"=> array("name"=>"State", "function"=>"select_alarm_states", "params"=>NULL), + "duration"=> array("name"=>"Duration", "function"=>"select_alarm_duration", "params"=>array()), + "active"=> array("name"=>"State", "function"=>"select_alarm_states", "params"=>array()), "interface_host"=> array("name"=>"Host", "function"=>"select_hosts", "params"=>array(3)), "interface_type"=> array("name"=>"Interface Type", "function"=>"select_interface_types", "params"=>array(3)), "interface"=> array("name"=>"Interface", "function"=>"select_interfaces_host", "params"=>array(6)), - "map"=> array("name"=>"Interface Maps", "function"=>"select_maps", "params"=>NULL), + "map"=> array("name"=>"Interface Maps", "function"=>"select_maps", "params"=>array()), "interface_client_id"=> array("name"=>"Client", "function"=>"select_clients", "params"=>array(3)), "interface_interface"=> array("name"=>"Interface Name", "function"=>"textbox", "params"=>array(30)), "none"=> array("name"=>"None") @@ -290,7 +290,7 @@ global $trigger_fields; foreach ($trigger_fields[$type] as $key=>$aux) - $temp[$key]=$aux[name]; + $temp[$key]=$aux["name"]; if ($text==0) return select_custom($name,$temp,$value); @@ -301,10 +301,12 @@ function select_trigger_fields_value($name,$value,$type,$field) { global $trigger_fields; - if ((!$field) || ($field=="any") || ($field=="none")) return; + + if ((!$field) || ($field=="any") || ($field=="none")) + return; else return call_user_func_array($trigger_fields[$type][$field]["function"], - array_merge(array($name,$value),$trigger_fields[$type][$field][params])); + array_merge(array($name, $value), $trigger_fields[$type][$field]["params"])); } function select_action_parameters($name,$value,$field_struct,$text = 0) { diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' jffnms-0.8.1/lib/gui.inc.php jffnms-0.8.2/lib/gui.inc.php --- jffnms-0.8.1/lib/gui.inc.php 2005-03-07 16:14:54.000000000 -0300 +++ jffnms-0.8.2/lib/gui.inc.php 2005-05-09 21:04:25.732392680 -0300 @@ -252,7 +252,7 @@ // Checkbox + Detail td( checkbox_value("checkedid[]", $summary_ids, ((($event["ack"]!=0) && ($journal_id > 1) &&($journal_id==$event["ack"]))?1:0)). //check - linktext($ack_image,$REQUEST_URI."&journal_id=".(($event["ack"]==0)?1:0)."&journal_button=Ack&checkedid[]=".$id), + linktext($ack_image,$REQUEST_URI."&journal_id=".(($event["ack"]==0)?1:0)."&journal_button=Ack&checkedid[]=".$summary_ids), "ack_check"). // Type