Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • None
    • Scripts
    • None

    Description

      Running discovery.php -h all form the SSH in the Observium server. I get this error below is what I get after running the script

       

      Oops! Something went wrong! You may want to report this to the Observium developers.

      fclose(): Argument #1 ($stream) must be of type resource, bool given in /opt/observium/includes/common.inc.php:626

      Stack trace:

      #0: (unknown function) called at [/opt/observium/includes/common.inc.php:626]
      621: } else {
      622: $fd = fopen($filename, 'wb');
      623: // Check writable file (only after creation for speedup)
      624: if (!is_writable($filename))

      { 625: print_debug("Log file '$filename' is not writable or not created."); 626: fclose($fd); 627: return FALSE; 628: }

      629: }
      630:
      631: //$string = '[' . date('Y/m/d H:i:s O') . '] ' . basename($argv[0]) . '(' . getmypid() . '): ' . trim($string) . PHP_EOL;

      #1: fclose called at [/opt/observium/includes/common.inc.php:626]
      621: } else {
      622: $fd = fopen($filename, 'wb');
      623: // Check writable file (only after creation for speedup)
      624: if (!is_writable($filename))

      { 625: print_debug("Log file '$filename' is not writable or not created."); 626: fclose($fd); 627: return FALSE; 628: }

      629: }
      630:
      631: //$string = '[' . date('Y/m/d H:i:s O') . '] ' . basename($argv[0]) . '(' . getmypid() . '): ' . trim($string) . PHP_EOL;

      #2: logfile called at [/opt/observium/discovery.php:277]
      272: print_warning("WARNING: 0 devices discovered." . ($options['h'] !== 'new' ? " Did you specify a device that does not exist?" : ''));
      273: }
      274:
      275: $string = $argv[0] . ": $doing - $discovered_devices devices discovered in $discovery_time secs";
      276: print_debug($string);
      277: logfile($string);
      278:
      279: // Clean stale observium processes
      280: $process_sql = "SELECT * FROM `observium_processes` WHERE `poller_id` = ? AND `process_start` < ?";
      281: foreach (dbFetchRows($process_sql, [$config['poller_id'], $config['time']['fourhour']]) as $process) {
      282: // We found processes in DB, check if it exist on system

       

       

      This is the first time using this software so I could be doing something wrong but Please let me know if there is anything else you need.

      Attachments

        1. myagent.discovery
          1.01 MB
        2. myagent.poller
          1.47 MB

        Activity

          [OBS-4631] Run discovery.php -h all
          landy Mike Stupalov made changes -
          Assignee Original: Adam Armstrong [ adama ] New: Mike Stupalov [ landy ]
          Issue Type Original: Vendor Bug [ 10000 ] New: Bug [ 1 ]
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          landy Mike Stupalov made changes -
          Status Original: In Review [ 10101 ] New: In Progress [ 3 ]
          landy Mike Stupalov made changes -
          Attachment Original: myagent-1.snmpwalk [ 20941 ]
          landy Mike Stupalov made changes -
          Attachment Original: myagent.snmpwalk [ 20940 ]
          william.hardwick@comeausea.com William Hardwick made changes -
          Attachment New: myagent.poller [ 20943 ]
          william.hardwick@comeausea.com William Hardwick made changes -
          Attachment New: myagent.discovery [ 20942 ]
          william.hardwick@comeausea.com William Hardwick made changes -
          Attachment New: myagent-1.snmpwalk [ 20941 ]
          landy Mike Stupalov made changes -
          Status Original: Pending Response [ 10000 ] New: In Review [ 10101 ]
          william.hardwick@comeausea.com William Hardwick made changes -
          Attachment New: myagent.snmpwalk [ 20940 ]
          bot Observium Bot made changes -
          Status Original: Open [ 1 ] New: Pending Response [ 10000 ]
          william.hardwick@comeausea.com William Hardwick created issue -

          People

            landy Mike Stupalov
            william.hardwick@comeausea.com William Hardwick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: