No announcement yet.

Newbie installation trouble

  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie installation trouble

    I'm having some problems getting Nagios 2.5 and Oreon 1.3.1-1 up and running. I used the directions here for the install, though admittedly this is on a SLES 10 box rather than Debian. for both Nagios and Oreon appear to process without incident.

    Several problems arise. First of all, running:

    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg


    Error: cannot open config file '/usr/local/nagios/etc/checkcommands.cfg' for reading: Invalid Argument

    owner of /nagios/etc and files within appears to be wwwrun.nagios. user nagios is a member of nagios group, but wwwrun is not. Don't know if I need to chown wwwrun.nagios or chown nagios.www, or if chmod is in order.

    opening up nagios in web browser, I can log in fine using nagiosadmin as user, but clicking on service detail yields:

    Error: Could not read object configuration data!

    I presume this is related to the prior problem.

    Opened Oreon config in the web browser. First config page shows:

    Nagios User: nagios
    Nagios Group: nagios
    Apache User: wwwrun
    Apache Group: www
    Nagios Version: 2.x
    Nagios Configuration Directory: /usr/local/nagios/etc
    Nagios Plugins: /usr/local/nagios/libexec
    RRDTool Binary: /usr/bin/rrdtool

    I verified all file paths are correct. Click next and the succeeding page yields OKs for PHP version (5.12) and all PHP plugins (MySQL, GD, LDAP, SNMP, XML, PEAR), but it stops at "Writable Nagios Config Directory", with no error message following it.

    Also, for some reason /etc/init.d/nagios is an empty file so issuing restart has no effect.

    If there are any tips as to the next steps, I would greatly appreciate it.

  • #2
    Solved a couple of problems. Did a reinstall on Nagios from source rather than the package linked in the debianhelp link above, specifying make install-init to take care of the initialization script. Did a chown -R nagios.www /usr/local/nagios and a chmod -R 775 /usr/local/nagios/etc, and now nagios functions properly. Don't know if those are the most proper or secure ownership and permission settings, but all seems well in any case

    I haven't tried reinstalling Oreon yet so the writable directory problem will come next.

    I'm sure these are all elementary mistakes, as I'm quite new to linux...part of the reason I am doing this, for a bit more familiarity.

    Thanks again!


    • #3
      Still have Oreon problems. I took a peek at /usr/local/oreon/www/install/steps/step4.php, and this block of code appears to be the hangup:

      <td>Writable Nagios Config Directory</td>
      <td align="right"><?

      if (is_dir($_SESSION['nagios_conf'])) {
      $uid = posix_getpwuid (fileowner($_SESSION['nagios_conf']));
      $gid = posix_getgrgid (filegroup($_SESSION['nagios_conf']));
      $perms = substr(sprintf('%o', fileperms($_SESSION['nagios_conf'])), -3) ;
      if( (strcmp($perms,'775') == 0 ) && (strcmp($_SESSION['apache_user'], $uid['name']) == 0 ) && (strcmp($_SESSION['nagios_group'], $gid['name']) == 0) ){
      echo '<span class="go">OK</font>';
      $msg = '';
      } else {
      echo '<span class="stop">Critical: Not Writeable</font>';
      $msg = $uid['name'] .':'. $gid['name'] .'(' .$perms. ')[/b]' ;
      $msg .= '
      Should be '. $_SESSION['apache_user'].':'.$_SESSION['nagios_group'].' (775)';
      $return_false = 1;
      } else {
      echo '<span class="stop">Critical: Directory not exist</font>';
      $msg = '';
      $return_false = 1;
      } ?>

      Looking at this code makes it apparent we need the owner of the nagios conf directory to be the apache user (wwwrun in my case), and the group owner to be the nagios group (nagios in my case), with chmod 775.

      I set my permissions as such an still encounter the problem where it hangs after:

      <td>Writable Nagios Config Directory</td>
      <td align="right"><

      Which is the last thing I see in the HTML output in the running PHP script, meaning something in the following block will not execute properly and the page fails to load completely.

      Thanks in advance for any insight into this problem.


      • #4
        Found problem. Posix library was not part of my default PHP5 install. Oreon Installation script should have check for posix, IMO.

        Looks like it's good least that step anyway.

        Thanks again.


        • #5
          Originally posted by joelmole
          Found problem. Posix library was not part of my default PHP5 install. Oreon Installation script should have check for posix, IMO.

          Looks like it's good least that step anyway.

          Thanks again.
          I hope Oreon dev team read this.
          In doubt, you should enter a bug in bugtracker:

          Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
          Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
          Fedora Core 5 - 2.6.20-1.2320


          • #6
            yes, we read it !

            whick php package did you install ? php5-posix ?
            StatusMap Module - NDO Tools Module - ImportCSV Module - SNMP-UI Module - PDFReports Module
            Dons Paypal