[root@server bin]# ./apachectl start
httpd: Syntax error on line 99 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

위와 같은 에러를 띄우며 php가 꼬여서 안 될 때





* 해결책 
# restorecon -R -v /usr/local/apache2/modules

[root@server bin]# /sbin/restorecon -R -v /usr/local/apache/modules
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_dbm.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_ident.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_expires.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_filter.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_actions.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_default.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_speling.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_ext_filter.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dbd.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_rewrite.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dumpio.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_default.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_env.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dir.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_userdir.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_autoindex.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_user.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_dbd.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_vhost_alias.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_anon.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_logio.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_groupfile.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_file.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_headers.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_asis.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_deflate.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_cgi.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/GD.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_include.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dav_fs.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_dbm.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_setenvif.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_imagemap.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_host.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_log_config.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dav.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_auth_basic.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_mime.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_info.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_negotiation.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/libphp5.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_status.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_auth_digest.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_alias.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_owner.so context root:object_r:usr_t->system_u:object_r:shlib_t
[root@server bin]#

위와 같은 메시지가 띄면 해결 완료.





* 안될경우 
# cd /usr/local/apache2/modules
# restorecon -v libphp5.so
# chcon -t texrel_shlib_t libphp5.so


'Cacti > APM(Apache+PHP+MySQL)' 카테고리의 다른 글

MySQL 설치 시 에러 메시지를 띄우며 설치가 안 될 경우.  (0) 2009.06.04
PHP 설치  (0) 2009.02.13
Apache 설치  (0) 2009.02.13
MySQL 설치  (0) 2009.02.13
APM(Apache+PHP+MySQL) 설치 전에... 2번째...  (0) 2009.02.13
블로그 이미지

쭈꾸댕이

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

,





Cacti를 사용하면서 최근에 알게 된 기능이었다.

사실 설치 후 별다른 업데이트가 없었는데 누구나 사용하다보면 알 수 있는 정보일 것이다.

Cacti에서 graphs를 보면 필자가 설치한 서버는 임시로 운용되다가

장비와 연결을 해제하여 트래픽이 흐르지 않았다.



사용자 삽입 이미지

위와 같이 해당 장비의 graph에서 붉은색 박스로 체크 된 돋보기를 눌러준다.




사용자 삽입 이미지

이후에 위와 같은 그림으로 변경되며 마우스로 그래프에 대고 내가 필요한 곳만큼만

마우스 좌측버튼을 누른채 끈다. (즉, 드래그 하란 말이다.)





사용자 삽입 이미지

위와 같은 그림에서 붉은색 박스로 체크 된 것처럼 아래를 향하는 화살표를 눌러주게되면

엑셀에서 읽을 수 있는 csv 파일로 저장이 되며, 필자의 경우 poller를 5분마다 돌며주며

그 때마다 input과 output의 데이터를 확인 할 수 있었다.

운용하는 망에 따라 다르겠지만, 상당히 유용하게 사용 할 수 있을것으로 보인다.
블로그 이미지

쭈꾸댕이

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

,





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]#
블로그 이미지

쭈꾸댕이

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

,







Cacti를 설치 한 후에 웹브라우저로 Cacti가 구동중인 서버에 접속 한 첫 화면이다.



STEP 1.

New Install을 하기로 한다. 필자의 경우 Cacti를 설치 했던 서버에 다시 설치하는 것이라 업그레이드를 해도 되지만,

새 마음으로  새롭게 설치 해 보려고 새로 인스톨 하였다.


New Install 상태에서 [NEXT]를 클릭한다.




전에 Cacti를 설치 했던 서버에 다시 설치하는 것 이기 때문에 Log 파일 경로를 제외하고 모든 경로가 완벽하다.

Cacti-0.8.7c의 경우와 다르게 RRDtool과 PHP 경로를 변경하지 않아도 되었다.




STEP 2.

user name과 password를 입력하여 Cacti를 실행하면 된다.


처음 설치할 경우 필자가 쓴 Cacti-0.8.7c 처럼 계정에 admin, 패스워드에 admin을 입력하고 다시 패스워드를 변경하는 과정을 묻게된다.

그러나 위에 언급했듯이 내 경우에는 설치 했던 서버에 다시 설치하였기 때문에 패스워드가 admin / admin 이 아니었다.





위와 같이 기본적인 세팅이 끝났고, 메인 페이지가 떴다.









STEP 3.

Cacti Plugin Architecture(PA)를 다운 받는다.

http://cactiusers.org/index.php 여기에 가서 직접 받으면 된다. 필자의 경우 이 사이트가 수시로 업데이트 되기 때문에

블로그에 파일을 올려 두었다.



Plugin을 설치하면 Cacti에 추가 기능을 사용할 수 있었고, 필자의 경우도 테스트를 많이 해 보지 않아

아직 이것에 대해서 자세히 모르겠다. 설치하고 되는것 확인 하는 정도의 수준이라고 보면 되겠다.




[root@cacti download]# pwd
/download
[root@cacti download]# wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.5.zip
--11:30:40--  http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.5.zip
Resolving mirror.cactiusers.org... 209.189.228.150
Connecting to mirror.cactiusers.org|209.189.228.150|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 208458 (204K) [application/zip]
Saving to: `cacti-plugin-0.8.7e-PA-v2.5.zip'

100%[=========================================================================================================================================>] 208,458      161K/s   in 1.3s  

11:30:42 (161 KB/s) - `cacti-plugin-0.8.7e-PA-v2.5.zip' saved [208458/208458]

[root@cacti download]#



패치 할 Cacti가 있는 디렉토리에 ZIP 파일을 옮겨준다.

[root@cacti download]# mv ./cacti-plugin-0.8.7e-PA-v2.5.zip /download/cacti-0.8.7e
[root@cacti download]# cd cacti-0.8.7e
[root@cacti cacti-0.8.7e]# ll
total 1240
-rw-r--r-- 1 1000 users   6199 Jun 29 01:07 about.php
-rw-r--r-- 1 1000 users   4889 Jun 29 01:07 auth_changepassword.php
-rw-r--r-- 1 1000 users  11818 Jun 29 01:07 auth_login.php

-rw-r--r-- 1 root root  208458 Jul 11 06:59 cacti-plugin-0.8.7e-PA-v2.5.zip
-rw-r--r-- 1 1000 users 176144 Jun 29 01:07 cacti.sql
-rw-r--r-- 1 1000 users  21070 Jun 29 01:07 cdef.php
drwxr-xr-x 2 1000 users   4096 Jun 29 01:07 cli
-rw-r--r-- 1 1000 users  18329 Jun 29 01:07 cmd.php
-rw-r--r-- 1 1000 users   6809 Jun 29 01:07 color.php
-rw-r--r-- 1 1000 users  24595 Jun 29 01:07 data_input.php
-rw-r--r-- 1 1000 users  35028 Jun 29 01:07 data_queries.php
-rw-r--r-- 1 1000 users  55797 Jun 29 01:07 data_sources.php
-rw-r--r-- 1 1000 users  32287 Jun 29 01:07 data_templates.php
drwxr-xr-x 5 1000 users   4096 Jun 29 01:07 docs
-rw-r--r-- 1 1000 users   5962 Jun 29 01:07 gprint_presets.php
-rw-r--r-- 1 1000 users   3449 Jun 29 01:07 graph_image.php
-rw-r--r-- 1 1000 users  11592 Jun 29 01:07 graph.php
-rw-r--r-- 1 1000 users   7957 Jun 29 01:07 graph_settings.php
-rw-r--r-- 1 1000 users  17383 Jun 29 01:07 graphs_items.php
-rw-r--r-- 1 1000 users  37412 Jun 29 01:07 graphs_new.php
-rw-r--r-- 1 1000 users  57326 Jun 29 01:07 graphs.php
-rw-r--r-- 1 1000 users   9949 Jun 29 01:07 graph_templates_inputs.php
-rw-r--r-- 1 1000 users  18482 Jun 29 01:07 graph_templates_items.php
-rw-r--r-- 1 1000 users  26024 Jun 29 01:07 graph_templates.php
-rw-r--r-- 1 1000 users  41326 Jun 29 01:07 graph_view.php
-rw-r--r-- 1 1000 users   5839 Jun 29 01:07 graph_xport.php
-rw-r--r-- 1 1000 users  55379 Jun 29 01:07 host.php
-rw-r--r-- 1 1000 users  19364 Jun 29 01:07 host_templates.php
drwxr-xr-x 2 1000 users   4096 Feb 12  2009 images
drwxr-xr-x 4 1000 users   4096 Aug 20 17:35 include
-rw-r--r-- 1 1000 users   2242 Jun 29 01:07 index.php
drwxr-xr-x 2 1000 users   4096 Jun 29 01:07 install
drwxr-xr-x 3 1000 users   4096 Jun 29 01:07 lib
-rw-r--r-- 1 1000 users  15141 Oct 31  2007 LICENSE
drwxrwxrwx 2 1000 users   4096 Jun 29 01:07 log
-rw-r--r-- 1 1000 users   2451 Jun 29 01:07 logout.php
-rw-r--r-- 1 1000 users   4306 Jun 29 01:07 poller_commands.php
-rw-r--r-- 1 1000 users   2243 Jun 29 01:07 poller_export.php
-rw-r--r-- 1 1000 users  16325 Jun 29 01:07 poller.php
-rw-r--r-- 1 1000 users     48 Sep  2  2008 README
drwxr-xr-x 5 1000 users   4096 Oct 31  2007 resource
drwxrwxrwx 2 1000 users   4096 Feb 11  2009 rra
-rw-r--r-- 1 1000 users   7088 Jun 29 01:07 rra.php
drwxr-xr-x 2 1000 users   4096 Jun 29 01:07 scripts
-rw-r--r-- 1 1000 users   7304 Jun 29 01:07 script_server.php
-rw-r--r-- 1 1000 users    353 Oct 31  2007 script_server.pl
-rw-r--r-- 1 1000 users   4996 Jun 29 01:07 settings.php
-rw-r--r-- 1 1000 users   5862 Jun 29 01:07 templates_export.php
-rw-r--r-- 1 1000 users   6543 Jun 29 01:07 templates_import.php
-rw-r--r-- 1 1000 users  18792 Jun 29 01:07 tree.php
-rw-r--r-- 1 1000 users  43388 Jun 29 01:07 user_admin.php
-rw-r--r-- 1 1000 users  64286 Jun 29 01:07 utilities.php
[root@cacti cacti-0.8.7e]#



압축을 풀어준다.

[root@cacti cacti-0.8.7e]# unzip cacti-plugin-0.8.7e-PA-v2.5.zip
Archive:  cacti-plugin-0.8.7e-PA-v2.5.zip
  inflating: files-0.8.7e/auth_changepassword.php 
  inflating: files-0.8.7e/auth_login.php 
  inflating: files-0.8.7e/data_sources.php 
  inflating: files-0.8.7e/graph.php 
  inflating: files-0.8.7e/graphs.php 
  inflating: files-0.8.7e/graphs_new.php 
  inflating: files-0.8.7e/graph_image.php 
  inflating: files-0.8.7e/host.php  
   creating: files-0.8.7e/include/
  inflating: files-0.8.7e/include/auth.php 
  inflating: files-0.8.7e/include/bottom_footer.php 
  inflating: files-0.8.7e/include/global.php 
  inflating: files-0.8.7e/include/global_arrays.php 
  inflating: files-0.8.7e/include/global_constants.php 
  inflating: files-0.8.7e/include/global_form.php 
  inflating: files-0.8.7e/include/global_settings.php 
  inflating: files-0.8.7e/include/plugins.php 
  inflating: files-0.8.7e/include/top_graph_header.php 
  inflating: files-0.8.7e/include/top_header.php 
  inflating: files-0.8.7e/index.php 
   creating: files-0.8.7e/lib/
  inflating: files-0.8.7e/lib/api_device.php 
  inflating: files-0.8.7e/lib/auth.php 
  inflating: files-0.8.7e/lib/functions.php 
  inflating: files-0.8.7e/lib/html.php 
  inflating: files-0.8.7e/lib/html_form.php 
  inflating: files-0.8.7e/lib/plugins.php 
  inflating: files-0.8.7e/lib/poller.php 
  inflating: files-0.8.7e/lib/rrd.php 
  inflating: files-0.8.7e/lib/variables.php 
   creating: files-0.8.7e/plugins/
  inflating: files-0.8.7e/plugins/index.php 
  inflating: files-0.8.7e/plugins.php 
  inflating: files-0.8.7e/poller.php 
  inflating: files-0.8.7e/user_admin.php 
  inflating: files-0.8.7e/utilities.php 
  inflating: cacti-plugin-0.8.7e-PA-v2.5.diff 
replace LICENSE? [y]es, [n]o, [A]ll, [N]one, [r]ename: n
  inflating: pa.sql                 
  inflating: Readme.txt  
           
[root@cacti cacti-0.8.7e]#

압축을 푸는 중간에 같은 이름의 파일명이 있었으나 LICENSE 관련 파일이라 풀지 않고 진행하겠다.




STEP 4.

Plugin Architecture(PA)을 패치 한다.

[root@cacti cacti-0.8.7e]# patch -p1 -N --dry-run < cacti-plugin-0.8.7e-PA-v2.5.diff
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
patching file user_admin.php
patching file utilities.php

[root@cacti cacti-0.8.7e]#



[root@cacti cacti-0.8.7e]# patch -p1 -N < cacti-plugin-0.8.7e-PA-v2.5.diff
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
patching file user_admin.php
patching file utilities.php
[root@cacti cacti-0.8.7e]#



[root@cacti cacti-0.8.7e]# mysql -u root -p cacti < pa.sql
Enter password:
[root@cacti cacti-0.8.7e]#



Cacti 위치를 다시 지정한다.


경로를 재지정 하지 않으면, 위 그림처럼 경로가 엉켜서 글씨가 깨지고 이미지가 나오지 않고 에러 메시지만 잔뜩 보게 된다.

이제 아래처럼 경로를 지정하면 그림도 제대로 나오게 되며, 경로가 올바르게 나오게 될것입니다.


[root@cacti cacti-0.8.7e]# vi ./include/global.php
.... 생략 ....
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at
http://serverip/cacti/ this
   would be set to /cacti/
*/

$config['url_path'] = '/';

define('URL_PATH', $config['url_path']);

/* Include configuration */
include(dirname(__FILE__) . "/config.php");

if (isset($config["cacti_version"])) {
        die("Invalid include/config.php file detected.");
        exit;
}
.... 생략 ....


위와 같이 파일이 열릴 것이다. 이 때 56번째 줄에 있는 $config['url_path'] = '/'; 를
$config['url_path'] = '/cacti/'; 로 변경한다.


... 생략 ...
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at
http://serverip/cacti/ this
   would be set to /cacti/
*/

$config['url_path'] = '/cacti/';

define('URL_PATH', $config['url_path']);

/* Include configuration */
include(dirname(__FILE__) . "/config.php");

if (isset($config["cacti_version"])) {
        die("Invalid include/config.php file detected.");
        exit;
}
... 생략 ...


그리고 변경 된 내용을 저장하고 나온다.




위와 같이 변경 된 것을 확인 할 수 있다.




STEP 5.

Plugin Arcitecture(PA) 설치는 끝났다고 볼 수 있으나 현재 플러그인이 나오는지 확인 할 방법이 없다.

이제 플러그인이 제대로 나오도록 마지막 세팅을 하면 되겠다.


위 그림처럼 User Management를 클릭하면 사용자 계정을 볼 수 있다.




위 그림처럼 화면이 나오면, admin을 클릭한다.




Plugin Management를 체크하고 [SAVE]를 하면 Plugin을 사용 할 수 있는 기반이 이뤄졌다고 볼 수 있다.

위에 언급 했던 http://cactiusers.org/index.php 에 가면 수 많은 플러그인들이 존재하며 Plugin Architecture(PA)를

설치하였기 때문에 수 많은 Plugin을 용도에 맞게 설치 할 수 있다고 생각된다.




Plugin Architecture(PA)가 설치 되었기 때문에 Plugin Management를 클릭하면 위 그림과 같이 설치 된 플러그인을 확인 할 수 있고, Install 및 Uninstall 그리고 Enable 및 Disable 시킬 수 있다.
블로그 이미지

쭈꾸댕이

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

,





cacti-0.8.7c 게시물과 내용은 거의 비슷하다.
몇가지 빠진것 외에 내용은 다른 것 없으니 아무 글이나 보고 설치 하기 바란다.

Cacti를 0.8.7e 버전으로 새로 설치하고, 거기에 Plugin을 설치 할 계획이다.
0.8.7d 버전에서 Plugin을 설치하고 대강 테스트를 해본 결과 Cacti가 상당히 여러가지의
성능을 갖게 되는게 설치만 하면 바로 연동되어 편리함이 많았다.



STEP 1. Cacti를 다시 받는다.

[root@cacti download]# pwd
/download
[root@cacti download]# lfpget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz

다운 받은 Cacti 파일을 압축을 푼다.

[root@cacti download]# tar xvfz cacti-0.8.7e.tar.gz
cacti-0.8.7e/
cacti-0.8.7e/data_input.php
cacti-0.8.7e/graphs_new.php
cacti-0.8.7e/color.php
cacti-0.8.7e/install/
cacti-0.8.7e/install/0_8_7d_to_0_8_7e.php
cacti-0.8.7e/install/0_8_6f_to_0_8_6g.php
cacti-0.8.7e/install/install_finish.gif
cacti-0.8.7e/install/0_8_6g_to_0_8_6h.php
cacti-0.8.7e/install/index.php
cacti-0.8.7e/install/0_8_7b_to_0_8_7c.php
cacti-0.8.7e/install/0_8_7a_to_0_8_7b.php
cacti-0.8.7e/install/0_8_7_to_0_8_7a.php
cacti-0.8.7e/install/0_8_4_to_0_8_5.php
cacti-0.8.7e/install/0_8_3_to_0_8_4.php
cacti-0.8.7e/install/0_8_6c_to_0_8_6d.php
... 생략 ...
cacti-0.8.7e/scripts/ss_host_disk.php
cacti-0.8.7e/scripts/loadavg.pl
cacti-0.8.7e/scripts/ss_sql.php
cacti-0.8.7e/scripts/linux_memory.pl
cacti-0.8.7e/scripts/loadavg_multi.pl
cacti-0.8.7e/scripts/3com_cable_modem.pl
cacti-0.8.7e/scripts/weatherbug.pl
cacti-0.8.7e/scripts/ping.pl
cacti-0.8.7e/scripts/unix_users.pl
cacti-0.8.7e/scripts/query_host_partitions.php
cacti-0.8.7e/scripts/sql.php
cacti-0.8.7e/scripts/unix_tcp_connections.pl
cacti-0.8.7e/scripts/query_unix_partitions.pl
cacti-0.8.7e/user_admin.php
cacti-0.8.7e/graph_templates.php
cacti-0.8.7e/log/
cacti-0.8.7e/log/.htaccess
cacti-0.8.7e/log/.placeholder
cacti-0.8.7e/log/cacti.log
cacti-0.8.7e/settings.php
cacti-0.8.7e/graph_templates_inputs.php
cacti-0.8.7e/host_templates.php

[root@cacti download]#

[root@cacti download]# cd cacti-0.8.7e
[root@cacti cacti-0.8.7e]# ls
about.php                color.php           graph_image.php             graph_templates_items.php  include     poller_commands.php  scripts               user_admin.php
auth_changepassword.php  data_input.php      graph.php                   graph_templates.php        index.php   poller_export.php    script_server.php     utilities.php
auth_login.php           data_queries.php    graph_settings.php          graph_view.php             install     poller.php           script_server.pl
cacti.sql                data_sources.php    graphs_items.php            graph_xport.php            lib         README               settings.php
cdef.php                 data_templates.php  graphs_new.php              host.php                   LICENSE     resource             templates_export.php
cli                      docs                graphs.php                  host_templates.php         log         rra                  templates_import.php
cmd.php                  gprint_presets.php  graph_templates_inputs.php  images                     logout.php  rra.php              tree.php
[root@cacti cacti-0.8.7e]#








STEP 2.

이전 버전과 다르게 0.8.7e 에는 데이터베이스가 있었다.

그래서 Cacti 데이터베이스 접근권한을 설정하는 것부터 시작한다.

[root@cacti cacti-0.8.7e]# mysql mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43679
Server version: 5.0.75-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'kreonet1.618';
Query OK, 0 rows affected (0.03 sec)

mysql>



mysql 권한 설정 후 권한 재설정 사항을 적용하기 위해서 flush privilesges; 명령어를 수행한 것이다.

위의 기본제공되는 cacti.sql 파일을 mysql에 저장하였다. 저장된 mysql 데이터베이스를 아래와 같이 확인 해 본다.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cacti              |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.03 sec)

mysql>


mysql> use cacti
Database changed
mysql> show tables;
+--------------------------------+
| Tables_in_cacti                |
+--------------------------------+
| cdef                           |
| cdef_items                     |
| colors                         |
| data_input                     |
| data_input_data                |
| data_input_fields              |
| data_local                     |
| data_template                  |
| data_template_data             |
| data_template_data_rra         |
| data_template_rrd              |
| graph_local                    |
| graph_template_input           |
| graph_template_input_defs      |
| graph_templates                |
| graph_templates_gprint         |
| graph_templates_graph          |
| graph_templates_item           |
| graph_tree                     |
| graph_tree_items               |
| host                           |
| host_graph                     |
| host_snmp_cache                |
| host_snmp_query                |
| host_template                  |
| host_template_graph            |
| host_template_snmp_query       |
| plugin_config                  |
| plugin_db_changes              |
| plugin_hooks                   |
| plugin_realms                  |
| plugin_thold_contacts          |
| plugin_thold_log               |
| plugin_thold_template_contact  |
| plugin_thold_threshold_contact |
| poller                         |
| poller_command                 |
| poller_item                    |
| poller_output                  |
| poller_reindex                 |
| poller_time                    |
| rra                            |
| rra_cf                         |
| settings                       |
| settings_graphs                |
| settings_tree                  |
| snmp_query                     |
| snmp_query_graph               |
| snmp_query_graph_rrd           |
| snmp_query_graph_rrd_sv        |
| snmp_query_graph_sv            |
| thold_data                     |
| thold_template                 |
| user_auth                      |
| user_auth_perms                |
| user_auth_realm                |
| user_log                       |
| version                        |
| weathermap_auth                |
| weathermap_data                |
| weathermap_maps                |
| weathermap_settings            |
+--------------------------------+
62 rows in set (0.00 sec)

mysql>
mysql> quit
Bye
[root@cacti cacti-0.8.7e]#



STEP 3.

기본 데이터 베이스를 확인한 다음 Cacti의 접속 환경설정 php 파일을 수정한다.

[root@cacti cacti-0.8.7e]# vi include/config.php
<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2009 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDTool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 |
http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";

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

?>

아래와 같이 수정했다.

<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2009 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDTool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 |
http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "여기에 패스워드를 입력";
$database_port = "3306";

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

?>


데이터파일과 로그파일이 저장될 디렉토리의 퍼미션을 변경한다.

[root@cacti cacti-0.8.7e]# chmod 777 rra log
[root@cacti cacti-0.8.7e]#



웹서버 디렉토리 안에 cacti 디렉토리를 심볼릭링크를 건다.

[root@cacti cacti-0.8.7e]# ln -s /download/cacti-0.8.7e /usr/local/server/apache/htdocs/cacti
[root@cacti cacti-0.8.7e]#




STEP 4.

RRDtool을 설치해야 한다. 필자가 써 놓은 RRDtool 설치를 보고 RRDtool을 먼저 설치한다.




STEP 5.

웹브라우저를 이용하여 cacti 링크를 걸어둔 URL로 접속한다.

블로그 이미지

쭈꾸댕이

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

,








계속 업그레이드 되기 때문에 Weathermap을 설치 하기 위해서 백업용으로 올려둠.




블로그 이미지

쭈꾸댕이

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

,





checking whether build environment is sane... configure: error: newly created file is older than distributed files!

설치 중 다음과 같은 에러 메시지가 뜨며 MySQL이 설치가 안 될 경우

MySQL이 개발된 날짜와 현재 시간이 논리적으로 오류가 발생한 경우 이런 에러 메시지를 나타낸다.

이때는 아래와 같은 명령어로 시간을 동기화 하여 에러 메시지를 없앨 수 있다.


/usr/bin/rdate -s time.bora.net



'Cacti > APM(Apache+PHP+MySQL)' 카테고리의 다른 글

Apache에서 php 구동이 안 될 때...  (0) 2009.12.09
PHP 설치  (0) 2009.02.13
Apache 설치  (0) 2009.02.13
MySQL 설치  (0) 2009.02.13
APM(Apache+PHP+MySQL) 설치 전에... 2번째...  (0) 2009.02.13
블로그 이미지

쭈꾸댕이

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

,






Cacti 서버를 설치하고 시범 운영을 하던 필자는 1G나 10G 트래픽을 그래프로 보려 하였으나

MRTG가 설치된 서버와 그래프의 모양은 비슷하나 1G 이상의 데이터가 나오지 않는 어려움을 겪었다.

물론 1G의 경우 필자가 있는 곳에서 운영되는 MRTG는 1G이상의 트래픽이 잘 나온 것에 비해

Cacti 서버는 이 트래픽이 잘 나오지 않아 애를 먹었다.



결국 외국 포럼을 검색한 결과 간단하게 하나의 옵션만 교체해 주면 이 문제를 해결 할 수 있었다.



Management 에서 Data Sources를 선택 한 후에 Output Type ID라는 옵션이 있는 곳에서

In/Out Bits (64-bit Counters)로 변경 한 후에 1G 이상의 트래픽 역시 제대로 볼 수 있었다.



아래 스샷은 이후 1G 트래픽이 흐르는 인터페이스를 보여준 것이다.





필자의 경우 Cacti 서버를 외부에 보여야 하기 때문에 현재 0.9.6j 버전의 Cacti로 설치하였다.


블로그 이미지

쭈꾸댕이

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

,





처음에 외부에서 인증 그래프를 보기 위해서 내심 고민을 하고 있었다.

소스를 처음부터 손대기에는 실력부족과 시간이 너무 많이 걸릴 것 같아서 Cacti 홈페이지를 검색하다가

Cacti-0.8.7 이전 버전은 인증 없이 접근이 가능하지만, Cacti-0.8.7 이상의 버전은 인증 없이 접근이 불가능 하게

패치를 한 문구를 확인 할 수 있었다.




그래서 내가 근무하는 곳에서는 Cacti-0.8.6j로 Cacti만 재설치하여 아래 스샷과 같이 그래프를 볼 수 있었다.



현재 테스트 서버로 웹 방화벽과 snmp 포트를 열어 둔 상태이며, 4대의 장비의 정보를 긁어와서

살아있는 인터페이스 모두를 보이게 설정을 해 놓았다.



외부에서 인증 없이 접근하는 방법으로 고민하지 말고, Cacti-0.8.6 버전을 설치한다.

보안을 생각한다면 Cacti-0.8.7 이후의 버전을 설치하도록 한다.


블로그 이미지

쭈꾸댕이

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

,





Cacti에 Cisco 장비가 아닌 Force10 장비를 추가로 등록하고, 등록 된 장비의 인터페이스의 트래픽을

그래프로 그리는 과정에 대해서 설명을 할 예정이다.

필자도 서버를 막 설치하며, 개인적으로 공부를 하는 중간에 설명하는 것이기 때문에 부족한 부분이 많으리라 생각된다.

하지만 일단 그래프까지 설정을 완료하였으니 그것에 만족하며, 등록하는 방법에 대해 정리해 보도록 하겠다.



STEP 1.

우선 좌측 상단에 Concole 버튼을 누른 후 Devices를 클릭하면 아래와 같은 화면을 볼 수 있다.


여기에서 붉은색 상자로 표시 한 부분의 Add를 클릭한다.

그러면 장비를 추가 할 수 있는 화면으로 바뀌게 된다.


Description에 추가할 장비 이름을 입력한다.

Hostname에 hostname이나 IP 주소를 입력한다. (필자의 경우 IP 주소를 입력 하였다.)

Host Template 의 경우 None이 기본으로 되어 있으며, Cisco Router의 경우 Cisco Router를 체크하면 되며
필자의 경우에는 Force10 장비를 추가하기 때문에 Generic SNMP-enabled Host라고 체크하였다.
(Cisco Router로 체크해도 그래프 생성이 되었으며, Generic SNMP-enabled Host로 체크해도 되었다.)

SNMP Options에서 Version2로 체크 한다.

SNMP Community는 Localhost의 경우 public 이었기 때문에 public으로 적었을 뿐 추가 할 장비의 Community와
동일하게 맞춰준다. (필자의 경우 다르게 입력을 하였다.)




마지막으로 하단에 있는 create 버튼을 클릭하면 생성되게 된다.



위와 같이 장비가 등록 된 것을 확인 할 수 있다.



STEP 2.

좌측 상단에 Create에 보면 New Graphs를 클릭하면 Host를 선택하는 칸이 있다.

여기에서 내가 설정하고 싶은 장비를 선택한다.


장비의 인터페이스가 나오게 된다.

그러면 그래프를 추가 할 인터페이스의 우측 체크 박스를 이용하여 체크를 해 준 후 create를 해 주면 장비에서

내가 필요로 하는 인터페이스가 추가 된다.





체크 박스에서 체크 한 후 create를 눌러 추가 한 경우에는 아래 스샷과 같이 체크박스가 사라진 후

회색으로 글씨가 변경 되는 것을 확인 할 수 있다.





STEP 3.

올바르게 설정을 한 것 같은데 graphs를 보면 엑박을 띄우게 될 것이다.

필자도 이것 때문에 고민을 많이 했었다.

내가 알아낸 방법으로는 Data Sources 부분에 Maximum Value 값이 기본적으로 앞에 = 문자열을 포함하였다.

붉은 상자에 표시 된 부분처럼 = 4294967295 와 같이 된 부분에 =를 제거 하고 4294967295 숫자만 입력하면 되었다.

rrd 파일을 생성하는 과정에서 입력 서식이 틀린것으로 예상된다.

자세한 소스코드까지는 필자도 아직 확인하지 못한 상태이다.





STEP 4.

상단 좌측에 있는 graphs 버튼을 클릭하고 데몬이 5분 간격으로 실행되게 설정 해 두었으므로..

시간을두고 확인하면 조금씩 그래프가 그려지는 것을 확인 할 수 있다.






STEP 5.

장비에서 긁어온 정보 그대로 그래프로 표시해 주기 때문에 그래프 이름이 모두 같은 것을 확인 할 수 있다.

그래서 필자가 설정을 확인해보니 Management에 있는 Graph Management를 선택 한다.


모두 같은 이름으로 되어있고, 그래프를 볼 때 어떤 인터페이스인지 확인은 가능하겠지만 보기 불편하다.

이중에 변경할 인터페이스를 클릭한다.


아래 스샷과 같은 페이지를 띄우며 붉은색 상자로 표시 한 부분에 이름을 수정하면 그래프의 이름이 변경되게 된다.

|host_description| 이라고 된 부분은 장비의 이름을 불러오는 것이므로 필자처럼 넣어도 되고,

|host_description| 부분 없이 관리자가 넣고 싶은 이름을 넣어도 된다.



아래 스샷과 같이 붉은 상자부분의 인터페이스를 표시하는 부분이 변경 된 것을 확인 할 수 있다.

블로그 이미지

쭈꾸댕이

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

,