STEP 1.

php-weathermap을 설치하기 위해서 우선 다운을 받는다.

[root@cacti download]# pwd
/download
[root@cacti download]# wget http://www.network-weathermap.com/files/php-weathermap-0.95b.zip
--14:24:50--  http://www.network-weathermap.com/files/php-weathermap-0.95b.zip
Resolving www.network-weathermap.com... 212.21.100.67
Connecting to
www.network-weathermap.com|212.21.100.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2788907 (2.7M) [application/zip]
Saving to: `php-weathermap-0.95b.zip'

100%[=========================================================================================================================================>] 2,788,907    114K/s   in 25s   

14:25:16 (108 KB/s) - `php-weathermap-0.95b.zip' saved [2788907/2788907]

[root@cacti download]#



다운받은 php-weathermap의 압축을 풀어주고, weathermap 디렉토리를 Cacti의 플러그인 디렉토리로 이동한다.

[root@cacti download]# unzip php-weathermap-0.95b.zip
Archive:  php-weathermap-0.95b.zip
  inflating: weathermap/CHANGES     
  inflating: weathermap/COPYING     
  inflating: weathermap/HTML_ImageMap.class.php 
  inflating: weathermap/README      
  inflating: weathermap/WeatherMap.functions.php 
  inflating: weathermap/WeatherMapLink.class.php 
  inflating: weathermap/WeatherMapNode.class.php 
  inflating: weathermap/Weathermap.class.php 
  inflating: weathermap/cacti-pick.php 
  inflating: weathermap/check-gdbug.php 
  inflating: weathermap/check.php   
   creating: weathermap/configs/
  inflating: weathermap/configs/simple.conf 
  inflating: weathermap/configs/index.php 
  inflating: weathermap/configs/.htaccess 
   creating: weathermap/docs/
   creating: weathermap/docs/example/
  inflating: weathermap/docs/example/Gradient_BK_800.png 
  inflating: weathermap/docs/example/Vera.ttf 
  inflating: weathermap/docs/example/VeraBI.ttf 
  inflating: weathermap/docs/example/VeraBd.ttf 
  inflating: weathermap/docs/example/VeraIt.ttf 
  inflating: weathermap/docs/example/VeraMoBI.ttf 
  inflating: weathermap/docs/example/VeraMoBd.ttf 
  inflating: weathermap/docs/example/VeraMoIt.ttf 
  inflating: weathermap/docs/example/VeraMono.ttf 
  inflating: weathermap/docs/example/VeraSe.ttf 
  inflating: weathermap/docs/example/VeraSeBd.ttf 
  inflating: weathermap/docs/example/background.png 
  inflating: weathermap/docs/example/example.conf 
  inflating: weathermap/docs/example/example.html 
  inflating: weathermap/docs/example/example.png 
  inflating: weathermap/docs/example/graph_image.png 
  inflating: weathermap/docs/example/graph_page.html 
 extracting: weathermap/docs/example/my_router.png 
  inflating: weathermap/docs/example/overlib.js 
  inflating: weathermap/docs/howto.pdf 
  inflating: weathermap/docs/howto.png 
   creating: weathermap/docs/images/
  inflating: weathermap/docs/images/cacti_mainscreen.png 
  inflating: weathermap/docs/images/cacti_maps_manage.png 
  inflating: weathermap/docs/images/cacti_step1.png 
 extracting: weathermap/docs/images/cacti_step2.png 
  inflating: weathermap/docs/images/cacti_user_manage.png 
  inflating: weathermap/docs/images/cacti_wmap_settings.png 
 extracting: weathermap/docs/images/font-sizes.png 
  inflating: weathermap/docs/images/howto-thumb.jpg 
  inflating: weathermap/docs/images/keystyle-classic.png 
 extracting: weathermap/docs/images/keystyle-horizontal.png 
  inflating: weathermap/docs/images/keystyle-vertical.png 
  inflating: weathermap/docs/images/weathermap-example.png 
  inflating: weathermap/docs/images/weathermap-mini.png 
  inflating: weathermap/docs/index.html 
   creating: weathermap/docs/pages/
  inflating: weathermap/docs/pages/advanced.html 
  inflating: weathermap/docs/pages/cacti-plugin.html 
  inflating: weathermap/docs/pages/changes.html 
  inflating: weathermap/docs/pages/cli-reference.html 
  inflating: weathermap/docs/pages/config-reference.html 
  inflating: weathermap/docs/pages/editor.html 
  inflating: weathermap/docs/pages/errorcodes.html 
  inflating: weathermap/docs/pages/faq.html 
  inflating: weathermap/docs/pages/install-cacti-editor.html 
  inflating: weathermap/docs/pages/install-cacti.html 
  inflating: weathermap/docs/pages/install-cli-editor.html 
  inflating: weathermap/docs/pages/install-cli.html 
  inflating: weathermap/docs/pages/main.html 
  inflating: weathermap/docs/pages/targets.html 
  inflating: weathermap/docs/pages/upgrading.html 
  inflating: weathermap/docs/pages/weathermap.css 
  inflating: weathermap/editor-config.php-dist 
   creating: weathermap/editor-resources/
  inflating: weathermap/editor-resources/jquery-latest.pack.js 
  inflating: weathermap/editor.css  
  inflating: weathermap/editor.inc.php 
  inflating: weathermap/editor.js   
  inflating: weathermap/editor.php  
   creating: weathermap/images/
 extracting: weathermap/images/Cloud-Filled.png 
 extracting: weathermap/images/Cloud-line.png 
 extracting: weathermap/images/Firewall.png 
 extracting: weathermap/images/HPMini.png 
 extracting: weathermap/images/Host.png 
 extracting: weathermap/images/PAD.png 
 extracting: weathermap/images/Router.png 
 extracting: weathermap/images/WorkgroupSwitch.png 
  inflating: weathermap/images/background1_950x625_197.jpg 
  inflating: weathermap/images/blueboard1024.png 
 extracting: weathermap/images/btn_recalc.png 
  inflating: weathermap/images/bw_gradient_1024.png 
 extracting: weathermap/images/filecabinet.png 
  inflating: weathermap/images/hollow32.png 
 extracting: weathermap/images/tab_weathermap_red.png 
 extracting: weathermap/images/tab_weathermap.png 
  inflating: weathermap/images/uk1024.png 
 extracting: weathermap/images/updown_0.png 
 extracting: weathermap/images/updown_1.png 
 extracting: weathermap/images/updown_2.png 
 extracting: weathermap/images/application.png 
 extracting: weathermap/images/page_white.png 
 extracting: weathermap/images/flag_blue.png 
 extracting: weathermap/images/wrench.png 
 extracting: weathermap/images/flag_purple.png 
 extracting: weathermap/images/application_side_list.png 
 extracting: weathermap/images/application_xp_terminal.png 
 extracting: weathermap/images/emoticon_unhappy.png 
 extracting: weathermap/images/world.png 
 extracting: weathermap/images/error.png 
 extracting: weathermap/images/flag_pink.png 
 extracting: weathermap/images/tick.png 
 extracting: weathermap/images/exclamation.png 
 extracting: weathermap/images/world_link.png 
 extracting: weathermap/images/emoticon_smile.png 
 extracting: weathermap/images/monitor.png 
 extracting: weathermap/images/flag_green.png 
 extracting: weathermap/images/comment.png 
 extracting: weathermap/images/flag_yellow.png 
 extracting: weathermap/images/cross.png 
 extracting: weathermap/images/flag_orange.png 
 extracting: weathermap/images/wrench_orange.png 
  inflating: weathermap/images/index.php 
  inflating: weathermap/images/blue-ball-64.png 
  inflating: weathermap/images/green-ball-64.png 
  inflating: weathermap/images/grey-ball-64.png 
  inflating: weathermap/images/red-ball-64.png 
  inflating: weathermap/images/yellow-ball-64.png 
  inflating: weathermap/index.php   
   creating: weathermap/lib/
   creating: weathermap/lib/datasources/
  inflating: weathermap/lib/datasources/README.txt 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_cactihost.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_cactithold.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_dbsample.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_external.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_mrtg.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_rrd.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_static.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_tabfile.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_snmp.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_fping.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_skeleton.php.txt 
  inflating: weathermap/lib/poller-common.php 
   creating: weathermap/lib/post/
  inflating: weathermap/lib/post/WeatherMapPostProcessorTest.php 
   creating: weathermap/lib/pre/
  inflating: weathermap/lib/pre/WeatherMapPreProcessorTest.php 
  inflating: weathermap/lib/index.php 
  inflating: weathermap/lib/.htaccess 
  inflating: weathermap/logout.php  
  inflating: weathermap/net-data.txt 
   creating: weathermap/output/
 extracting: weathermap/output/dummy-file.delete-me 
  inflating: weathermap/output/index.php 
  inflating: weathermap/output/.htaccess 
  inflating: weathermap/overlib.js  
   creating: weathermap/random-bits/
  inflating: weathermap/random-bits/README 
  inflating: weathermap/random-bits/auto-overlib.pl 
  inflating: weathermap/random-bits/map-split.php 
  inflating: weathermap/random-bits/suite-1.conf 
  inflating: weathermap/random-bits/suite-2.conf 
  inflating: weathermap/random-bits/suite-1.png 
  inflating: weathermap/random-bits/suite-2.png 
  inflating: weathermap/setup.php   
  inflating: weathermap/weathermap  
  inflating: weathermap/weathermap-cacti-plugin-mgmt.php 
  inflating: weathermap/weathermap-cacti-plugin.php 
  inflating: weathermap/weathermap-cacti-rebuild.php 
 extracting: weathermap/weathermap-logo.png 
  inflating: weathermap/weathermap.conf 

[root@cacti download]#

[root@cacti download]# mv weathermap/ /download/cacti-0.8.7e/plugins
[root@cacti download]# cd /download/cacti-0.8.7e/plugins
[root@cacti plugins]# ls -al
total 16
drwxr-xr-x  3 root root  4096 Aug 21 14:38 .
drwxr-xr-x 14 1000 users 4096 Aug 21 13:34 ..
-rw-r--r--  1 root root    44 Aug 21 13:34 index.php
drwxr-xr-x  9 root root  4096 Aug 21 14:30 weathermap

[root@cacti plugins]#




이로써 php-weathermap은 Cacti에 플러그인으로써 추가 되었다.

그러나 global.php를 수정하여 플러그인 배열을 추가하여야 한다.



[root@cacti plugins]# vi /download/cacti-0.8.7e/include/global.php
.... 생략 ....
/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";

$plugins = array();
//$plugins[] = 'thold';

/* Do not edit this line */
$config = array();
.... 생략 ....


위와 같이 나오는데 $plugins = array(); 배열설정 되어 있는 부분 밑에 사용할 플러그인을 추가한다.



.... 생략 ....
/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";

$plugins = array();
$plugins[] = 'weathermap';
//$plugins[] = 'thold';

/* Do not edit this line */
$config = array();
.... 생략 ....


위와 같이 $plugins[] = 'weathermap'; 을 추가하고 변경 된 내용을 저장한다.





STEP 2.

웹 브라우저에서 위와 같이 Cacti에 접속을 한다.




위 그림과 같이 User Management를 클릭한다.




그 다음 위 그림과 마찬가지로 admin 계정을 클릭한다.




위 그림과 같이 Plugin에 Weathermap이 추가 된 것을 볼 수 있다.

이 두개를 모두 체크하고 [SAVE] 버튼을 눌러준다.




위 그림과 같이 Weathermap 탭이 추가 되었으며, 좌측 메뉴 역시 Weathermap 메뉴가 추가 된 것을 확인 할 수 있다.

이와 같은 방법으로 Cacti Users 사이트에 올라와 있는 플러그인을 추가 할 수 있다.

이제 본인에게 필요한 플러그인을 설치 해 보도록 하자.




※ Weathermap의 경우에는 웹이나 기타 일정 주기단위로 데이터를 저장하기 때문에 쓰기 권한이 있어야 한다.

필자의 경우에는 이것을 확인하기 귀찮아서 통채로 모든 권한을 다 줘버렸다.

[root@cacti plugins]# cd weathermap
[root@cacti weathermap]# chmod 777 -R *
[root@cacti weathermap]# ls -al
total 560
drwxrwxrwx 9 root root  4096 Aug 21 15:02 .
drwxr-xr-x 3 root root  4096 Aug 21 14:38 ..
-rwxrwxrwx 1 root root 14316 Mar 18  2008 cacti-pick.php
-rwxrwxrwx 1 root root 22741 Mar 18  2008 CHANGES
-rwxrwxrwx 1 root root  1113 Mar 18  2008 check-gdbug.php
-rwxrwxrwx 1 root root 12968 Mar 18  2008 check.php
drwxrwxrwx 2 root root  4096 Mar 18  2008 configs
-rwxrwxrwx 1 root root 18011 Mar 18  2008 COPYING
drwxrwxrwx 5 root root  4096 Mar 18  2008 docs
-rwxrwxrwx 1 root root  1095 Mar 18  2008 editor-config.php-dist
-rwxrwxrwx 1 root root  4922 Mar 18  2008 editor.css
-rwxrwxrwx 1 root root 10206 Mar 18  2008 editor.inc.php
-rwxrwxrwx 1 root root 25239 Mar 18  2008 editor.js
-rwxrwxrwx 1 root root 37258 Mar 18  2008 editor.php
drwxrwxrwx 2 root root  4096 Mar 18  2008 editor-resources
-rwxrwxrwx 1 root root  9809 Mar 18  2008 HTML_ImageMap.class.php
drwxrwxrwx 2 root root  4096 Mar 18  2008 images
-rwxrwxrwx 1 root root    62 Mar 18  2008 index.php
drwxrwxrwx 5 root root  4096 Mar 18  2008 lib
-rwxrwxrwx 1 root root    65 Mar 18  2008 logout.php
-rwxrwxrwx 1 root root    38 Mar 18  2008 net-data.txt
drwxrwxrwx 2 root root  4096 Mar 18  2008 output
-rwxrwxrwx 1 root root 50734 Mar 18  2008 overlib.js
drwxrwxrwx 2 root root  4096 Mar 18  2008 random-bits
-rwxrwxrwx 1 root root  1077 Mar 18  2008 README
-rwxrwxrwx 1 root root 23017 Mar 18  2008 setup.php
-rwxrwxrwx 1 root root  7627 Mar 18  2008 weathermap
-rwxrwxrwx 1 root root 17485 Mar 18  2008 weathermap-cacti-plugin-mgmt.php
-rwxrwxrwx 1 root root 19394 Mar 18  2008 weathermap-cacti-plugin.php
-rwxrwxrwx 1 root root   935 Mar 18  2008 weathermap-cacti-rebuild.php
-rwxrwxrwx 1 root root 89274 Mar 18  2008 Weathermap.class.php
-rwxrwxrwx 1 root root   370 Mar 18  2008 weathermap.conf
-rwxrwxrwx 1 root root 28834 Mar 18  2008 WeatherMap.functions.php
-rwxrwxrwx 1 root root 24531 Mar 18  2008 WeatherMapLink.class.php
-rwxrwxrwx 1 root root  4459 Mar 18  2008 weathermap-logo.png
-rwxrwxrwx 1 root root 32397 Mar 18  2008 WeatherMapNode.class.php

[root@cacti weathermap]#
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,