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

[PATCH] Not filtering # in /etc/hosts - r11648

Details

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

    Description

      Commit r11648 fails to skip:

      #192.168.99.209 host.example.com

      in /etc/hosts

       

      patch:

      *no* further _formatting_ is done here

      root@observium:/opt/observium# svn diff ./includes/common.inc.php
      Index: includes/common.inc.php
      ===================================================================
      — includes/common.inc.php (revision 11654)
      +++ includes/common.inc.php (working copy)
      @@ -3569,6 +3569,8 @@

      //print_vars($d);
      $ip = array_shift($d);
      + if (safe_empty($ip) || str_starts($ip, '#')) { continue; } // skip empty and comments
      +
      $hosts = array_map('strtolower', $d);
      if (in_array($host, $hosts, TRUE)) {
      if ((is_flag_set(OBS_DNS_A, $flags) && str_contains($ip, '.')) ||

      Attachments

        Activity

          [OBS-3906] [PATCH] Not filtering # in /etc/hosts - r11648
          bot Observium Bot made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          landy Mike Stupalov made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

          Ohh sure, tnx.
          Fixed in r11655.

          landy Mike Stupalov added a comment - Ohh sure, tnx. Fixed in r11655.
          landy Mike Stupalov made changes -
          Status Original: In Review [ 10101 ] New: In Progress [ 3 ]
          landy Mike Stupalov made changes -
          Comment [ Please make and attach additional information about the device:
           * full snmp dump from device:
          {noformat}
          snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk
          snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk
          {noformat}
            _If device not support SNMP version 2c, replace -v2c with -v1._

           * If you have problems with discovery or poller processes, please do and attach these debugs:
          {noformat}
          ./discovery.php -d -h <device>
          ./poller.php -d -h <device>
          {noformat}
           
          * additionally attach device and/or vendor specific MIB files

          {color:#505F79}_Note, this comment is added automatically._{color} ]
          landy Mike Stupalov made changes -
          Status Original: Pending Response [ 10000 ] New: In Review [ 10101 ]

          And this makes fping timeout in a funny way:

          CMD/usr/bin/fping -t 500 -c 1 -q #192.168.99.209 2>&1

          pnlarsson Niklas Larsson added a comment - And this makes fping timeout in a funny way: CMD /usr/bin/fping -t 500 -c 1 -q #192.168.99.209 2>&1
          bot Observium Bot made changes -
          Status Original: Open [ 1 ] New: Pending Response [ 10000 ]
          pnlarsson Niklas Larsson created issue -

          People

            landy Mike Stupalov
            pnlarsson Niklas Larsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: