Don't like ads? PRO users don't see any ads ;-)
Guest

Cacti + WeatherMap

By: aquaballoon on May 24th, 2012  |  syntax: Bash  |  size: 2.52 KB  |  hits: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #http://openmaniak.com/cacti.php
  2. #http://blog.it4me.se/?p=131
  3.  
  4. #http://58.96.99.76/joomla/index.php/tech-a-it-stuff/networking-other/66-cacti-plugin-architecture-install-on-ubuntu
  5.  
  6. #http://www.network-weathermap.com/manual/latest/pages/install-cacti-editor.html
  7.  
  8. sudo -s
  9. mkdir cacti_weathermap
  10. cd cacti_weathermap
  11. apt-get install cacti-spine
  12.  
  13. wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7g-PA-v2.8.tar.gz
  14. tar xvf cacti-plugin-0.8.7g-PA-v2.8.tar.gz
  15.  
  16. wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip
  17. unzip php-weathermap-0.97a.zip
  18.  
  19. cd cacti-plugin-arch/files-0.8.7g
  20.  
  21. sudo cp -R * /usr/share/cacti/site/
  22.  
  23. cd ..
  24.  
  25. mysql cacti < pa.sql -u root -p
  26.  
  27. sudo nano /usr/share/cacti/site/include/global.php
  28. #row 107:
  29. $config["rra_path"] = $config["base_path"]."/rra";
  30. #change it to:
  31. $config["rra_path"] = '/var/lib/cacti/rra';
  32. #row 197
  33. include($config["library_path"]."/adodb/adodb.inc.php");
  34. #change it to:
  35. include("/usr/share/php/adodb/adodb.inc.php");
  36. #row 100
  37. $config['url_path'] = $url_path;
  38. #change to
  39. $config['url_path'] = '/cacti/';
  40. #below row 42 $cacti_session_name = "Cacti"; add
  41. /* Weathermap */
  42. $plugins = array();
  43. $plugins[] = 'monitor';
  44. $plugins[] = 'weathermap';
  45. #save and quit
  46.  
  47. sudo chmod 644 /usr/share/cacti/site/lib/plugins.php
  48. sudo chmod 644 /usr/share/cacti/site/include/plugins.php
  49.  
  50. cd ..
  51.  
  52. mv weathermap/ /usr/share/cacti/site/plugins
  53. chown -R www-data:www-data /usr/share/cacti/site/plugins
  54.  
  55. mv /usr/share/cacti/site/plugins/weathermap/editor-config.php-dist /usr/share/cacti/site/plugins/weathermap/editor-config.php
  56.  
  57. nano /usr/share/cacti/site/plugins/weathermap/editor-config.php
  58. //$cacti_base = 'C:/httpd-.2_x64/htdocs/cacti';
  59. $cacti_base = ‘/usr/share/cacti/site’;
  60.  
  61. //$cacti_url = "http://support.company.net/cacti/";
  62. $cacti_url = "http://localhost/cacti/";
  63.  
  64. chmod u+w /usr/share/cacti/site/plugins/weathermap/configs
  65.  
  66. #Now we need to secure the editor
  67. nano /etc/apache2/conf.d/weathermap
  68. <Directory /usr/share/cacti/site/plugins/weathermap>
  69.         <Files editor.php>
  70.             Order Deny,Allow
  71.             Deny from all
  72.             Allow from 127.0.0.1
  73.         </Files>
  74.     </Directory>
  75.  
  76. /etc/init.d/apache2 restart
  77.  
  78. nano /usr/share/cacti/site/plugins/weathermap/editor.php
  79. #change
  80. $ENABLED=false;
  81. #to
  82. $ENABLED=true;
  83.  
  84. #change
  85. $cacti_base = 'C:/httpd-.2_x64/htdocs/cacti';
  86. #to
  87. $cacti_base = '/usr/share/cacti/site';
  88.  
  89. #change
  90. $cacti_url = "http://support.company.net/cacti/";
  91. #to
  92. $cacti_url = "http://localhost/cacti/";