티스토리 뷰
Cacti Plugins 중 Weathermap을 설치하려 한다.
Cacti는 v0.8.8a 버전을 사용하였으면 플러그인 설치를 위해 이전 버전과 달리 별도의 페이지를 제공한다.
WeatherMap 사이트(http://www.network-weathermap.com/download) 에서 파일을 다운로드한다.
cacit/plugins 밑에 다운로드한 파일의 압축을 푼다.
Cacti Console에서 Configuration > Plugin Management에서 보면 방금 압축을 푼 weathermap이 설치 대기 인 것을 확인 할 수 있다.
파란색 버튼을 클릭하면 설치된다.
설치 디렉터리 소유권 및 퍼미션을 설정한다.
# chown -R cacti.cacti cacti/plugins/weathermap
# cd cacti/plugins/weathermap
# chmod -R 777 configs
웹에서 Editor를 실행하기 위해 아파치 실행 유저로 소유권 설정
# chown daemon configs
Weathermap 웹에디터를 설정한다.
파일일 없기에 기존에 있는 샘플 config를 복사한다.
# cp editor-config.php-dist editor-config.php
# vi editor-config.php
// CHANGE: Uncomment one of the lines below and change it to point to the base directory
// of your cacti install to enable cacti support in the editor
// $cacti_base = 'C:/httpd-.2_x64/htdocs/cacti';
// $cacti_base = "/var/www/html/cacti";
$cacti_base = "/usr/local/cacti";
// CHANGE: this to be the URL of the base of your Cacti install
// it MUST end with a / character!
// $cacti_url = "http://support.company.net/cacti/";
$cacti_url = "http://192.168.0.1/cacti/";
// where to look for config files. The directory must be readable
// AND writable by whatever user your webserver runs as.
// this name is correct if you are using the Cacti plugin
// NOTE: You MIGHT need to use the full path to the configs folder here,
// (it seems to depend on the PHP or OS version)
// $mapdir= $cacti_base.'/plugins/weathermap/configs';
// $mapdir='configs';
$mapdir= $cacti_base.'/plugins/weathermap/configs';
# vi weathermap/editor.php
~
// $ENABLED=false;
$ENABLED=true;
~
// sensible defaults
//$mapdir='configs';
$mapdir='/usr/local/cacti/plugins/weathermap/configs';
//$cacti_base = '../../';
$cacti_base = '/usr/local/cacti';
$cacti_url = 'http://192.168.0.1/cacti/';
$ignore_cacti=FALSE;
$configerror = '';
# vi weathermap
// **************************************************************************************
// THIS IS THE ONE LINE IN HERE YOU MIGHT HAVE TO CHANGE!
// $rrdtool="/usr/bin/rrdtool";
$rrdtool="/usr/local/rrdtool/bin/rrdtool";
// (on Windows, use / instead of \ in pathnames - c:/rrdtool/bin/rrdtool.exe for example)
// **************************************************************************************
# crontab -e 추가
~
*/5 * * * * /usr/local/bin/php /usr/local/cacti/plugins/weathermap/weathermap-cacti-rebuild.php
설치완료 후 설정은 Console > Setting > Misc에서 할 수 있으며, Management 밑에 Weathermap 이 추가되어 있음을 확인할 수 있다.
설치 후 Cacti Log에서 아래와 같은 오류 메세지가 나온다면 weathermap/setup.php 파일을 참조해서 mysql 테이블을 추가해 준다.
CREATE TABLE IF NOT EXISTS weathermap_data (id int(11) NOT NULL auto_increment,
rrdfile varchar(255) NOT NULL,data_source_name varchar(19) NOT NULL,
last_time int(11) NOT NULL,last_value varchar(255) NOT NULL,
last_calc varchar(255) NOT NULL, sequence int(11) NOT NULL, local_data_id int(11) NOT NULL DEFAULT 0, PRIMARY KEY (id), KEY rrdfile (rrdfile),
KEY local_data_id (local_data_id), KEY data_source_name (data_source_name) ) ENGINE=MyISAM;
CREATE TABLE weathermap_settings (
id int(11) NOT NULL auto_increment,
mapid int(11) NOT NULL default '0',
groupid int(11) NOT NULL default '0',
optname varchar(128) NOT NULL default '',
optvalue varchar(128) NOT NULL default '',
PRIMARY KEY (id)
) ENGINE=MyISAM;
CREATE TABLE weathermap_groups (
`id` INT(11) NOT NULL auto_increment,
`name` VARCHAR( 128 ) NOT NULL default '',
`sortorder` INT(11) NOT NULL default 0,
PRIMARY KEY (id)
) ENGINE=MyISAM;
INSERT INTO weathermap_groups (id,name,sortorder) VALUES (1,'Weathermaps',1);
CREATE TABLE weathermap_auth (
userid mediumint(9) NOT NULL default '0',
mapid int(11) NOT NULL default '0'
) ENGINE=MyISAM;
CREATE TABLE weathermap_maps (
id int(11) NOT NULL auto_increment,
sortorder int(11) NOT NULL default 0,
group_id int(11) NOT NULL default 1,
active set('on','off') NOT NULL default 'on',
configfile text NOT NULL,
imagefile text NOT NULL,
htmlfile text NOT NULL,
titlecache text NOT NULL,
filehash varchar (40) NOT NULL default '',
warncount int(11) NOT NULL default 0,
config text NOT NULL default '',
thumb_width int(11) NOT NULL default 0,
thumb_height int(11) NOT NULL default 0,
schedule varchar(32) NOT NULL default '*',
archiving set('on','off') NOT NULL default 'off',
PRIMARY KEY (id)
) ENGINE=MyISAM;
'Study > System' 카테고리의 다른 글
apache cannot load libphp5.so 에러 발생 시 (0) | 2012.07.27 |
---|---|
Cacti 그래프 시간 변경 (0) | 2012.07.24 |
Cacti Plugins - Realtime (0) | 2012.07.23 |
Cacti Customizing (0) | 2012.07.19 |
Cacti 그래프 타이틀 한글 깨짐 현상 (0) | 2012.07.19 |
- Total
- Today
- Yesterday
- metasploitable3
- editcap
- history timestamp
- NX ASLR
- text2pcap
- ${1##*.}
- megacli
- docker_dvwa
- 도커
- mergecap
- ssl decrypt
- cisco ssh
- recovery file on linux
- bash parameter
- bash modification
- 리눅스 버전
- dvwa_bruteforce
- webhack
- 윈도우 패스워드 복구
- capinfos
- oracle 11gr2
- tshark
- dvwa
- excel_aton
- dvwa_command
- tcpdstat
- pcapng
- docker
- filesystem check
- MySQL csv
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |