[pmg-devel] [PATCH pmg-api v2 0/3] add pmg-system-report

Stoiko Ivanov s.ivanov at proxmox.com
Mon Feb 11 15:43:05 CET 2019


Given the good experiences we have with `pvereport` in our Enterprise Support
(it gives us a standartized initial information set, which quite often contains
everything needed to troubleshoot a given case), `pmg-system-report` should
provide the same comfort for PMG.

The name was chosen, because `pmgreport` is already taken, and all other
abbreviations I thought of also might cause confusion (pmgsr, pmgstatus,
pmginfo). However I'd be very glad about other suggestions.

Both PMG::Report and bin/pmg-system-report were intially taken from pvereport
(in the pve-manager repo) and adapted in the following way:
* change of imports and command-invocations from pve to pmg
  (e.g. pmgsubscription get)
* dropping information not available on pmg (pvesm, qm, pct, pve-firewall)
* dropping information which I considered less useful:
  * lscpu
  * bios
  * zfs, lvm, multipath information (the generic findmnt, lsblk, fstab info
    should be enough).
* adding pmg specific information:
  * /etc/resolv.conf
  * DNS-resolution through SpamAssassin
  * pmgconfig dump
  * pmgdb dump (this should give us the complete ruleset)
  * sa-awl

The second patch adds the priority, direction and active information to
`pmgdb dump` in order to get the full picture. I glanced through our sources
(pmg-api, pmg-gui, pmg-docs, pmg-log-tracker) for users of `pmgdb dump`, and
did not see anything, which might break through the change of output. However I
might have missed something and would be glad for feedback from more
experienced eyes.

Changes from v1:
* added sa-awl output to pmg-section of the report
* added direction output to pmgdb dump output

Stoiko Ivanov (3):
  close #1917: add pmg-system-report command
  extend `pmgdb dump`
  bsys: add pmg-system-report + manpage to Makefile

 Makefile              |  10 +++-
 PMG/CLI/pmgdb.pm      |  10 +++-
 PMG/Report.pm         | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++
 bin/pmg-system-report |  23 +++++++++
 4 files changed, 174 insertions(+), 3 deletions(-)
 create mode 100644 PMG/Report.pm
 create mode 100755 bin/pmg-system-report

-- 
2.11.0




More information about the pmg-devel mailing list