Skip to content

Diagtool Output

kubotat edited this page May 12, 2020 · 2 revisions

Overview

The diagtool collects files and parameters and compresses output as tar.gz format. The sample output file is provided in followed link:
https://github.com/fluent/diagtool/blob/dev/sample/output/diagout-20200508232122.tar.gz
The directory tree would be:

# tree
.
|-- diagtool.output
|-- etc
|   |-- sysctl.conf
|   `-- td-agent
|       `-- td-agent.conf.mask
|-- netstat_n.output.mask
|-- ntp_info.output
|-- os_env.output
|-- td-agent_env.output
|-- ulimit_n.output
`-- var
    `-- log
        |-- messages.mask
        `-- td-agent
            |-- buffer
            |   `-- td
            |-- td-agent.log-20200424.gz.mask
            |-- td-agent.log-20200425.gz.mask
            |-- td-agent.log-20200426.gz.mask
            |-- td-agent.log-20200427.gz.mask
            |-- td-agent.log-20200507.gz.mask
            |-- td-agent.log-20200508.mask
            `-- td-agent.log.mask

When mask option is enabled, the mask function will be applied to followed files. The validation function will be applied to the files which includes the information regarding mandatory requirements during installation.

filename mask validation
diagtool.output NA NA
ntp_info.output NA NA
ulimit_n.output NA yes
etc/sysctl.conf NA yes
os_env.output yes NA
netstat_n.output yes NA
var/log/messages yes NA
td-agent_env.output NA NA
td-agent.conf yes NA
td-agent.log yes NA

Diagtool Log

diagtool.output

The diagtool.output contains the output of diagtool. There are information like what files and directories are collected, the results of validation and which files are masked by diagtool.

Output required to confirm mandatory requirements

There are mandatory requirements when users perform installation. The diagtool collects the information regarding mandatory requirements and validate if they are set as expected.

ntp_info.output

The 'ntp_info.output' has the command output of 'chronyc sources' to check if the NTP is set and the connection is correctly established.

ulimit_n.output

The 'ulimit_n.output' holds the command output of 'ulimit -n'. The maximum number of file descriptor is also mandatory requirements described in before installation steps and the output should be larger than '65535'. The parameters are validated within the diagtool and the validation results are stated in command output and 'diagtool.output'.
https://docs.fluentd.org/installation/before-install

etc/sysctl.conf

The information described in 'etc/sysctl.conf' provides the information regarding network kernel parameters. The required parameters are also described in before installation steps. The parameters are validated as well as ulimit and the validation results are stated in command output and 'diagtool.output'.
https://docs.fluentd.org/installation/before-install

OS Information

os_env.output

The 'os_env.output' has the command output of 'hostnamectl' which contains the OS and kernel version.

netstat_n.output

The 'netstat_n.output' has the command output of 'netstat -n'. The output is used to confirm if the network connection between td-agent plugins are established. When mask option is enabled, the diagtool generate mask for 'netstat_n.output.mask' in order to sanitize sensitive information such as hostname(FQDN) and IP addresses.

var/log/messages

The 'messages' file contains log of OS. The 'messages' files hold the sensitive information so that the mask function would be applied on them if the function is enabled.

CPU usage(TBD)

Memory usage(TBD)

TD-Agent Information

td-agent_env.output

The td-agent_env.output has the command output of 'systemctl cat td-agent' which contains the path of log and config files. Since the path of log and config files may differ from default, the diagtool also uses td-agent_env.output to automatically specify the path.

{path to td-agent.conf}/td-agent.conf (default: etc/td-agent/td-agent.conf)

The configuration file allows the user to control the input and output behavior of Fluentd by (1) selecting input and output plugins and (2) specifying the plugin parameters. The file is required for Fluentd to operate properly.

{path to td-agent.log}/td-agent.log (default: var/log/td-agent.log)