Difference between revisions of "Cacti"

From HackerNet
Jump to: navigation, search
Tag: visualeditor
Tag: visualeditor
Line 33: Line 33:
  
 
Download and unzip php-weathermap-latest.zip
 
Download and unzip php-weathermap-latest.zip
 +
wget http://network-weathermap.com/files/php-weathermap-0.97c.zip
  
  mv /home/$USER/weathermap/ /usr/share/cacti/site/plugins -R
+
sudo apt-get install unzip
 +
 
 +
unzip php-weathermap-0.97c.zip
 +
 
 +
  mv weathermap/ /usr/share/cacti/site/plugins -R
  
 
Edit /usr/share/cacti/site/include/config.php, add:
 
Edit /usr/share/cacti/site/include/config.php, add:
  
  nano include/config.php
+
  sudo sed -i '63i$plugins = array();' /usr/share/cacti/site/include/config.php
 
+
sudo sed -i '64i$plugins[] = 'weathermap';' /usr/share/cacti/site/include/config.php
  $plugins = array();
 
  $plugins[] = 'weathermap';
 
  
 
   sudo nano /usr/share/cacti/site/plugins/weathermap/editor.php
 
   sudo nano /usr/share/cacti/site/plugins/weathermap/editor.php

Revision as of 20:48, 12 January 2015

Cacti

Installation Ubuntu 14.04

Börja med vår: up and running like pro instant pro guide [länk]

sudo apt-get update && sudo apt-get upgrade && sudo apt-get -y install snmpd snmp mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli php5-snmp php5-gd ntp
sudo apt-get -y install cacti

“libphp-adodb” = “Ok”. “Configuring Cacti” = “Apache2” “Configuring cacti” = dbconfig-common MySQL = lösenordet du skapa tidigare

Logga in på webbgränsnittet http://[serverip]/cacti admin/admin

1 minute polling

OBS "Fix the RRA settings first, because this is the one thing you must get right from the start. Once you start collecting data with bad RRA settings, it is extremely difficult to correct it. And by “extremely difficult”, I mean “just throw it away and start over”."

http://www.tolaris.com/2013/07/09/cacti-and-1-minute-polling/

Tänk på både in och out under stycket: Adjust “Step” and “Heartbeat” on all Data Source templates

VM-snapshots är din vän.

Weathermap

En av de absolut coolaste grejerna med cacti är en plugin som heter weathermap. Den senaste versionen av weathermap är från Apr 10, 2013, var beredd på att nästan hälften av knapparna i det grafiska gränssnittet inte fungerar som det ska.

Exempel

Download and unzip php-weathermap-latest.zip

wget http://network-weathermap.com/files/php-weathermap-0.97c.zip
sudo apt-get install unzip
unzip php-weathermap-0.97c.zip
mv weathermap/ /usr/share/cacti/site/plugins -R

Edit /usr/share/cacti/site/include/config.php, add:

sudo sed -i '63i$plugins = array();' /usr/share/cacti/site/include/config.php
sudo sed -i '64i$plugins[] = 'weathermap';' /usr/share/cacti/site/include/config.php
 sudo nano /usr/share/cacti/site/plugins/weathermap/editor.php
 $ENABLED=true;
sudo chown www-data /usr/share/cacti/site/plugins/weathermap/output
sudo chown www-data /usr/share/cacti/site/plugins/weathermap/configs
sudo touch /usr/share/cacti/site/plugins/weathermap/configs/wmap.conf
sudo chown www-data /usr/share/cacti/site/plugins/weathermap/configs/wmap.conf

Backgrundsblder laddas upp till /usr/share/cacti/site/plugins/weathermap/images/ och kan sedan väljas i editorn.