<commit_before>

.. _logs-top-tshoot:

Logs and messages
-----------------

A number of logs are available
to help you understand and troubleshoot
what is going on in your environment.

.. _screen-messages-tshoot:

Screen messages
+++++++++++++++

Clicking on the icon in the upper right corner
of the Fuel UI displays a drop-down menu
of notifications posted as the environment was deployed.
If notifications have been posted
that you have not yet viewed,
this icon is an orange square with a number
that indicates the number of unread notifications.
If there are no unread notifications,
the icon looks as it does here:

.. image:: /_images/user_screen_shots/messages.png
   :width: 80%

These notifications tell you about the nodes that were deployed
and when nodes go on and offline.
Click on any notification
to get a summary configuration view of the node.

.. _view-logs-fuel:

Viewing Logs through Fuel
+++++++++++++++++++++++++

The Logs tab on the Fuel UI allows you to view
key logs for any node in the environment.
Use the drop-down list on the left to select
whether to view Fuel Master logs
or the logs of other servers in the environment.

When you choose the "Fuel Master" logs,
you get this display:

.. image:: /_images/user_screen_shots/master-logs.png
   :width: 80%

Select the log to view by setting the fields:

:Logs:    Choose between the Fuel Master or "Other servers".
          When you choose "Other servers", the display changes
          to provide a drop-down list of all nodes in the environment.

:Source:  Log you want to view.  See the lists below.

:Min Level:    By default, this shows "INFO" messages only.
               If you are running your environment in debug mode,
               you can use this field to filter out some of the messages.

When you have set all the fields, click on "SHOW" at the right
to display the requested log for the specified server.

Viewing Fuel Master logs
++++++++++++++++++++++++

The following logs can be chosen from the "Source" list
for the "Fuel Master" node:

:puppet:    Logs activity of the :ref:`puppet-term`
            configuration management system.

:anaconda:  Logs activities of the Anaconda installation agent
            used for provisioning.

:syslog:  Shows the **syslog** entries
          that will be sent to the **rsyslog** server
          (Fuel Master by default).



**Other install logs**

:storage:    Log entries for disk partitioning.

:kickstart-pre:   Shows activities before the :ref:`Cobbler<cobbler-term>`
                  kickstart mechanism runs.

:kickstart-post:  Shows activities after the Cobbler kickstart mechanism runs.


**Bootstrap logs**

:Web backend:  Logs each connection from the Master Node
               to the Internet.

:REST API:    :ref:`Nailgun<nailgun-term>` API activities.

:RPC consumer:    Logs messaging between :ref:`Nailgun<nailgun-term>`
                  and the :ref:`orchestration service<orchestration-service-term>`

:Astute:  Records the activity of the :ref:`astute-term` agents
          that implements the :ref:`nailgun-term` configuration tasks.

:Health Check:  Displays the results of the most recent run
                of the tests run from the "Health Check" tab.

Viewing logs for target nodes ("Other servers")
+++++++++++++++++++++++++++++++++++++++++++++++

When you choose "Other Servers",
the display includes an extra field
that you use to choose the node whose logs you want to view:

.. image:: /_images/user_screen_shots/other-nodes-logs.png
   :width: 80%

Many of the same logs shown for the Fuel Master node
are also shown for the target nodes.
The difference is in the nodes given for "Bootstrap logs",
plus the controller node includes a set of OpenStack logs
that shows logs for services that run on the Controller node.

The "Bootstrap logs" for "Other servers" are:

**Bootstrap logs**

:dmesg:  Standard Linux dmesg log that displays log messages
         from the most recent system startup.

:messages:  Logs all kernel messages for the node.

:mcollective:    Logs activities of Mcollective

:agent:    Logs activities of the
           :ref:`Nailgun<nailgun-term>` agent.

syslog
++++++

OpenStack uses the standard Linux **syslog**/**rsyslog** facilities
to manage logging in the environment.
Fuel puts the appropriate templates
into the */etc/rsyslog.d* directory
on each target node.

By default, Fuel sets up the Fuel Master node
to be the remote syslog server.
See :ref:`syslog-ug` for instructions about
how to configure the environment
to use a different server as the **rsyslog** server.
Note that Fuel configures all the files required for **rsyslog**
when you use the Fuel Master node as the remote server;
if you specify another server,
you must configure that server to handle messages
from the OpenStack environment.

/var/logs
+++++++++

Logs for each node are written to the node's */var/logs* directory
and can be viewed there.
Under this directory, you will find subdirectories
for the major services that run on that node
such as nova, cinder, glance, and heat.

On the Fuel Master node,
*/var/log/remote* is a symbolic link to the
*/var/log/docker-logs/remote* directory.

<commit_msg>Enabling debug logging for OpenStack services<commit_after>

.. _logs-top-tshoot:

Logs and messages
-----------------

A number of logs are available
to help you understand and troubleshoot
what is going on in your environment.

.. _screen-messages-tshoot:

Screen messages
+++++++++++++++

Clicking on the icon in the upper right corner
of the Fuel UI displays a drop-down menu
of notifications posted as the environment was deployed.
If notifications have been posted
that you have not yet viewed,
this icon is an orange square with a number
that indicates the number of unread notifications.
If there are no unread notifications,
the icon looks as it does here:

.. image:: /_images/user_screen_shots/messages.png
   :width: 80%

These notifications tell you about the nodes that were deployed
and when nodes go on and offline.
Click on any notification
to get a summary configuration view of the node.

.. _view-logs-fuel:

Viewing Logs through Fuel
+++++++++++++++++++++++++

The Logs tab on the Fuel UI allows you to view
key logs for any node in the environment.
Use the drop-down list on the left to select
whether to view Fuel Master logs
or the logs of other servers in the environment.

When you choose the "Fuel Master" logs,
you get this display:

.. image:: /_images/user_screen_shots/master-logs.png
   :width: 80%

Select the log to view by setting the fields:

:Logs:    Choose between the Fuel Master or "Other servers".
          When you choose "Other servers", the display changes
          to provide a drop-down list of all nodes in the environment.

:Source:  Log you want to view.  See the lists below.

:Min Level:    By default, this shows "INFO" messages only.
               If you are running your environment in debug mode,
               you can use this field to filter out some of the messages.

When you have set all the fields, click on "SHOW" at the right
to display the requested log for the specified server.

Viewing Fuel Master logs
++++++++++++++++++++++++

The following logs can be chosen from the "Source" list
for the "Fuel Master" node:

:puppet:    Logs activity of the :ref:`puppet-term`
            configuration management system.

:anaconda:  Logs activities of the Anaconda installation agent
            used for provisioning.

:syslog:  Shows the **syslog** entries
          that will be sent to the **rsyslog** server
          (Fuel Master by default).



**Other install logs**

:storage:    Log entries for disk partitioning.

:kickstart-pre:   Shows activities before the :ref:`Cobbler<cobbler-term>`
                  kickstart mechanism runs.

:kickstart-post:  Shows activities after the Cobbler kickstart mechanism runs.


**Bootstrap logs**

:Web backend:  Logs each connection from the Master Node
               to the Internet.

:REST API:    :ref:`Nailgun<nailgun-term>` API activities.

:RPC consumer:    Logs messaging between :ref:`Nailgun<nailgun-term>`
                  and the :ref:`orchestration service<orchestration-service-term>`

:Astute:  Records the activity of the :ref:`astute-term` agents
          that implements the :ref:`nailgun-term` configuration tasks.

:Health Check:  Displays the results of the most recent run
                of the tests run from the "Health Check" tab.

Viewing logs for target nodes ("Other servers")
+++++++++++++++++++++++++++++++++++++++++++++++

When you choose "Other Servers",
the display includes an extra field
that you use to choose the node whose logs you want to view:

.. image:: /_images/user_screen_shots/other-nodes-logs.png
   :width: 80%

Many of the same logs shown for the Fuel Master node
are also shown for the target nodes.
The difference is in the nodes given for "Bootstrap logs",
plus the controller node includes a set of OpenStack logs
that shows logs for services that run on the Controller node.

The "Bootstrap logs" for "Other servers" are:

**Bootstrap logs**

:dmesg:  Standard Linux dmesg log that displays log messages
         from the most recent system startup.

:messages:  Logs all kernel messages for the node.

:mcollective:    Logs activities of Mcollective

:agent:    Logs activities of the
           :ref:`Nailgun<nailgun-term>` agent.

syslog
++++++

OpenStack uses the standard Linux **syslog**/**rsyslog** facilities
to manage logging in the environment.
Fuel puts the appropriate templates
into the */etc/rsyslog.d* directory
on each target node.

By default, Fuel sets up the Fuel Master node
to be the remote syslog server.
See :ref:`syslog-ug` for instructions about
how to configure the environment
to use a different server as the **rsyslog** server.
Note that Fuel configures all the files required for **rsyslog**
when you use the Fuel Master node as the remote server;
if you specify another server,
you must configure that server to handle messages
from the OpenStack environment.

/var/logs
+++++++++

Logs for each node are written to the node's */var/logs* directory
and can be viewed there.
Under this directory, you will find subdirectories
for the major services that run on that node
such as nova, cinder, glance, and heat.

On the Fuel Master node,
*/var/log/remote* is a symbolic link to the
*/var/log/docker-logs/remote* directory.

Enabling debug logging for OpenStack services
+++++++++++++++++++++++++++++++++++++++++++++

Most OpenStack services use the same configuration options to control log level
and logging method. If you need to troubleshoot a specific service, locate its
config file under */etc* (e.g. */etc/nova/nova.conf*) and revert the values of
**debug** and **use_syslog** flags like this::

  debug=True
  use_syslog=False

Disabling syslog will protect the Fuel master node from being overloaded from a
flood of debug messages sent from that node to the rsyslog server. Do not
forget to revert both flags back to original values when done with
troubleshooting.

{'fraction_non_alphanumeric': 0.08714518170312782, 'fraction_numerical': 0.0010847947929849937, 'mean_word_length': 3.644416456759026, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3859755', 'n_tokens_mistral': 3059, 'n_tokens_neox': 2929, 'n_words': 1523}