Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 1. Logging
Red Hat OpenStack Platform writes informational messages to specific log files; you can use these messages for troubleshooting and monitoring system events.
You need not attach the individual log files to your support cases manually. All the required information will be gathered automatically by the sosreport
utility, which is described in Chapter 3, Troubleshooting.
1.1. Log Files for OpenStack Services Link kopierenLink in die Zwischenablage kopiert!
Each OpenStack component has a separate logging directory containing files specific to a running service.
1.1.1. Bare Metal Provisioning (ironic) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Ironic API | openstack-ironic-api.service | /var/log/ironic/ironic-api.log |
OpenStack Ironic Conductor | openstack-ironic-conductor.service | /var/log/ironic/ironic-conductor.log |
1.1.2. Block Storage (cinder) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
Block Storage API | openstack-cinder-api.service | /var/log/cinder/api.log |
Block Storage Backup | openstack-cinder-backup.service | /var/log/cinder/backup.log |
Informational messages | The cinder-manage command | /var/log/cinder/cinder-manage.log |
Block Storage Scheduler | openstack-cinder-scheduler.service | /var/log/cinder/scheduler.log |
Block Storage Volume | openstack-cinder-volume.service | /var/log/cinder/volume.log |
1.1.3. Compute (nova) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Compute API service | openstack-nova-api.service | /var/log/nova/nova-api.log |
OpenStack Compute certificate server | openstack-nova-cert.service | /var/log/nova/nova-cert.log |
OpenStack Compute service | openstack-nova-compute.service | /var/log/nova/nova-compute.log |
OpenStack Compute Conductor service | openstack-nova-conductor.service | /var/log/nova/nova-conductor.log |
OpenStack Compute VNC console authentication server | openstack-nova-consoleauth.service | /var/log/nova/nova-consoleauth.log |
Informational messages | nova-manage command | /var/log/nova/nova-manage.log |
OpenStack Compute NoVNC Proxy service | openstack-nova-novncproxy.service | /var/log/nova/nova-novncproxy.log |
OpenStack Compute Scheduler service | openstack-nova-scheduler.service | /var/log/nova/nova-scheduler.log |
1.1.4. Dashboard (horizon) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
Log of certain user interactions | Dashboard interface | /var/log/horizon/horizon.log |
The Apache HTTP server uses several additional log files for the Dashboard web interface, which can be accessed using a web browser or command-line clients (keystone, nova). The following log files can be helpful in tracking the usage of the Dashboard and diagnosing faults:
Purpose | Log Path |
---|---|
All processed HTTP requests | /var/log/httpd/horizon_access.log |
HTTP errors | /var/log/httpd/horizon_error.log |
Admin-role API requests | /var/log/httpd/keystone_wsgi_admin_access.log |
Admin-role API errors | /var/log/httpd/keystone_wsgi_admin_error.log |
Member-role API requests | /var/log/httpd/keystone_wsgi_main_access.log |
Member-role API errors | /var/log/httpd/keystone_wsgi_main_error.log |
There is also /var/log/httpd/default_error.log
, which stores errors reported by other web services running on the same host.
1.1.5. Data Processing (sahara) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
Sahara API Server |
openstack-sahara-all.service |
/var/log/sahara/sahara-all.log |
Sahara Engine Server | openstack-sahara-engine.service | /var/log/messages |
1.1.6. Database as a Service (trove) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Trove API Service | openstack-trove-api.service | /var/log/trove/trove-api.log |
OpenStack Trove Conductor Service | openstack-trove-conductor.service | /var/log/trove/trove-conductor.log |
OpenStack Trove guestagent Service | openstack-trove-guestagent.service | /var/log/trove/logfile.txt |
OpenStack Trove taskmanager Service | openstack-trove-taskmanager.service | /var/log/trove/trove-taskmanager.log |
1.1.7. Identity Service (keystone) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Identity Service | openstack-keystone.service | /var/log/keystone/keystone.log |
1.1.8. Image Service (glance) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Image Service API server | openstack-glance-api.service | /var/log/glance/api.log |
OpenStack Image Service Registry server | openstack-glance-registry.service | /var/log/glance/registry.log |
1.1.9. Networking (neutron) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Neutron DHCP Agent | neutron-dhcp-agent.service | /var/log/neutron/dhcp-agent.log |
OpenStack Networking Layer 3 Agent | neutron-l3-agent.service | /var/log/neutron/l3-agent.log |
Metadata agent service | neutron-metadata-agent.service | /var/log/neutron/metadata-agent.log |
Metadata namespace proxy | n/a | /var/log/neutron/neutron-ns-metadata-proxy-UUID.log |
Open vSwitch agent | neutron-openvswitch-agent.service | /var/log/neutron/openvswitch-agent.log |
OpenStack Networking service | neutron-server.service | /var/log/neutron/server.log |
1.1.10. Object Storage (swift) Log Files Link kopierenLink in die Zwischenablage kopiert!
OpenStack Object Storage sends logs to the system logging facility only.
By default, all Object Storage log files to /var/log/swift/swift.log, using the local0, local1, and local2 syslog facilities.
The log messages of Object Storage are classified into two broad categories: those by REST API services and those by background daemons. The API service messages contain one line per API request, in a manner similar to popular HTTP servers; both the frontend (Proxy) and backend (Account, Container, Object) services post such messages. The daemon messages are less structured and typically contain human-readable information about daemons performing their periodic tasks. However, regardless of which part of Object Storage produces the message, the source identity is always at the beginning of the line.
An example of a proxy message:
Apr 20 15:20:34 rhev-a24c-01 proxy-server: 127.0.0.1 127.0.0.1 20/Apr/2015/19/20/34 GET /v1/AUTH_zaitcev%3Fformat%3Djson%26marker%3Dtestcont HTTP/1.0 200 - python-swiftclient-2.1.0 AUTH_tk737d6... - 2 - txc454fa8ea4844d909820a-0055355182 - 0.0162 - - 1429557634.806570053 1429557634.822791100
Apr 20 15:20:34 rhev-a24c-01 proxy-server: 127.0.0.1 127.0.0.1 20/Apr/2015/19/20/34 GET /v1/AUTH_zaitcev%3Fformat%3Djson%26marker%3Dtestcont HTTP/1.0 200 - python-swiftclient-2.1.0 AUTH_tk737d6... - 2 - txc454fa8ea4844d909820a-0055355182 - 0.0162 - - 1429557634.806570053 1429557634.822791100
An example of ad-hoc messages from background daemons:
1.1.11. Orchestration (heat) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack Heat API Service | openstack-heat-api.service | /var/log/heat/heat-api.log |
Openstack Heat Engine Service | openstack-heat-engine.service | /var/log/heat/heat-engine.log |
Orchestration service events | n/a | /var/log/heat/heat-manage.log |
1.1.13. Telemetry (ceilometer) Log Files Link kopierenLink in die Zwischenablage kopiert!
Service | Service Name | Log Path |
---|---|---|
OpenStack ceilometer notification agent | openstack-ceilometer-notification.service | /var/log/ceilometer/agent-notification.log |
OpenStack ceilometer alarm evaluation | openstack-ceilometer-alarm-evaluator.service | /var/log/ceilometer/alarm-evaluator.log |
OpenStack ceilometer alarm notification | openstack-ceilometer-alarm-notifier.service | /var/log/ceilometer/alarm-notifier.log |
OpenStack ceilometer API | openstack-ceilometer-api.service | /var/log/ceilometer/api.log |
Informational messages | MongoDB integration | /var/log/ceilometer/ceilometer-dbsync.log |
OpenStack ceilometer central agent | openstack-ceilometer-central.service | /var/log/ceilometer/central.log |
OpenStack ceilometer collection | openstack-ceilometer-collector.service | /var/log/ceilometer/collector.log |
OpenStack ceilometer compute agent | openstack-ceilometer-compute.service | /var/log/ceilometer/compute.log |
1.1.14. Log Files for Supporting Services Link kopierenLink in die Zwischenablage kopiert!
The following services are used by the core OpenStack components and have their own log directories and files.
Service | Service Name | Log Path |
---|---|---|
Message broker (RabbitMQ) | rabbitmq-server.service |
/var/log/rabbitmq/rabbit@short_hostname.log |
Database server (MariaDB) | mariadb.service | /var/log/mariadb/mariadb.log |
Document-oriented database (MongoDB) | mongod.service | /var/log/mongodb/mongodb.log |
Virtual network switch (Open vSwitch) | openvswitch-nonetwork.service |
/var/log/openvswitch/ovsdb-server.log |
1.2. Configure Logging Options Link kopierenLink in die Zwischenablage kopiert!
Each component maintains its own separate logging configuration in its respective configuration file. For example, in Compute, these options are set in /etc/nova/nova.conf
:
Increase the level of informational logging by enabling debugging. This option greatly increases the amount of information captured, so you may want to consider using it only temporarily, or first reviewing your log rotation settings.
debug=True
debug=True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable verbose logging:
verbose=True
verbose=True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change the log file path:
log_dir=/var/log/nova
log_dir=/var/log/nova
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Send your logs to a central syslog server:
use_syslog=True syslog_log_facility=LOG_USER
use_syslog=True syslog_log_facility=LOG_USER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Options are also available for timestamp configuration and log formatting, among others. Review the component’s configuration file for additional logging options.
1.3. Remote Logging Installation and Configuration Link kopierenLink in die Zwischenablage kopiert!
1.3.1. Introduction to Remote Logging Link kopierenLink in die Zwischenablage kopiert!
All systems generate and update log files recording their actions and any problems they encounter. In a distributed or cloud computing environment that contains many systems, collecting these log files in a central location simplifies debugging.
The rsyslog
service provides facilities both for running a centralized logging server and for configuring individual systems to send their log files to the centralized logging server. This is referred to as configuring the systems for remote logging.
1.3.2. Install rsyslog Server Link kopierenLink in die Zwischenablage kopiert!
The rsyslog
package must be installed on the system that you intend to use as a centralized logging server and all systems that will be configured to send logs to it. To do so, log in as the root user and install the rsyslog
package:
yum install rsyslog
# yum install rsyslog
The rsyslog
package is installed and ready to be configured.
1.3.3. Configure rsyslog on the Centralized Logging Server Link kopierenLink in die Zwischenablage kopiert!
The steps in this procedure must be followed on the system that you intend to use as your centralized logging sever. All steps in this procedure must be run while logged in as the root user.
Configure SELinux to allow
rsyslog
traffic.semanage port -a -t syslogd_port_t -p udp 514
# semanage port -a -t syslogd_port_t -p udp 514
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Open the
/etc/rsyslog.conf
file in a text editor.Add the following lines to the file, defining the location logs will be saved to:
$template TmplMsg, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" $template TmplAuth, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" authpriv.* ?TmplAuth *.info,mail.none,authpriv.none,cron.none ?TmplMsg
$template TmplMsg, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" $template TmplAuth, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" authpriv.* ?TmplAuth *.info,mail.none,authpriv.none,cron.none ?TmplMsg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the comment character (
#
) from the beginning of these lines in the file:#$ModLoad imudp #$UDPServerRun 514
#$ModLoad imudp #$UDPServerRun 514
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the changes to the
/etc/rsyslog.conf
file.
Your centralized log server is now configured to receive and store log files from the other systems in your environment.
1.3.4. Configure rsyslog on Individual Nodes Link kopierenLink in die Zwischenablage kopiert!
Apply the steps listed in this procedure to each of your systems to configure them to send logs to a centralized log server. All steps listed in this procedure must be performed while logged in as the root user.
Edit the
/etc/rsyslog.conf
, and specify the address of your centralized log server by adding the following:*.* @YOURSERVERADDRESS:YOURSERVERPORT
*.* @YOURSERVERADDRESS:YOURSERVERPORT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace YOURSERVERADDRESS with the address of the centralized logging server. Replace YOURSERVERPORT with the port on which the rsyslog service is listening. For example:
*.* @192.168.20.254:514
*.* @192.168.20.254:514
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Or:
*.* @@log-server.example.com:514
*.* @@log-server.example.com:514
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The single
@
sign specifies the UDP protocol for transmission. Use@@
to specify the TCP protocol for transmission.ImportantThe use of the wildcard (
*
) character in these example configurations indicates to rsyslog that log entries from all log facilities and of all log priorities must be sent to the remote rsyslog server.For information on applying more precise filtering of log files refer to the manual page for the rsyslog configuration file,
rsyslog.conf
. Access the manual page by runningman rsyslog.conf
.- Once the rsyslog service is started or restarted the system will send all log messages to the centralized logging server.
1.3.5. Start the rsyslog Server Link kopierenLink in die Zwischenablage kopiert!
The rsyslog
service must be running on both the centralized logging server and the systems attempting to log to it.
The steps in this procedure must be performed while logged in as the root user.
Start the rsyslog service:
service rsyslog start
# service rsyslog start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure the rsyslog service starts automatically in the future:
chkconfig rsyslog on
# chkconfig rsyslog on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The rsyslog
service has been started. The service will start sending or receiving log messages based on its local configuration.