Changes

From SME Server
Jump to navigationJump to search
130 bytes removed ,  01:33, 25 February 2015
no edit summary
Line 405: Line 405:     
=Configure Multimon etc Scripts=
 
=Configure Multimon etc Scripts=
 +
 +
The nut-cgi rpm contains scripts that can be run via the webserver to monitor the UPS(s).
    
===Dowload and install===
 
===Dowload and install===
Get the rpms from [http://sourceforge.net/projects/apcupsd/files/rpms%20-%20Stable/3.14.10/ APCUPSD sourceforge]
  −
  −
wget http://sourceforge.net/projects/apcupsd/files/rpms%20-%20Stable/3.14.10/apcupsd-3.14.10-1.el5.x86_64.rpm/download
     −
Install with yum
+
You have to enable the '''[[epel]]''' repositories.
  yum localinstall apcupsd-3.14.10-1.el5.x86_64.rpm apcupsd-multimon-3.14.10-1.el5.x86_64.rpm  
+
  yum install --enablerepo=epel nut-cgi-2.6.5-2.el6.x86_64.rpm  
    
Edit file /etc/ups/hosts.conf and add.
 
Edit file /etc/ups/hosts.conf and add.
Line 418: Line 417:  
  MONITOR UPS@localhost "local UPS"
 
  MONITOR UPS@localhost "local UPS"
   −
The nut-cgi rpm contains three cgi scripts that can be run via the webserver to monitor the UPS(s). The rpm does not install them correctly for SME however so the following modifications are needed.
+
The nut-cgi rpm contains three cgi scripts. The rpm does not install them correctly for SME however so the following modifications are needed.
   −
  mkdir -p /opt/nutups
+
  mkdir -p /opt/nut-cgi-bin
  chown root:www /opt/nutups
+
  chown root:www /opt/nut-cgi-bin
  mv /var/www/nut-cgi-bin/upsstats.cgi /opt/nutups
+
  mv /var/www/nut-cgi-bin/upsstats.cgi /opt/nut-cgi-bin
  mv /var/www/nut-cgi-bin/upsset.cgi /opt/nutups
+
  mv /var/www/nut-cgi-bin/upsset.cgi /opt/nut-cgi-bin
  mv /var/www/nut-cgi-bin/upsimage.cgi /opt/nutups
+
  mv /var/www/nut-cgi-bin/upsimage.cgi /opt/nut-cgi-bin
  chown root:www /opt/nutups/*
+
  chown root:www /opt/nut-cgi-bin/*
  chmod 750 /opt/nutups/*
+
  chmod 750 /opt/nut-cgi-bin/*
 
  mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
 
  mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
 
  cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
 
  cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
   −
Now edit and create a new file 92nutupsdmon with the following content
+
Now edit and create a new file 92nutupscmon with the following content
    
  {
 
  {
Line 482: Line 481:  
       {
 
       {
 
         if ((exists $nut{'URL'}) && ($nut{'URL'} ne '')) {
 
         if ((exists $nut{'URL'}) && ($nut{'URL'} ne '')) {
           $OUT .= "Alias  /$nutups{'URL'}  /opt/nutups\n";  
+
           $OUT .= "Alias  /$nut-cgi-bin{'URL'}  /opt/nut-cgi-bin\n";  
 
         }   
 
         }   
 
       }
 
       }
       $OUT .= "Alias  /nut  /opt/nutups\n";
+
       $OUT .= "Alias  /nut  /opt/nutcgi-bin\n";
 
       $OUT .= "\n";
 
       $OUT .= "\n";
 
       $OUT .= "<Directory /opt/nutups>\n";
 
       $OUT .= "<Directory /opt/nutups>\n";
Line 520: Line 519:  
Now go to http://yourdomain.tld/nut to see the statistics and information for the UPS at localhost.
 
Now go to http://yourdomain.tld/nut to see the statistics and information for the UPS at localhost.
   −
By editing /etc/ups/hosts.conf and adding additional network UPS details, nut-cgi can be used to monitor more than one UPS. By default only the localhost is monitored.
+
By editing /etc/ups/hosts.conf and adding additional network UPS details, nut-cgi can be used to monitor more than one UPS. By the modification above, only the localhost is monitored.
    
=Aditional Information=
 
=Aditional Information=
66

edits

Navigation menu