Страница 1 из 1

Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-18 9:47:46
noute
вообщем пытаюсь поставить Cacti после распаковки из tar.gz и перемешения в директорию /var/www/html/cacti я не вижу страницу.
Как лечтить ?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-18 11:02:22
noute
Отключил selinux появилась ошибка

Код: Выделить всё

FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-21 8:43:06
Graf
а мускул поднят и настроен?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-21 9:02:17
Graf
взято с http://docs.cacti.net/manual:088:1_inst ... s.1_ubuntu
Now the cream - cacti installation.
First we need to download the cacti package as stated above. Save e.g. on your Desktop. Then open up a terminal and navigate to your desktop, the commands are (assuming your user login is tulip)

Код: Выделить всё

cd /home/deadwait/Desktop
Remember linux is case-sensitive so desktop wont work it will be Desktop, once we are in Desktop type in the foll commands

Код: Выделить всё

sudo tar -xvzf cacti-0.8.6j.tar.gzsudo mv cacti-0.8.6j cacti
Now that the directory is renamed lets move it in our lampp directory so that we can access it via our webserver, to do so run the foll command

Код: Выделить всё

sudo mv cacti /opt/lampp/htdocs
Now our cacti directory is copied on to lampp's webroot directory, remember we had created a database in mysql named cacti, now we need to populate tis database, which you should not worry about if you dont understand, just follow the foll steps
open up firefox and again go to phpmyadmin
on the left pane select the database which we have created, in our case its cacti.
then on the right pane select import -> then click on browse -> navigate to the directory /opt/lampp/htdocs/cacti in which you have to select the file cacti.sql and then click on go.
Again in a terminal type in

Код: Выделить всё

cd /opt/lampp/htdocs/cacti/include
sudo nano config.php
. nano is an editor which will open up the file config.php, in the beginning you will see these options

Код: Выделить всё

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
You need to change the username and password so that it looks like this

Код: Выделить всё

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "root";
$database_password = "";
$database_port = "3306";
Then press ctrl-x and come out.
Now open up firefox visit cacti
you will be greeted with a screen which will be the beginning of the installation , just click on next
on the next screen you will asked if its a new install, which of course it is, confirm whether the database user and the database name mentioned are correct, click on next
when we click it shows us the base paths of all needed files we will notice that the path for php is marked in red because the path is wrong the path shown in the installer is

Код: Выделить всё

/usr/bin/php
we have to change that to

Код: Выделить всё

/opt/lampp/bin/php
and then click finish.
Cacti is now installed.
даже, если не установлен Xampp, просто нужно правильно настроить мускул.

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-22 10:51:20
_Andy
Я гляжу Вы и от nagiosql отказались.
Прекратите издеваться над системой и читателями данного раздела!
Все, что Вам нужно для мониторинга есть в репозиториях:

Код: Выделить всё

[root@alo-srv1 ~]# yum repolist
Loaded plugins: fastestmirror, priorities, remove-with-leaves, show-leaves
Loading mirror speeds from cached hostfile
 * base: mirror.majorhost.net
 * extras: mirror.majorhost.net
 * jpackage: mirrors.dotsrc.org
 * openvz-kernel-rhel6: mirror.ihc.ru
 * openvz-utils: mirror.ihc.ru
 * updates: centos-mirror.rbc.ru
252 packages excluded due to repository priority protections
repo id                                                     repo name                                                                              status
base                                                        CentOS-6 - Base                                                                          6,134+212
epel                                                        Extra Packages for Enterprise Linux 6 - x86_64                                            8,280+32
extras                                                      CentOS-6 - Extras                                                                               17
jpackage                                                    JPackage 6 generic                                                                     4,106+1,210
openvz-kernel-rhel6                                         OpenVZ RHEL6-based kernel                                                                     11+1
openvz-utils                                                OpenVZ utilities                                                                                20
updates                                                     CentOS-6 - Updates                                                                         1,068+8
repolist: 19,636
[root@alo-srv1 ~]# yum search nagios cacti zabbix
Loaded plugins: fastestmirror, priorities, remove-with-leaves, show-leaves
Loading mirror speeds from cached hostfile
 * base: mirror.majorhost.net
 * extras: mirror.majorhost.net
 * jpackage: mirrors.dotsrc.org
 * openvz-kernel-rhel6: mirror.ihc.ru
 * openvz-utils: mirror.ihc.ru
 * updates: centos-mirror.rbc.ru
252 packages excluded due to repository priority protections
==================================================================== N/S Matched: nagios =====================================================================
nagios.x86_64 : Nagios monitors hosts and services and yells if somethings breaks
nagios-common.x86_64 : Provides common directories, uid and gid among nagios-related packages
nagios-devel.i686 : Provides include files that Nagios-related applications may compile against
nagios-devel.x86_64 : Provides include files that Nagios-related applications may compile against
nagios-lcgdm.x86_64 : Configuration files for a (DPM/LFC) site monitored using LCGDM nagios probes
nagios-plugins.x86_64 : Host/service/network monitoring program plugins for Nagios
nagios-plugins-all.x86_64 : Nagios Plugins - All plugins
nagios-plugins-apt.x86_64 : Nagios Plugin - check_apt
nagios-plugins-bdii.x86_64 : Nagios Plugin - check_bdii_entries
nagios-plugins-breeze.x86_64 : Nagios Plugin - check_breeze
nagios-plugins-by_ssh.x86_64 : Nagios Plugin - check_by_ssh
nagios-plugins-check-updates.x86_64 : A Nagios plugin to check if Red Hat or Fedora system is up-to-date
nagios-plugins-check_sip.x86_64 : A Nagios plugin to check SIP servers and devices
nagios-plugins-cluster.x86_64 : Nagios Plugin - check_cluster
nagios-plugins-dhcp.x86_64 : Nagios Plugin - check_dhcp
nagios-plugins-dig.x86_64 : Nagios Plugin - check_dig
nagios-plugins-disk.x86_64 : Nagios Plugin - check_disk
nagios-plugins-disk_smb.x86_64 : Nagios Plugin - check_disk_smb
nagios-plugins-dns.x86_64 : Nagios Plugin - check_dns
nagios-plugins-dpm-disk.x86_64 : Nagios probes to be run in the DPM disk nodes
nagios-plugins-dpm-head.x86_64 : Nagios probes to be run in the DPM head node
nagios-plugins-dummy.x86_64 : Nagios Plugin - check_dummy
nagios-plugins-file_age.x86_64 : Nagios Plugin - check_file_age
nagios-plugins-flexlm.x86_64 : Nagios Plugin - check_flexlm
nagios-plugins-fping.x86_64 : Nagios Plugin - check_fping
nagios-plugins-game.x86_64 : Nagios Plugin - check_game
nagios-plugins-hpjd.x86_64 : Nagios Plugin - check_hpjd
nagios-plugins-http.x86_64 : Nagios Plugin - check_http
nagios-plugins-icmp.x86_64 : Nagios Plugin - check_icmp
nagios-plugins-ide_smart.x86_64 : Nagios Plugin - check_ide_smart
nagios-plugins-ifoperstatus.x86_64 : Nagios Plugin - check_ifoperstatus
nagios-plugins-ifstatus.x86_64 : Nagios Plugin - check_ifstatus
nagios-plugins-ircd.x86_64 : Nagios Plugin - check_ircd
nagios-plugins-lcgdm.x86_64 : Nagios probes to be run remotely against DPM / LFC nodes
nagios-plugins-lcgdm-common.x86_64 : Common libraries and files to all LCGDM nagios packages
nagios-plugins-ldap.x86_64 : Nagios Plugin - check_ldap
nagios-plugins-lfc.x86_64 : Nagios probes to be run in the LFC node
nagios-plugins-linux_raid.x86_64 : Nagios Plugin - check_linux_raid
nagios-plugins-load.x86_64 : Nagios Plugin - check_load
nagios-plugins-log.x86_64 : Nagios Plugin - check_log
nagios-plugins-mailq.x86_64 : Nagios Plugin - check_mailq
nagios-plugins-mrtg.x86_64 : Nagios Plugin - check_mrtg
nagios-plugins-mrtgtraf.x86_64 : Nagios Plugin - check_mrtgtraf
nagios-plugins-mysql.x86_64 : Nagios Plugin - check_mysql
nagios-plugins-nagios.x86_64 : Nagios Plugin - check_nagios
nagios-plugins-nrpe.x86_64 : Provides nrpe plugin for Nagios
nagios-plugins-nt.x86_64 : Nagios Plugin - check_nt
nagios-plugins-ntp.x86_64 : Nagios Plugin - check_ntp
nagios-plugins-ntp-perl.x86_64 : Nagios Plugin - check_ntp.pl
nagios-plugins-nwstat.x86_64 : Nagios Plugin - check_nwstat
nagios-plugins-openmanage.x86_64 : Nagios plugin to monitor hardware health on Dell servers
nagios-plugins-oracle.x86_64 : Nagios Plugin - check_oracle
nagios-plugins-overcr.x86_64 : Nagios Plugin - check_overcr
nagios-plugins-perl.x86_64 : Nagios plugins perl dep.
nagios-plugins-pgsql.x86_64 : Nagios Plugin - check_pgsql
nagios-plugins-ping.x86_64 : Nagios Plugin - check_ping
nagios-plugins-procs.x86_64 : Nagios Plugin - check_procs
nagios-plugins-radius.x86_64 : Nagios Plugin - check_radius
nagios-plugins-real.x86_64 : Nagios Plugin - check_real
nagios-plugins-rhev.noarch : Nagios Plugin - check_rhev
nagios-plugins-rpc.x86_64 : Nagios Plugin - check_rpc
nagios-plugins-sensors.x86_64 : Nagios Plugin - check_sensors
nagios-plugins-smtp.x86_64 : Nagios Plugin - check_smtp
nagios-plugins-snmp.x86_64 : Nagios Plugin - check_snmp
nagios-plugins-ssh.x86_64 : Nagios Plugin - check_ssh
nagios-plugins-swap.x86_64 : Nagios Plugin - check_swap
nagios-plugins-tcp.x86_64 : Nagios Plugin - check_tcp
nagios-plugins-time.x86_64 : Nagios Plugin - check_time
nagios-plugins-ups.x86_64 : Nagios Plugin - check_ups
nagios-plugins-users.x86_64 : Nagios Plugin - check_users
nagios-plugins-wave.x86_64 : Nagios Plugin - check_wave
perl-Nagios-NSCA.noarch : Nagios::NSCA Perl module
perl-Nagios-Plugin.noarch : Family of perl modules to streamline writing Nagios plugins
perl-Nagios-Plugin-WWW-Mechanize.noarch : Login to a web page as a user and get data as a Nagios plugin
pnp4nagios.x86_64 : Nagios performance data analysis tool
ndoutils.x86_64 : Stores all configuration and event data from Nagios in a database
nrpe.x86_64 : Host/service/network monitoring agent for Nagios
nsca.x86_64 : Nagios Service Check Acceptor
pynag.noarch : Python modules and utilities for Nagios plugins and configuration
pynag-examples.noarch : Example scripts which manipulate Nagios configuration

===================================================================== N/S Matched: cacti =====================================================================
cacti.noarch : An rrd based graphing tool

==================================================================== N/S Matched: zabbix =====================================================================
zabbix-agent.x86_64 : Zabbix Agent
zabbix-proxy.x86_64 : Zabbix Proxy
zabbix-proxy-mysql.x86_64 : Zabbix proxy compiled to use MySQL
zabbix-proxy-pgsql.x86_64 : Zabbix proxy compiled to use PostgreSQL
zabbix-proxy-sqlite3.x86_64 : Zabbix proxy compiled to use SQLite
zabbix-server.x86_64 : Zabbix server common files
zabbix-server-mysql.x86_64 : Zabbix server compiled to use MySQL
zabbix-server-pgsql.x86_64 : Zabbix server compiled to use PostgresSQL
zabbix-server-sqlite3.x86_64 : Zabbix server compiled to use SQLite
zabbix-web.noarch : Zabbix Web Frontend
zabbix-web-mysql.noarch : Zabbix web frontend for MySQL
zabbix-web-pgsql.noarch : Zabbix web frontend for PostgreSQL
zabbix-web-sqlite3.noarch : Zabbix web frontend for SQLite
zabbix20-agent.x86_64 : Zabbix Agent
zabbix20-proxy.x86_64 : Zabbix Proxy
zabbix20-proxy-mysql.x86_64 : Zabbix proxy compiled to use MySQL
zabbix20-proxy-pgsql.x86_64 : Zabbix proxy compiled to use PostgreSQL
zabbix20-proxy-sqlite3.x86_64 : Zabbix proxy compiled to use SQLite
zabbix20-server.x86_64 : Zabbix server common files
zabbix20-server-mysql.x86_64 : Zabbix server compiled to use MySQL
zabbix20-server-pgsql.x86_64 : Zabbix server compiled to use PostgresSQL
zabbix20-web.noarch : Zabbix Web Frontend
zabbix20-web-mysql.noarch : Zabbix web frontend for MySQL
zabbix20-web-pgsql.noarch : Zabbix web frontend for PostgreSQL
zabbix.x86_64 : Open-source monitoring solution for your IT infrastructure
zabbix20.x86_64 : Open-source monitoring solution for your IT infrastructure

  Name and summary matches mostly, use "search all" for everything.
[root@alo-srv1 ~]#

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-22 19:34:51
noute
Graf писал(а):а мускул поднят и настроен?
Проблема решилась в два этапа.
1-ая это все проблема из-за Selinux

Код: Выделить всё

/etc/selinux/config
нужно значение disabled т.е. нужно выключить
2-ая я честно не помню где находится файл настройки но там я просто не правильно указал параметры авторизаций.
_Andy писал(а):Я гляжу Вы и от nagiosql отказались.
Прекратите издеваться над системой и читателями данного раздела!
Все, что Вам нужно для мониторинга есть в репозиториях:

Name and summary matches mostly, use "search all" for everything.
[root@alo-srv1 ~]#
[/code]
От nagiosql нет я не отказался. Задача в том что бы совместить nagios и аналог mrtg ну или найти webconfig для mrtg
Cacti нет в репозитарий. И я не издеваюсь просто вся проблема в том что я начинающий линуксойд.

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-22 19:38:48
noute
Кстати cacti не рисует графики в чем может быть проблема ?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-23 12:16:27
_Andy
noute писал(а): От nagiosql нет я не отказался. Задача в том что бы совместить nagios и аналог mrtg ну или найти webconfig для mrtg
Так, давайте начнем с описания Вашей задачи. Может Вы пытаетесь изобрести велосипед, а тем временем,
в Zabbix все есть уже.
noute писал(а): Cacti нет в репозитарий.
В официальном нет, конечно. EPEL подключите.

Код: Выделить всё

[avedischev@alo-srv1 ~]$ yum -C info cacti
Loaded plugins: fastestmirror, priorities, remove-with-leaves, show-leaves
252 packages excluded due to repository priority protections
Available Packages
Name        : cacti
Arch        : noarch
Version     : 0.8.8a
Release     : 2.el6
Size        : 2.0 M
Repo        : epel
Summary     : An rrd based graphing tool
URL         : http://www.cacti.net/
License     : GPLv2+ and LGPLv2 and (MPLv1.1 or GPLv2 or LGPLv2) and (LGPLv2 or BSD)
Description : Cacti is a complete frontend to RRDTool. It stores all of the
            : necessary information to create graphs and populate them with
            : data in a MySQL database. The frontend is completely PHP
            : driven. Along with being able to maintain graphs, data
            : sources, and round robin archives in a database, Cacti also
            : handles the data gathering. There is SNMP support for those
            : used to creating traffic graphs with MRTG.

[avedischev@alo-srv1 ~]$ 
noute писал(а): И я не издеваюсь просто вся проблема в том что я начинающий линуксойд.
Проблема не в том, что Вы начинающий (это решается как раз таки), а в том, что Вы
делаете шаги не задумываясь о последствиях. Ответьте пожалуйста на вопрос,
как Вы будете поддерживать систему, в которой софт установлен не из репозитория?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-23 12:18:32
_Andy
noute писал(а):Кстати cacti не рисует графики в чем может быть проблема ?
rrd файлы создаются?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-25 9:25:54
noute
_Andy писал(а):
noute писал(а):Кстати cacti не рисует графики в чем может быть проблема ?
rrd файлы создаются?
Вроде нет

у меня вот такая проблема
Изображение
а логи cacti.log не создаются.

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-25 11:30:08
_Andy
noute писал(а):Вроде нет
Что значит вроде? Где какти хранит rrd файлы?

Код: Выделить всё

ls -lahi /путь/к/ррд
Вывод сюда.
noute писал(а): у меня вот такая проблема
Изображение
а логи cacti.log не создаются.
Вы из репозитория, надеюсь установили какти?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-25 12:53:41
noute
Если я правильно понял то rrd файлы лежат в /var/www/html/cacti/rra

ls -lahi /var/www/html/cacti/rra
total 12K
1969340 drwxr-xr-x. 2 1000 users 4.0K Apr 4 2012 .
1968871 drwxr-xr-x. 13 1000 users 4.0K Apr 23 2012 ..
1969341 -rw-r--r--. 1 1000 users 33 Apr 4 2012 .htaccess


иными словами кроме .htaccess ничего не лежит.

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-25 13:00:46
noute
Кстати мой crontab -l
*/5 * * * * /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-26 12:29:14
_Andy
noute писал(а):Если я правильно понял то rrd файлы лежат в /var/www/html/cacti/rra

ls -lahi /var/www/html/cacti/rra
total 12K
1969340 drwxr-xr-x. 2 1000 users 4.0K Apr 4 2012 .
1968871 drwxr-xr-x. 13 1000 users 4.0K Apr 23 2012 ..
1969341 -rw-r--r--. 1 1000 users 33 Apr 4 2012 .htaccess


иными словами кроме .htaccess ничего не лежит.
А что это за пользователь такой могучий - 1000?
p.S: Кактус из репозитория?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-27 12:59:32
noute
_Andy писал(а):
noute писал(а):Если я правильно понял то rrd файлы лежат в /var/www/html/cacti/rra

ls -lahi /var/www/html/cacti/rra
total 12K
1969340 drwxr-xr-x. 2 1000 users 4.0K Apr 4 2012 .
1968871 drwxr-xr-x. 13 1000 users 4.0K Apr 23 2012 ..
1969341 -rw-r--r--. 1 1000 users 33 Apr 4 2012 .htaccess


иными словами кроме .htaccess ничего не лежит.
А что это за пользователь такой могучий - 1000?
p.S: Кактус из репозитория?
Нет в RHEL Cacti нет в репозитарий. Я его скачал с сайта cacti.net

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-27 13:12:28
Andy
noute писал(а):
_Andy писал(а):
noute писал(а):Если я правильно понял то rrd файлы лежат в /var/www/html/cacti/rra

ls -lahi /var/www/html/cacti/rra
total 12K
1969340 drwxr-xr-x. 2 1000 users 4.0K Apr 4 2012 .
1968871 drwxr-xr-x. 13 1000 users 4.0K Apr 23 2012 ..
1969341 -rw-r--r--. 1 1000 users 33 Apr 4 2012 .htaccess


иными словами кроме .htaccess ничего не лежит.
А что это за пользователь такой могучий - 1000?
p.S: Кактус из репозитория?
Нет в RHEL Cacti нет в репозитарий. Я его скачал с сайта cacti.net
Ознакомьтесь, пожалуйста, с постом. Удалите то, что
влепили в систему из исходников, поставьте из репозитория. Потом продолжим.

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-30 10:01:33
noute
Вообщем трабла такая же что из репозитария что из сырцов. по моему проблема в том что cacti не создает файлы rrd в /var/www/html/cacti/rra . и ошибки примерно такие

Код: Выделить всё

ERROR: opening '/var/www/html/cacti/rra/Host_ping_17.rrd': No such file or directory

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-30 10:45:23
Andy
noute писал(а):Вообщем трабла такая же что из репозитария что из сырцов. по моему проблема в том что cacti не создает файлы rrd в /var/www/html/cacti/rra . и ошибки примерно такие

Код: Выделить всё

ERROR: opening '/var/www/html/cacti/rra/Host_ping_17.rrd': No such file or directory
Права на директорию какие?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-31 7:17:50
noute
В последний рас дал всем 777

Код: Выделить всё

1982473 drwxr-xr-x  2 cacti users 4.0K Apr  4  2012 .
1982195 drwxr-xr-x 13 root  users 4.0K Jan 30 10:30 ..
1982474 -rw-r--r--  1 cacti users   33 Apr  4  2012 .htaccess
А вообще из-за чего такое может быть ? Я уже задолбался. Пожалуйста подскажите в какую сторону копать ?

Re: Cacti из tar.gz после распаковки не дает Html страницу

Добавлено: 2013-01-31 18:07:34
Andy
noute писал(а):В последний рас дал всем 777
А вообще из-за чего такое может быть ? Я уже задолбался. Пожалуйста подскажите в какую сторону копать ?
Крутовато. Вообще, кто-то их должен создавать для начала, то есть
собиралка snmp должна работать с какой-либо частотой. Вы документацию хорошо прочитали?