Страница 1 из 2
FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-27 16:54:29
varlis
Всех приветствую. Уважаемые гуру, помогите пожалуйста доустановить cacti. Уже что-то голову сломал.
Есть freeBSD 8.2+APAche 1.3. +MySQL
mysql вроде работает:
Код: Выделить всё
[root@cacti ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. ....
Your MySQL connection id is 11
Server version: 5.1.55 FreeBSD port: mysql-server-5.1.55
.......
mysql>
Что делать дальше? Как это все связать в один узелок? Cacti установил из portov.
Не совсем понимаю как теперь связать его с Mysql -помогите прошу очень.
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-27 17:30:05
xelak
Когда ставишь cacti из портов он выдает в конце сообщение. что необходимо сделать по пунктам. Сделай:
Код: Выделить всё
cd /usr/ports/net-mgmt/cacti && make deinstall && make reinstall
После пересборки и установки выдаст мессагу.
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-27 20:56:16
varlis
xelak писал(а):Когда ставишь cacti из портов он выдает в конце сообщение. что необходимо сделать по пунктам. Сделай:
Код: Выделить всё
cd /usr/ports/net-mgmt/cacti && make deinstall && make reinstall
После пересборки и установки выдаст мессагу.
да первый раз делал -не выдало почему то мессагу.
попробую.
я видел еще пишут, что нужно скрит sql запустить, который есть в cacti но у меня не получается.((
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-28 6:27:56
lap
не получается что? и что оно при этом говорит?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 8:25:01
varlis
lap писал(а):не получается что? и что оно при этом говорит?
переинсталлировал -
вот что выдает:
при попытке выполнить пункт 1 ругается
Код: Выделить всё
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database:
# mysqladmin --user=root create cacti
2. Create a mysql user/password for cacti:
(change user and/or password if required)
# echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;" | mysql
3. Import the default cacti database:
# mysql cacti < /usr/local/share/cacti/cacti.sql
4. Edit /usr/local/share/cacti/include/config.php.
5. Add the line to cron jobs with the command:
# crontab -u cacti -e
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
6. Add alias in apache config for the cacti dir:
Alias /cacti "/usr/local/share/cacti/"
7. Be sure apache gives an access to the directory ('Allow from' keywords).
8. Open a cacti login page in your web browser and login with admin/admin.
If you update cacti, open a login page, an updating process
will start automatically.
=======================================================================
===> Registering installation for cacti-0.8.7g
[root@cacti /usr/ports/net-mgmt/cacti]# mysqladmin --user=root creat cacti
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@cacti /usr/ports/net-mgmt/cacti]#
Если заходить с помощью команды:
то пускает
Подскажите плиз что делать дальще? Что-то у меня уже голова кругом- доступ надо дать root -у куда-то чтоли? ведь доступ должен быть?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 9:25:23
xelak
mysqladmin -u root -p create cacti
"create" пишется с буквой "e"
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 9:50:10
varlis
xelak писал(а):mysqladmin -u root -p create cacti
"create" пишется с буквой "e"
да, базу создал еще накануне -пишет "error cacti alreadi exists"
пункт 2 :
Код: Выделить всё
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost Identified BY 'cactiuser'; FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Затык с пунктом 3
:3. Import the default cacti database:# mysql cacti < /usr/local/share/cacti/cacti.sql
Код: Выделить всё
mysql> cacti < /usr/local/share/cacti/cacti.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cacti < /usr/local/share/cacti/cacti.sql' at line 1
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 9:53:59
xelak
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 11:15:41
varlis
Сделал так:
Код: Выделить всё
[root@cacti ~]# mysql -u root -p -h localhost cacti </usr/local/share/cacti/cacti.sql;
Enter password:
[root@cacti ~]#
[root@cacti ~]# mysql cacti -u root -p
Enter password:
.............................
.............................
mysql> show tables;
mysql> show tables;
+---------------------------+
| Tables_in_cacti |
+---------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
.......
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+---------------------------+
[code]48 rows in set (0.01 sec)
а вот что делать дальше?
4. Edit /usr/local/share/cacti/include/config.php.
5. Add the line to cron jobs with the command:# crontab -u cacti -e*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
6. Add alias in apache config for the cacti dir:
Alias /cacti «/usr/local/share/cacti/»
7. Be sure apache gives an access to the directory (‘Allow from’ keywords).
8. Open a cacti login page in your web browser and login with admin/admin.[/code]
Пункт 6 и далее понятен
а вот пункт 4-5 не совсем.
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 12:03:18
xelak
че тут не понятного???
/usr/local/share/cacti/include/config.php вбиваете настройки для подключения к базе.
редактируете /etc/crontab и добавляете
Код: Выделить всё
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 15:18:04
varlis
Все прописал. Но опять что-то не так.
Теперь если захожу на
http://IP/cacti/
то выдает вот это:
Код: Выделить всё
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 154
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 154
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 155
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 155
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 156
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 156
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 157
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 157
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Omsk' for 'OMSST/7.0/DST' instead in /usr/local/share/cacti/include/global_constants.php on line 158
Что делать?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-29 17:00:13
xelak
В google. Есть ответы.
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-30 8:36:09
varlis
xelak писал(а):В google. Есть ответы.
в гугле пишут правьте php.ini. я не могу у себя его найти. только примеры. Мне сделать самому php.ini из примера?
( php.ini-development или php.ini-production которые лежат в /usr/local/etc)
и потом к примеру
http://ip/manuals/ или /icons/ открываются, пересобрать cacti я так понимаю не поможет?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-30 9:01:27
lap
закинь в документрут файлик test.php примерно такого содержания:
и откройте эту страничку в браузере. там будет информация откуда он дергает настройки.
чтото похожее на :
Loaded Configuration File /usr/local/etc/php.ini
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-30 10:34:47
varlis
lap писал(а):закинь в документрут файлик test.php примерно такого содержания:
и откройте эту страничку в браузере. там будет информация откуда он дергает настройки.
чтото похожее на :
Loaded Configuration File /usr/local/etc/php.ini
сделал закинул -вот что у меня:
Код: Выделить всё
...Loaded Configuration File (none)
Scan this dir for additional .ini files /usr/local/etc/php
Additional .ini files parsed /usr/local/etc/php/extensions.ini
....этот файл /usr/local/etc/php/extensions.ini править или новый ini создать лучше?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-06-30 11:15:19
varlis
Благодарю за помошь!!!
внес строку date.timezone = Europe/Moscow в extensions.ini и долгожданное окошко в web появилось!
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 8:34:07
varlis
Подскажите пжлаааста! Появился новый небольшой вопрос-
cacti я настроил, связь по snmp с циской получил. циску соответственно тоже настроил.
в CACTI если нажать devices и выбрать мое устройство то верху появляется
Код: Выделить всё
SNMP INFORMATION
System:Cisco IOS Software, 2800 ........
Uptime..........
HostName......
Ping results success
Так что связь с устройством есть. (До этого там было SNMP error.)
создал 1 график для нее из "Creare Graphs for this HOST"
Далее выбираю Graph list и у меня нет графика а есть ошибка
Код: Выделить всё
RRDTool Command:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='cisco2800 - CPU Usage' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='percent' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/local/share/cacti/rra/cisco2800_5min_cpu_16.rrd":5min_cpu:AVERAGE \
AREA:a#FF0000FF:"CPU Usage" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" RRDTool Says:
ERROR: opening '/usr/local/share/cacti/rra/cisco2800_5min_cpu_16.rrd': No such file or directory
И вот вопрос- мне эту директорию самому создавать -или я права где-то кому-то не дал?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 10:09:15
varlis
права cacti cacti на /cacti/rra есть
локалхост -та же ошибка. в чем может быть дело?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 10:17:40
lap
права на запись сейчас нужы для вебсервера, который небось работает от имени апача или когонибудь из их семейства.
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 10:27:18
varlis
Извиняюсь за свое толстолобство.
переназначил еще раз права папке cacti в ветке '/usr/local/share/cacti chown -R cacti cacti
заработало.
Но вот теперь вопрос возник - для того чтобы статистику загруженности на интерфейсах Циски смотреть - я так понял нужно подгружать доп. шаблоны?
Там из предложенных есть только CISCO cpu usage а остальные для linux и прочих хостов
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 10:45:55
varlis
Блин Рано радовался я. Хотя и циско и локалхост показывают состояние UP Но уже полчаса графики пустые. Хотя и есть. RDDtool -OK
Опять что-то не так?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 10:48:30
lap
В разделе - "Associated Data Queries" есть "SNMP - Interface Statistics" и потом вверху странички "*Create Graphs for this Host"
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 11:55:34
varlis
lap писал(а):права на запись сейчас нужы для вебсервера, который небось работает от имени апача или когонибудь из их семейства.
у меня cacti www на все папки в .../cacti... и все равно не рисует.
rrd файлы есть.
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 13:07:31
lap
а сами ррд обновляются? крон кошерно работает?
Re: FreeBSD 8.2 прошу помощи доустановить cacti
Добавлено: 2011-07-01 14:05:34
varlis
lap писал(а):а сами ррд обновляются? крон кошерно работает?
а rrd в папке rra насколько часто должны обновляться? похоже что они не обновляются у меня.
а крон вроде работает. а как проверить? ps axw | grep crone выдает что есть там процесс а ля 00 S+