Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3656

discovery fails on fortigate firewall with recent versions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Discovery

    Description

      Just noticed today with 11025 that discovery on fortigate firewalls fails - updated to 11029 but issue persists. Before 11025 i was on 11000 and haven't seen the issue:

      observium@noc:~$ ./discovery.php -m processors -dd -h 192.168.100.1
      DEBUG!
      Load class 'Console_Color2' from '/opt/observium/libs/pear/Console/Color2.php': OK
       
      CMD[/usr/bin/svn info /opt/observium]
       
      Wrong process status! Issue in proc_get_status(), see: https://bugs.php.net/bug.php?id=69014
      CMD EXITCODE[0]
      CMD RUNTIME[0.0107s]
      STDOUT[
      Path: .
      Working Copy Root Path: /opt/observium
      URL: http://svn.observium.org/svn/observium/trunk
      Relative URL: ^/observium/trunk
      Repository Root: http://svn.observium.org/svn
      Repository UUID: 61d68cd4-352d-0410-923a-c4978735b2b8
      Revision: 11029
      Node Kind: directory
      Schedule: normal
      Last Changed Author: mike
      Last Changed Rev: 11029
      Last Changed Date: 2021-02-18 20:31:39 +0100 (Thu, 18 Feb 2021)
       
      ]
       
      SQL[SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'dbSchema';]
      ROWS[1]
      SQL RUNTIME[0.00025487s]
       
      SQL[SELECT @@SESSION.sql_mode;]
      ROWS[1]
      SQL RUNTIME[0.00033498s]
       
      SQL[SET SESSION `sql_mode` = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION']
      ROWS[0]
      SQL RUNTIME[0.00020790s]
      DB mode(s) disabled: STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO
       
      CMD[date "+%:z"]
       
      Wrong process status! Issue in proc_get_status(), see: https://bugs.php.net/bug.php?id=69014
      CMD EXITCODE[0]
      CMD RUNTIME[0.0023s]
      STDOUT[
      +01:00
      ]
       
      SQL[SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);]
      ROWS[1]
      SQL RUNTIME[0.00021887s]
       
      SQL[SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'current_rev';]
      ROWS[1]
      SQL RUNTIME[0.00009990s]
       
      SQL[SELECT * FROM `config`]
      ROWS[31]
      SQL RUNTIME[0.00007486s]
       
      CMD[/bin/hostname -f]
       
      Wrong process status! Issue in proc_get_status(), see: https://bugs.php.net/bug.php?id=69014
      CMD EXITCODE[0]
      CMD RUNTIME[0.0019s]
      STDOUT[
      noc.x-zone.at
      ]
      Load class 'Net_IPv6' from '/opt/observium/libs/pear/Net/IPv6.php': OK
       
        ___   _                              _
       / _ \ | |__   ___   ___  _ __ __   __(_) _   _  _ __ ___
      | | | || '_ \ / __| / _ \| '__|\ \ / /| || | | || '_ ` _ \
      | |_| || |_) |\__ \|  __/| |    \ V / | || |_| || | | | | |
       \___/ |_.__/ |___/ \___||_|     \_/  |_| \__,_||_| |_| |_|
                                Observium Professional 21.2.11029
                                        https://www.observium.org
       
       
      CMD[/opt/observium/scripts/distro]
       
      CMD EXITCODE[0]
      CMD RUNTIME[0.0605s]
      CMD EXITDELAY[10ms]
      STDOUT[
      Linux|5.7.0-0.bpo.2-amd64|amd64|Debian|10|kvm|
      ]
       
      CMD[/usr/bin/env python --version 2>&1]
       
      CMD EXITCODE[0]
      CMD RUNTIME[0.0024s]
      CMD EXITDELAY[10ms]
      STDOUT[
      Python 2.7.16
      ]
       
      SQL[SELECT version();]
      ROWS[1]
      SQL RUNTIME[0.00024199s]
       
      CMD[/usr/bin/snmpget --version 2>&1]
       
      CMD EXITCODE[0]
      CMD RUNTIME[0.0028s]
      CMD EXITDELAY[10ms]
      STDOUT[
      NET-SNMP version: 5.7.3
      ]
       
      CMD[/usr/bin/rrdtool --version | head -n1]
       
      CMD EXITCODE[0]
      CMD RUNTIME[0.0078s]
      STDOUT[
      RRDtool 1.7.1  Copyright by Tobias Oetiker <tobi@oetiker.ch>
      ]
       
      CMD[/usr/bin/fping -v 2>&1]
       
      CMD EXITCODE[0]
      CMD RUNTIME[0.0018s]
      CMD EXITDELAY[10ms]
      STDOUT[
      /usr/bin/fping: Version 4.2
      /usr/bin/fping: comments to david@schweikert.ch
      ]
       
      CMD[/usr/sbin/apache2 -v | awk '/Server version:/ {print $3}']
       
      CMD EXITCODE[0]
      CMD RUNTIME[0.0322s]
      STDOUT[
      Apache/2.4.38
      ]
       
      SQL[SELECT @@SESSION.sql_mode;]
      ROWS[1]
      SQL RUNTIME[0.00025892s]
       
      SQL[SHOW VARIABLES LIKE 'character_set_connection']
      ROWS[1]
      SQL RUNTIME[0.00063300s]
       
      #####  Software versions  #####
       
       o OS                   Linux 5.7.0-0.bpo.2-amd64 [amd64] (Debian 10)
       o Apache               2.4.38
       o PHP                  8.0.2 (OPcache: DISABLED)
       o Python               2.7.16
       o MariaDB              10.3.27-MariaDB-0+deb10u1 (extension: mysqli 8.0.2)
       o SNMP                 NET-SNMP 5.7.3
       o RRDtool              1.7.1
       o Fping                4.2 (IPv4 and IPv6)
       
      #####  Memory Limit  #####
       
       o PHP                  Unlimited
       
      #####  MariaDB mode  #####
       
       o MariaDB              NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
       
      #####  Charset info  #####
       
       o PHP                  UTF-8
       o MariaDB              utf8
       
      #####  Timezones info  #####
       
       o Date                 Friday, 19-Feb-21 02:31:59 CET
       o PHP                  +01:00
       o MariaDB              +01:00
       
       
      SQL[SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'last_versioncheck';]
      ROWS[1]
      SQL RUNTIME[0.00006986s]
       
      SQL[SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'latest_rev';]
      ROWS[1]
      SQL RUNTIME[0.00006199s]
      #####  Starting discovery run at 2021-02-19 02:31:59  #####
       
       
      SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `hostname` LIKE '192.168.100.1' AND `status` = '1' AND `poller_id` = '0' ORDER BY `last_discovered_timetaken` ASC]
      ROWS[1]
      SQL RUNTIME[0.00011587s]
       
      CMD[/usr/bin/snmpget -v3 -l 'authPriv' -n '' -x 'AES' -X 'xxxxxxxx' -a 'SHA' -A 'xxxxxxxx' -u 'xxxxxxxx' -Pud -OQUs -m SNMPv2-MIB -M /opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp 'udp':'192.168.100.1':'161' sysObjectID.0 sysUpTime.0]
       
      Wrong process status! Issue in proc_get_status(), see: https://bugs.php.net/bug.php?id=69014
      CMD EXITCODE[0]
      CMD RUNTIME[0.0342s]
      STDOUT[
      sysObjectID.0 = enterprises.12356.101.1.846
      sysUpTime.0 = 6:1:48:03.95
      ]
      SNMP STATUS[TRUE]
       
      SQL[SELECT * FROM `entity_attribs` WHERE `entity_type` = 'device' AND `entity_id` = '143']
      ROWS[1]
      SQL RUNTIME[0.00012398s]
       
      SQL[SELECT * FROM `observium_processes` WHERE `process_name` = 'discovery.php' AND `device_id` = '143' AND `poller_id` = '0']
      ROWS[1]
      SQL RUNTIME[0.00044489s]
       
      SQL[DELETE FROM `observium_processes` WHERE `process_id` = '26729345']
      ROWS[1]
      SQL RUNTIME[0.00176191s]
       
      SQL[INSERT INTO `observium_processes` (`process_pid`,`process_name`,`process_ppid`,`process_uid`,`process_command`,`process_start`,`device_id`)  VALUES ('26377','discovery.php','29101','1001','php ./discovery.php -m processors -dd -h 192.168.100.1','1613698319','143')]
      ROWS[1]
      SQL RUNTIME[0.00106907s]
      #####  192.168.100.1 [143]  #####
       
       
       
       > $device_discovery_cache_keys /opt/observium/includes/discovery/functions.inc.php:881 
      array(
        [0] => string(10) "db_version"
        [1] => string(8) "timezone"
        [2] => string(9) "localhost"
        [3] => string(8) "versions"
        [4] => string(7) "devices"
        [5] => string(14) "entity_attribs"
        [6] => string(18) "entity_attribs_all"
      )
       
      SQL[SELECT `mib` FROM `devices_mibs` WHERE `device_id` = '143' AND `use` = 'mib' AND `disabled` = '1']
      ROWS[0]
      SQL RUNTIME[0.00006104s]
       
       
       > get_device_mibs_permitted($device) /opt/observium/includes/discovery/functions.inc.php:883 
      array(
        [0]  => string(22) "FORTINET-FORTIGATE-MIB"
        [1]  => string(17) "FORTINET-CORE-MIB"
        [2]  => string(10) "SNMPv2-MIB"
        [3]  => string(18) "SNMP-FRAMEWORK-MIB"
        [4]  => string(6) "IF-MIB"
        [5]  => string(13) "ADSL-LINE-MIB"
        [6]  => string(13) "EtherLike-MIB"
        [7]  => string(10) "ENTITY-MIB"
        [8]  => string(17) "ENTITY-SENSOR-MIB"
        [9]  => string(8) "LLDP-MIB"
        [10] => string(13) "CISCO-CDP-MIB"
        [11] => string(10) "PW-STD-MIB"
        [12] => string(15) "DISMAN-PING-MIB"
        [13] => string(8) "BGP4-MIB"
        [14] => string(6) "IP-MIB"
        [15] => string(8) "IPV6-MIB"
        [16] => string(8) "OSPF-MIB"
      )
       o OS Type              fortigate
       o OS Group             fortinet
       o SNMP Version         v3
       o Last discovery       2021-02-15 18:34:52
       o Last duration        5.11 seconds
       
      #####  Module Start: processors  #####
       
       o FORTINET-FORTIGATE-MIB  
      CMD[/usr/bin/snmpbulkwalk -Cr'50' -v3 -l 'authPriv' -n '' -x 'AES' -X 'xxxxxxxx' -a 'SHA' -A 'xxxxxxxx' -u 'xxxxxxxx' -Pud -OQUsb -m FORTINET-FORTIGATE-MIB -M /opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp:/opt/observium/mibs/fortinet 'udp':'192.168.100.1':'161' fgProcessorTable]
       
      Wrong process status! Issue in proc_get_status(), see: https://bugs.php.net/bug.php?id=69014
      CMD EXITCODE[0]
      CMD RUNTIME[0.0463s]
      STDOUT[
      fgProcessorEntIndex.1 = 1
      fgProcessorEntIndex.2 = 2
      fgProcessorEntIndex.3 = 3
      fgProcessorEntIndex.4 = 4
      fgProcessorEntIndex.5 = 5
      fgProcessorEntIndex.6 = 6
      fgProcessorEntIndex.7 = 7
      fgProcessorEntIndex.8 = 8
      fgProcessorUsage.1 = 0
      fgProcessorUsage.2 = 0
      fgProcessorUsage.3 = 0
      fgProcessorUsage.4 = 0
      fgProcessorUsage.5 = 0
      fgProcessorUsage.6 = 0
      fgProcessorUsage.7 = 0
      fgProcessorUsage.8 = 0
      fgProcessorUsage5sec.1 = 0
      fgProcessorUsage5sec.2 = 0
      fgProcessorUsage5sec.3 = 1
      fgProcessorUsage5sec.4 = 0
      fgProcessorUsage5sec.5 = 0
      fgProcessorUsage5sec.6 = 0
      fgProcessorUsage5sec.7 = 0
      fgProcessorUsage5sec.8 = 0
      fgProcessorType.1 = fgProcessorOther
      fgProcessorType.2 = fgProcessorOther
      fgProcessorType.3 = fgProcessorOther
      fgProcessorType.4 = fgProcessorOther
      fgProcessorType.5 = fgProcessorOther
      fgProcessorType.6 = fgProcessorOther
      fgProcessorType.7 = fgProcessorOther
      fgProcessorType.8 = fgProcessorOther
      fgProcessorContainedIn.1 = 1
      fgProcessorContainedIn.2 = 1
      fgProcessorContainedIn.3 = 1
      fgProcessorContainedIn.4 = 1
      fgProcessorContainedIn.5 = 1
      fgProcessorContainedIn.6 = 1
      fgProcessorContainedIn.7 = 1
      fgProcessorContainedIn.8 = 1
      fgProcessorPktRxCount.1 = 0
      fgProcessorPktRxCount.2 = 0
      fgProcessorPktRxCount.3 = 0
      fgProcessorPktRxCount.4 = 0
      fgProcessorPktRxCount.5 = 0
      fgProcessorPktRxCount.6 = 0
      fgProcessorPktRxCount.7 = 0
      fgProcessorPktRxCount.8 = 0
      fgProcessorPktTxCount.1 = 0
      fgProcessorPktTxCount.2 = 0
      fgProcessorPktTxCount.3 = 0
      fgProcessorPktTxCount.4 = 0
      fgProcessorPktTxCount.5 = 0
      fgProcessorPktTxCount.6 = 0
      fgProcessorPktTxCount.7 = 0
      fgProcessorPktTxCount.8 = 0
      fgProcessorPktDroppedCount.1 = 0
      fgProcessorPktDroppedCount.2 = 0
      fgProcessorPktDroppedCount.3 = 0
      fgProcessorPktDroppedCount.4 = 0
      fgProcessorPktDroppedCount.5 = 0
      fgProcessorPktDroppedCount.6 = 0
      fgProcessorPktDroppedCount.7 = 0
      fgProcessorPktDroppedCount.8 = 0
      fgProcessorUserUsage.1 = 0
      fgProcessorUserUsage.2 = 0
      fgProcessorUserUsage.3 = 0
      fgProcessorUserUsage.4 = 0
      fgProcessorUserUsage.5 = 0
      fgProcessorUserUsage.6 = 0
      fgProcessorUserUsage.7 = 0
      fgProcessorUserUsage.8 = 0
      fgProcessorSysUsage.1 = 0
      fgProcessorSysUsage.2 = 0
      fgProcessorSysUsage.3 = 0
      fgProcessorSysUsage.4 = 0
      fgProcessorSysUsage.5 = 0
      fgProcessorSysUsage.6 = 0
      fgProcessorSysUsage.7 = 0
      fgProcessorSysUsage.8 = 0
      ]
      SNMP STATUS[TRUE]
        String 'Processor fgProcessorOther 1' transformed by action [replace] to: 'Processor Other 1'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.1, fgProcessorUsage.1, fgProcessorTable, Processor Other 1, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.1' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00014997s]
        String 'Processor fgProcessorOther 2' transformed by action [replace] to: 'Processor Other 2'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.2, fgProcessorUsage.2, fgProcessorTable, Processor Other 2, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.2' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00007510s]
        String 'Processor fgProcessorOther 3' transformed by action [replace] to: 'Processor Other 3'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.3, fgProcessorUsage.3, fgProcessorTable, Processor Other 3, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.3' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00009513s]
        String 'Processor fgProcessorOther 4' transformed by action [replace] to: 'Processor Other 4'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.4, fgProcessorUsage.4, fgProcessorTable, Processor Other 4, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.4' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00007391s]
        String 'Processor fgProcessorOther 5' transformed by action [replace] to: 'Processor Other 5'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.5, fgProcessorUsage.5, fgProcessorTable, Processor Other 5, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.5' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00008702s]
        String 'Processor fgProcessorOther 6' transformed by action [replace] to: 'Processor Other 6'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.6, fgProcessorUsage.6, fgProcessorTable, Processor Other 6, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.6' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00012088s]
        String 'Processor fgProcessorOther 7' transformed by action [replace] to: 'Processor Other 7'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.7, fgProcessorUsage.7, fgProcessorTable, Processor Other 7, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.7' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00007892s]
        String 'Processor fgProcessorOther 8' transformed by action [replace] to: 'Processor Other 8'
      143 -> .1.3.6.1.4.1.12356.101.4.4.2.1.2.8, fgProcessorUsage.8, fgProcessorTable, Processor Other 8, 1, 0, , 
       
      SQL[SELECT * FROM `processors` WHERE `device_id` = '143' AND `processor_index` = 'fgProcessorUsage.8' AND `processor_type` = 'fgProcessorTable']
      ROWS[1]
      SQL RUNTIME[0.00009513s]
      PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, int given in /opt/observium/includes/functions.inc.php:4283
      Stack trace:
      #0 /opt/observium/includes/discovery/processors.inc.php(30): discovery_check_if_type_exist()
      #1 /opt/observium/includes/discovery/functions.inc.php(996): include('...')
      #2 /opt/observium/discovery.php(201): discover_device()
      #3 {main}
        thrown in /opt/observium/includes/functions.inc.php on line 4283
       
      Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, int given in /opt/observium/includes/functions.inc.php:4283
      Stack trace:
      #0 /opt/observium/includes/discovery/processors.inc.php(30): discovery_check_if_type_exist()
      #1 /opt/observium/includes/discovery/functions.inc.php(996): include('...')
      #2 /opt/observium/discovery.php(201): discover_device()
      #3 {main}
        thrown in /opt/observium/includes/functions.inc.php on line 4283
      

      Thanks,
      Alex

      Attachments

        Activity

          People

            landy Mike Stupalov
            ajoelly.magna Alexander Joelly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: