Re: Cacti.И снова я ...
Добавлено: 23 сен 2014, 17:30
Да, меня порой пугают схемы дробления конфига в некотрых дистрах. Ща скачаю rpm-ки, погляжу насколько извращена фантазия суслопилов. Сдается мне апач о cacti.conf попросту не слыхал.
Форум сообщества системных администраторов и просто людей, которым не безразличен их компьютер.
https://xxxyyyzz.sysadmins.ws/
Код: Выделить всё
AH00558: httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 192.168.100.45. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 24 09:30:38.599247 2014] [ssl:warn] [pid 2832] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Sep 24 09:30:38.600660 2014] [mpm_prefork:notice] [pid 2832] AH00163: Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i configured -- resuming normal operations
[Wed Sep 24 09:30:38.600755 2014] [core:notice] [pid 2832] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D CACTIVHOST -D SYSTEMD -D FOREGROUND'
[Wed Sep 24 09:34:35.878555 2014] [autoindex:error] [pid 3020] [client 127.0.0.1:43741] AH01276: Cannot serve directory /srv/www/htdocs/cacti/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Wed Sep 24 09:35:37.580738 2014] [mpm_prefork:notice] [pid 2832] AH00170: caught SIGWINCH, shutting down gracefully
AH00558: httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 192.168.100.45. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 24 09:35:37.848484 2014] [ssl:warn] [pid 4406] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Sep 24 09:35:37.850960 2014] [mpm_prefork:notice] [pid 4406] AH00163: Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i configured -- resuming normal operations
[Wed Sep 24 09:35:37.851048 2014] [core:notice] [pid 4406] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D CACTIVHOST -D SYSTEMD -D FOREGROUND'
[Wed Sep 24 09:35:47.853801 2014] [autoindex:error] [pid 4427] [client 127.0.0.1:43759] AH01276: Cannot serve directory /srv/www/htdocs/cacti/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Wed Sep 24 09:35:50.257049 2014] [autoindex:error] [pid 4427] [client 127.0.0.1:43759] AH01276: Cannot serve directory /srv/www/htdocs/cacti/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Wed Sep 24 09:47:28.303240 2014] [mpm_prefork:notice] [pid 4406] AH00170: caught SIGWINCH, shutting down gracefully
AH00558: httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 192.168.100.45. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 24 09:47:28.659196 2014] [ssl:warn] [pid 5974] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Sep 24 09:47:28.661662 2014] [mpm_prefork:notice] [pid 5974] AH00163: Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i configured -- resuming normal operations
[Wed Sep 24 09:47:28.661822 2014] [core:notice] [pid 5974] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D CACTIVHOST -D SYSTEMD -D FOREGROUND'
Код: Выделить всё
27.0.0.1 - - [24/Sep/2014:09:31:49 +0600] "GET /favicon.ico HTTP/1.1" 404 1000 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:32:12 +0600] "GET /favicon.ico HTTP/1.1" 404 1000 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:34:35 +0600] "GET /cacti/ HTTP/1.1" 403 1004 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:34:36 +0600] "GET /favicon.ico HTTP/1.1" 404 1000 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
::1 - - [24/Sep/2014:09:35:37 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:35:37 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:35:37 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:35:37 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:35:37 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:35:37 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
127.0.0.1 - - [24/Sep/2014:09:35:47 +0600] "GET /cacti/ HTTP/1.1" 403 1004 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:35:47 +0600] "GET /favicon.ico HTTP/1.1" 404 1000 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:35:50 +0600] "GET /cacti/ HTTP/1.1" 403 1004 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:35:50 +0600] "GET /favicon.ico HTTP/1.1" 404 1000 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
127.0.0.1 - - [24/Sep/2014:09:42:30 +0600] "GET /favicon.ico HTTP/1.1" 404 1000 "-" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"
::1 - - [24/Sep/2014:09:47:28 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:47:28 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:47:28 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:47:28 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:47:28 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
::1 - - [24/Sep/2014:09:47:28 +0600] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i (internal dummy connection)"
Код: Выделить всё
# Example configuration for a cacti repository
#
# As default server
# put the string CACTI in /etc/sysconfig/apache2 APACHE_SERVER_FLAGS
# to enable the URL
# http://localhost/cacti
#
# As vhost
# If you want to use cacti in one vhost add
# Include /etc/apache2/vhosts.d/conf.d/cacti.conf
# to the vhost in the vhost.conf file
# put the string CACTIVHOST in /etc/sysconfig/apache2 APACHE_SERVER_FLAGS
# to enable the URL
# http://vhost/cacti
<IfDefine CACTIVHOST>
Alias /cacti/ /srv/www/htdocs/cacti/
<Directory /cacti/ /srv/www/htdocs/cacti/>
Options None
order deny,allow
deny from all
Require all granted
</Directory>
# For SSL-servers
# Alias /cacti/ /srv/www/nagat/
# <Directory /srv/www/cacti/>
# Options None
# SSLRequireSSL
# order deny,allow
# deny from all
# AuthType Basic
# AuthUserFile /site/cfg/passwd
# AuthGroupFile /site/cfg/group
# AuthName "cacti"
# require group cacti
# Satisfy Any
# </Directory>
</IfDefine>
Код: Выделить всё
AH00558: httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 192.168.100.45. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 24 10:12:44.370190 2014] [ssl:warn] [pid 8973] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Sep 24 10:12:44.382898 2014] [mpm_prefork:notice] [pid 8973] AH00163: Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1i configured -- resuming normal operations
[Wed Sep 24 10:12:44.382976 2014] [core:notice] [pid 8973] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D CACTIVHOST -D SYSTEMD -D FOREGROUND'
[Wed Sep 24 10:13:15.190323 2014] [autoindex:error] [pid 8994] [client 127.0.0.1:44022] AH01276: Cannot serve directory /srv/www/htdocs/cacti/install/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Wed Sep 24 10:16:28.307483 2014] [autoindex:error] [pid 8992] [client ::1:45997] AH01276: Cannot serve directory /srv/www/htdocs/cacti/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
Raven писал(а):в cacti.conf сделай так:
[apache]
<Directory /cacti/ /srv/www/htdocs/cacti/>
DirectoryIndex index.php
Options None
Require all granted
</Directory>
[/apache]
Ожнако же меня другое смущает - в выводе apache2ctl -M не вижу и намека на обработчик php.
Код: Выделить всё
Alias /cacti/ /srv/www/htdocs/cacti
<Directory /cacti/ /srv/www/htdocs/cacti>
DirectoryIndex index.php
Options None
Require all granted
</Directory>
Код: Выделить всё
Cron is configured to run too often! The Poller Interval is '300' seconds, with a minimum Cron period of '300' seconds, but only -6600 seconds have passed since the poller last ran
Код: Выделить всё
09/29/2014 03:25:02 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
09/29/2014 09:25:02 PM - SPINE: Poller[0] DEBUG: SS[0] Script Server Shutdown Started
09/29/2014 09:25:02 PM - SPINE: Poller[0] DEBUG: Thread Cleanup Complete
09/29/2014 09:25:02 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
09/29/2014 09:25:02 PM - SPINE: Poller[0] Host[7] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
09/29/2014 09:25:02 PM - SPINE: Poller[0] Host[7] TH[1] Total Time: 0.18 Seconds
09/29/2014 09:25:02 PM - SPINE: Poller[0] Host[7] TH[1] DS[47] SNMP: v1: 192.168.1.101, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.11, value: 3345119271
09/29/2014 09:25:02 PM - SPINE: Poller[0] Host[7] TH[1] DS[47] SNMP: v1: 192.168.1.101, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.11, value: 577559142
09/29/2014 09:25:02 PM - SPINE: Poller[0] Host[7] TH[1] DS[46] SNMP: v1: 192.168.1.101, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.10, value: 0
09/29/2014 09:25:02 PM - SPINE: Poller[0] Host[7] TH[1] DS[46] SNMP: v1: 192.168.1.101, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.10, value: 0
Код: Выделить всё
09/29/2014 04:00:01 PM - SYSTEM STATS: Time:0.4125 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:23 RRDsProcessed:15
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Time: 0.3411 s, Theads: N/A, Hosts: 2
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_traffic_in_47.rrd --template traffic_in:traffic_out 1411984801:580556659:3346225521
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_traffic_in_46.rrd --template traffic_in:traffic_out 1411984801:0:0
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[47] SNMP: v1: 192.168.1.101, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.11, output: 3346225521
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[47] SNMP: v1: 192.168.1.101, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.11, output: 580556659
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[46] SNMP: v1: 192.168.1.101, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.10, output: 0
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[46] SNMP: v1: 192.168.1.101, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.10, output: 0
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_cpu_45.rrd --template cpu 1411984801:32
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[45] SERVER: /srv/www/cacti/scripts/ss_host_cpu.php ss_host_cpu 192.168.1.101 7 1:161:500:1:10:public:::::: get usage 1, output: 32
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[9] RESPONSE:'32'
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_cpu_44.rrd --template cpu 1411984801:19
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[9] INC: 'ss_host_cpu.php' FUNC: 'ss_host_cpu' PARMS: '192.168.1.101 7 1:161:500:1:10:public:::::: get usage 1'
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[44] SERVER: /srv/www/cacti/scripts/ss_host_cpu.php ss_host_cpu 192.168.1.101 7 1:161:500:1:10:public:::::: get usage 0, output: 19
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[8] RESPONSE:'19'
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_hdd_used_43.rrd --template hdd_used:hdd_total 1411984801:2634678272:3752722432
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[8] INC: 'ss_host_cpu.php' FUNC: 'ss_host_cpu' PARMS: '192.168.1.101 7 1:161:500:1:10:public:::::: get usage 0'
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[7] RESPONSE:'3752722432'
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[43] SERVER: /srv/www/cacti/scripts/ss_host_disk.php ss_host_disk 192.168.1.101 7 1:161:500:1:10:public:::::: get total 5, output: 3752722432
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[7] INC: 'ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '192.168.1.101 7 1:161:500:1:10:public:::::: get total 5'
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[6] RESPONSE:'2634678272'
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_hdd_used_42.rrd --template hdd_used:hdd_total 1411984801:4652859392:7503675392
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[43] SERVER: /srv/www/cacti/scripts/ss_host_disk.php ss_host_disk 192.168.1.101 7 1:161:500:1:10:public:::::: get used 5, output: 2634678272
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[6] INC: 'ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '192.168.1.101 7 1:161:500:1:10:public:::::: get used 5'
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[5] RESPONSE:'7503675392'
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[42] SERVER: /srv/www/cacti/scripts/ss_host_disk.php ss_host_disk 192.168.1.101 7 1:161:500:1:10:public:::::: get total 4, output: 7503675392
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[5] INC: 'ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '192.168.1.101 7 1:161:500:1:10:public:::::: get total 4'
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[4] RESPONSE:'4652859392'
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[42] SERVER: /srv/www/cacti/scripts/ss_host_disk.php ss_host_disk 192.168.1.101 7 1:161:500:1:10:public:::::: get used 4, output: 4652859392
09/29/2014 04:00:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/cacti/rra/best_hdd_used_41.rrd --template hdd_used:hdd_total 1411984801:368459812864:416219656192
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[4] INC: 'ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '192.168.1.101 7 1:161:500:1:10:public:::::: get used 4'
09/29/2014 04:00:01 PM - PHPSVR: Poller[0] DEBUG: PID[13330] CTR[3] RESPONSE:'416219656192'
09/29/2014 04:00:01 PM - CMDPHP: Poller[0] Host[7] DS[41] SERVER: /srv/www/cacti/scripts/ss_host_disk.
Код: Выделить всё
Cron is configured to run too often! The Poller Interval is '300' seconds, with a minimum Cron period of '300' seconds, but only -6600 seconds have passed since the poller last ran
Код: Выделить всё
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'
Код: Выделить всё
/* 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";
$database_ssl = false;
Код: Выделить всё
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> create databases cacti;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'databases cacti' at line 1
MariaDB [(none)]> create database cacti;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipasswd';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> use cacti
Database changed
MariaDB [cacti]> \q
Bye
linux-suse:/home/white # mysql -p
Enter password:
Welcome to the MariaDB monitor. Commands end with; or \g.
Your MariaDB connection id is 45
Server version: 10.0.13-MariaDB openSUSE package
Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| cacti |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]>\q
linux-suse:/home/white # mysql -u root -p -b cacti < /srv/www/cacti/cacti.sql
Enter password:
Код: Выделить всё
[Sat Jun 20 18:25:38.136689 2015] [mpm_prefork:notice] [pid 15182] AH00170: caught SIGWINCH, shutting down gracefully
[Sat Jun 20 18:25:38.252125 2015] [mpm_prefork:notice] [pid 15827] AH00163: Apache/2.4.10 (Linux/SUSE) PHP/5.6.1 configured -- resuming normal operations
[Sat Jun 20 18:25:38.252173 2015] [core:notice] [pid 15827] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D CACTIVHOST -D SYSTEMD -D FOREGROUND'