Hello,
I am starting to work on a simple katello-foreman script. It will likely
be very similar to this one:
https://github.com/Katello/katello/blob/master/src/script/katello-debug
Main purpose: collect all relevant log files, remove all possible
passwords or secret keys, create a tarball and tell the user where to
send/upload. The same for relevant config files.
In the future, this can be easily integrated with ABRT, but the first
cut is (I think) no ABRT integration. I believe the integration
interface is ABRT Custom Hooks which is very straighforward to integrate
- the script just need to have an option to create all reports/files in
the current directory rather than a temp dir:
https://fedorahosted.org/abrt/wiki/AbrtConfiguration
User can initiate the report using the ABRT command line utility. Later
on, we can integrate Foreman to trigger ABRT report automatically on
exception or something like that - this is I guess out of scope of this
effort.
Now, I am going to collect these files (skipped is not found):
-
some typical information (cpu, memory, etc)
-
ip addresses, hostname
-
iptables output
-
DNS resolve: localhost, hostname
-
content of /etc/hosts
-
foreman rails log
-
proxy main log
-
dhcp, dns, tftp log
-
libvirt log
-
virsh list output (?)
-
foreman settings.yml and database.yml
-
postgresql configuration
-
proxy setting.yml
-
foreman database table "settings" (?)
-
puppet main configuration
-
puppetmasterd log
-
puppet logs (?)
-
puppet certificates (serial ids)
(The first part can be optionally disabled - this is for the ABRT mode
because ABRT already collects this.)
The idea is you can run this on any server (e.g. DHCP server, DNS
server) and logs are collected if the relevant files are found.
We have been pretty successful with katello-debug-certificates which
prints out serial ids of all certificates and their CAs. I will
incorporate the same behavior into foreman-debug directly.
Opinions? Additional items or ideas?
···
-- Later,Lukas “lzap” Zapletal
irc: lzap #theforeman