[grafana] 'all_logs' should collect ALL the logs#1
Open
psachin wants to merge 111 commits intopratik705:grafanafrom
Open
[grafana] 'all_logs' should collect ALL the logs#1psachin wants to merge 111 commits intopratik705:grafanafrom
psachin wants to merge 111 commits intopratik705:grafanafrom
Conversation
Do not collect any keyring files - expand the add_forbidden_path regular expressions accordingly to cover there filenames like: /var/lib/ceph/tmp/keyring.mon.magna055 Do not either collect any /etc/ceph/*bindpass* that can store LDAP bind passwords. Resolves: sosreport#861 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Enable calling commands via add_cmd_output with the possibility to update environmental variables. New option 'env' added (None or a dict). When set, it appends to or overrides os.environ used when calling the command from add_cmd_output. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Call grub2-mkconfig with GRUB_DISABLE_OS_PROBER=true to prevent explicit loading of the kernel modules. Resolves: sosreport#822 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
The loop that drives collection of 'docker info' output for each discovered Image ID incorrectly attempted to call strip() on the dictionary returned by get_command_output(). Since the docker command does not produce leading or trailing whitespace this is redundant anyway: discard the other entries in the command dictionary and just split the result into distinct lines. Resolves: sosreport#853. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Collect "omreport storage controller". Do not collect "omreport chassis summary" as it is invalid command. Resolves: sosreport#868. Signed-off-by: Charles Rose <charles_rose@dell.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
This patch changes the behavior of the docker plugin and collects a bit more data than before. In addition, it also adds 'docker-engine' to the package lists as that is the current name of the community release of Docker. Both 'docker version' and 'docker ps -a' output is now collected. Output from 'docker version' help to validate a given docker binary and 'ps -a' output is collected to see all terminated, but still existing, containers present on the system. This is kept separate from normal 'ps' output to keep it simple to only quickly look at running containers. The output of 'docker inspect' is now collected as well, by default only for running containers. Further, plugin options have been changed: - 'logs' will now capture 'docker logs' output for all running containers. Previously this was provided by the 'all' option which would also always include terminated containers. - 'all' will now cause the plugin to also include terminated containers for 'inspect' and 'logs' output. Note that by itself this option no longer captures any additional information. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Resolves: sosreport#847. Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
New module for package manager npm for Node.js. The plugin collects list of globally installed modules and project modules. Resolves: sosreport#846. Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Older versions of python-six package dont have six.PY2 variable. Replace it by six.PY3 Resolves: sosreport#875. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Move netstat_pkg assignment grepping for net-tools version into try block. It can be put to the existing block that will catch the exception - since if net-tools isn't present, we fallback to the default option of netstat command (if the command is ever present). Resolves: sosreport#876. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
As a relict from sosreport#587 (cluster split), sosreport --help should refer to dlm plugin instead of cluster in -o and -k example. Resolves: sosreport#874. Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
Mention how to run sosreport on a system with only python3. Update the first release sosreport got into Ubuntu to a supported LTS which should be more recognizable to people. Fixes: sosreport#830 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
Added "self.exit_process" statements to stop process with SIGTERM signal. Added "self.handle_exception()" function to handle plugin exception and SIGTERM signal. Closes:sosreport#689
Add a new plugin to collect configuration and state data from the dracut initramfs generator. Closes: sosreport#705. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
The package name juju is no longer the only way to install juju, so replace with checking /usr/bin/juju|juju-run. Juju-run is on machines deployed with juju. Logging still occurs there in same pattern - /var/log/juju/machinename.log. Juju "Local" logs were never seen in the wild and has been removed. Check that /var/log/juju/ exists before trying to access it. Check that /usr/bin/juju exists before trying to run it. Check that Juju's mongodb exists before trying to parse it. /var/lib/juju/ contains a database that can grow to many GB, let's not include that by default. Also explicitly specified juju formats tabular and json (in 2.0 tabular is the default and in 1.25 json is). And we also now explicitly capture the version. Fix up contrainsts and get-config/get so it works for both versions. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
This collects status from all units, which replaces the need to run "systemctl list-units --all" seperately and provides much richer information for every unit - including a bit of log output, process tree, memory usage, and more. It also runs show for all services which should capture the majority of Limits and other information we generally look for. systemd-analyze - provides boot performance info systemctl status - shows system status and nice process tree We also now ls /lib/systemd recursively as some folder names below it have changed. Lastly, we make sure it runs on Ubuntu/Debian as we store systemd in /lib not /usr/lib. Closes: sosreport#831. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
It seems that nowadays the file is /etc/sudoers.d/sahara-rootwrap. Closes: sosreport#848.
A method decorated with @classmethod receives an instance of the class object (rather than an instance of the class) in its first argument - use 'cls' in these functions rather than 'self'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
SSSD 1.14 adds support for dropped-in configuration files in /etc/sssd/conf.d/ - Adding these files will ensure all SSSD configuration files are obtained. Closes sosreport#890. Signed-off-by: Justin Stephenson <jstephen@redhat.com>
testparm -v prints the values of all options, including the compiled in defaults. The output of testparm with*out* -v is much more helpful in that it only outputs the non-default options. Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
SOSREPORT generally uses the default interface (/dev/ipmi0) while executing ipmitool command, which is quite slow as compare to usb interface. This usb interface uses the virtual device exposed from BMC like in OpenPower system AMI exposes virtual USB interface. IPMITOOL command with usb interface sends the data to the kernel drivers which inturn sends it to the BMC. This patch enables ipmitool command to use usb interface if available. With this patch: ================ root@ubuntu1604:/home/mukesh/sos# ./sosreport --config sos.conf -o ipmitool sosreport (version 3.2) This command will collect system configuration and diagnostic information from this Ubuntu system. An archive containing the collected information will be generated in /tmp/sos.TF8N8E. For more information on Ubuntu visit: http://www.ubuntu.com/ The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No changes will be made to system configuration. Press ENTER to continue, or CTRL-C to quit. Please enter your first initial and last name [ubuntu1604]: Please enter the case id that you are generating this report for []: Setting up archive ... Setting up plugins ... Running plugins. Please wait ... Running 1/1: ipmitool... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/sosreport-ubuntu1604-20161130110402.tar.xz The checksum is: adfdbc8475874d7ad1077a3d2eda151b Please send this file to your support representative. root@ubuntu1604:/home/mukesh/sos# tar -xvf /tmp/sosreport-ubuntu1604-20161130110402.tar.xz sosreport-ubuntu1604-20161130110402/ sosreport-ubuntu1604-20161130110402/version.txt sosreport-ubuntu1604-20161130110402/sos_reports/ sosreport-ubuntu1604-20161130110402/sos_reports/sos.txt sosreport-ubuntu1604-20161130110402/sos_reports/sos.html sosreport-ubuntu1604-20161130110402/sos_commands/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sdr_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_chassis_status sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_fru_print sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sensor_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_mc_info sosreport-ubuntu1604-20161130110402/sos_logs/ sosreport-ubuntu1604-20161130110402/sos_logs/ui.log sosreport-ubuntu1604-20161130110402/sos_logs/sos.log Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> --- Changes in V3: - Forgot to remove import subprocess in the last version. Changes in V2: - Used existing wrapper instead of subprocess. - Removed camelCase for identifier. sos/plugins/ipmitool.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
Obtain SSSD automatically-generated krb5 snippet configuration files for localauth plugin, domain_realm mapping, and libdefaults additions. These files are pulled in by libkrb5 with an 'includedir' line in /etc/krb5.conf. Signed-off-by: Justin Stephenson <jstephen@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Closes sosreport#897.
Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Closes: sosreport#896.
This commit adds the file /usr/share/polkit-1/rules.d/60-libvirt.rules to the copy specs of the Debian plugin. Signed-off-by: Jorge Niedbalski R. jorge.niedbalski@canonical.com Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Closes: sosreport#894.
The Dialogic Diva out-of-tree driver creates a number of problematic files in /proc/net that return unlimited data on read. The previous attempt to handle this driver left some files exposed (possibly due to a change in the driver): to prevent this, blacklist the entire /proc/net/eicon tree in the networking plugin. Closes: sosreport#892. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
If auth information got sourced before sosreport run (OS_USERNAME, OS_PASSWORD, OS_TENANT_NAME) collect information from nova, neutron, keystone, glance, ironic and heat. Only undercloud specific heat information is collected in instack plugin. Closes: sosreport#955. Signed-off-by: Martin Schuppert <mschuppe@redhat.com>
Allow subclasses of FileCacheArchive to accept either a path to a file to add, or an instance of an open File object, from whih data will be read. This will be used to covert logging FileHandler object to StreamHandler objects, avoiding creating bogus '<fdopen>' paths in the file system when the former are used with files that are created with os.fdopen(). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Open files created by the TempFileUtil class for both reading and writing: this allows the log files that are managed by this class to be read back once they have been written. This will be used to convert logging handlers to StreamHandler. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Use a StreamHandler for sos.log and ui.log so that data is sent directly to the log files, and to avoid the FileHandler creating a bogus '<fdopen>' directory entry. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Pass the file object in which HTML and text reports have been generated to the archiving class. Since the files received are instances of TempFileUtil files, they will use fdopen and cannot return a valid file name.
"import os.path" missing. Resolves: sosreport#967 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Set transactions = -1 to skip for loop when dnf history is empty. Resolves: sosreport#969 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Catch IOError when opening /etc/collectd.conf and log it as a warning. Resolves: sosreport#968, sosreport#976. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Specify packages plugin variable to run the plugin only on systems with gnocchi installed. Resolves: sosreport#977 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
dpdk_nic_bind was renamed by the DPDK project to dpdk_devbind, which means we need to test for either. Additionally, driverctl is used in rhel systems to provide udev based persistent overrides, so capturing its output is helpful as well. Signed-off-by: Aaron Conole <aconole@redhat.com>
Resolves: sosreport#972. Signed-off-by: Aaron Conole <aconole@redhat.com>
…e queried. The change in how commands are parsed was introduced in commit 04d4128. This caused our old dpkg parsing to not work. Whatever the reason for the \* in the command it doesn't appear to be needed now anyway so removing it. Resolves: sosreport#935 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
lsvpd family commands captures information, which can be extracted from /var/lib/lsvpd. So, avoid capturing duplicate information by skipping the execution of these command. Signed-off-by: Mukesh Ojha <mukesh02 linux vnet ibm com> Reviewed-by: Kamalesh Babulal <kamalesh linux vnet ibm com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
This patch enables sosreport to collect "diag_encl -v" command output. Signed-off-by: Mukesh Ojha <mukesh02 linux vnet ibm com> Signed-off-by: Ankit Kumar <ankit linux vnet ibm com> Tested-by: Mukesh Ojha <mukesh02 linux vnet ibm com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
This patch enables sosreport to capture files under /sys/fs/pstore/ . Signed-off-by: Mukesh Ojha <mukesh02 linux vnet ibm com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Resolves: sosreport#934. Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Don't try to open corosync.conf if it doesn't exist, and handle exceptions on open and IO if it does. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
_get_npm_output with working_directory=project_path must be called only if project_path is configured Resolves: sosreport#951 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Resolves: sosreport#914 Signed-off-by: Jacob Wen <jian.w.wen@oralce.com>
Adds the following to the networking plugin: $ ss -peaonmi The ss tool provides much more detailed socket information than netstat and is almost guaranteed to be available while netstat not always so. ss provides some very useful extra TCP socket information such as memory allocations, the congestion window size, window scaling factor, segments sent/received, outstanding data, etc, etc. It also provides the socket address for every known socket type listed. The net-tools package is not part of the default package set for some minimal EL installs so it is not always available. ss is part of the more-modern iproute suite so is more likely to always be available. Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
added command to collect 'ss -lnp' within each namespace (edited to use -peaonmi for consistence with collection in the main namespace. -- bmr). Resolves: sosreport#966. Signed-off-by: Martin Schuppert <mschuppert@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Plugin names must match the filename they are found in: # sosreport -l | grep gnocchi openstack_gnocchi inactive Gnocchi - Metric as a service # sosreport -o openstack_gnocchi sosreport (version 3.3) a non-existing plugin (openstack_gnocchi) was specified in the command line Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
This patch adds to the networking plugin the command:
$ nft list rulesets
Which will provide all currently loaded nftables rulesets. In addition,
it collects static nftables configuration.
Signed-off-by: Robb Manes <rmanes@redhat.com>
For compatibility with python3, when using startswith() or split() with data read from a file, use bytes rather than a string. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
The iteritems() member has been removed in python3. Since the environment loop in sos_get_command_output() is not expected to be run with very large inputs use .items() instead, which is compatible with both python2 and python3. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
$ make rpm rm: remove write-protected regular file './sos/sosreport.pyc'? y rm: remove write-protected regular file './sos/policies/__pycache__/debian.cpython-35.pyc'? ^CMakefile:74: recipe for target 'clean' failed make: *** [clean] Interrupt Gets old very fast.. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
- Also added openstack, openstack_controller profiles. Signed-off-by: Sachin <psachin@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
*.log as well as rotating logs
Signed-off-by: Sachin Patil psachin@redhat.com