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

Run discovery.php -h all

    XMLWordPrintable

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

          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: