Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

ainfo satprep_snapshot

Christian Stankowic edited this page Dec 21, 2015 · 8 revisions

satprep_snapshot.py is used to create snapshots including information about available errata and patches to managed systems. Additionally the script checks all hosts for additional meta information (using custom keys). These reports are used by satprep_diff.py to create patch reports.

#Parameters

Parameter Description
-a / --auth-file defines an auth file to use instead of shell variables - see the [[wiki
-s / --server defines the server to use
-q / --quiet don't print status messages to stdout
-d / --debug enable debugging outputs
-o / --output define CSV report filename. (default: errata-snapshot-report-RHNhostname-Ymd.csv)
-p / --exclude-patches defines whether package updates that are not part of an erratum shall be excluded (default: no)
-l / --include-locked also includes locked systems (default: no)
-r / --reconnect-threshold defines after how many host scans a re-login should be done (XMLRPC API timeout workaround, default: 5)

#Report fields A generated report containts the following fields:

Field Description
hostname system hostname
ip system IP address
errata_name name of erratum/patch
errata_type type of erratum (security/bugfix/product enhancement advisory)
errata_desc erratum description
errata_date release date
errata_reboot flag whether the erratum suggests a system reboot (reboot_suggested erratum flag)
system_owner system's owner (SYSTEM_OWNER custom info)
system_cluster flag whether system is a cluster node (SYSTEM_CLUSTER custom info)
system_virt flag whether the system is a virtual guest
system_virt_snapshot flag whether the system needs to be protected by a VM snapshot (SYSTEM_VIRT_SNAPSHOT custom info)
system_virt_vmname differing hostname on virtualization host (SYSTEM_VIRT_VMNAME custom info)
system_monitoring flag whether the system is monitored (SYSTEM_MONITORING custom info)
system_monitoring_notes notes regarding monitoring state (SYSTEM_MONITORING_NOTES custom info)
system_monitoring_name differing hostname inside monitoring (SYSTEM_MONITORING_NAME custom info)
system_backup flag whether system is backed up (SYSTEM_BACKUP custom info)
system_backup_notes notes regarding backup state (SYSTEM_BACKUP_NOTES custom info)
system_antivir flag whether the system is anti-virus protected (SYSTEM_ANTIVIR custom info)
system_antivir_notes notes regarding anti-virus protection state (SYSTEM_ANTIVIR_NOTES custom info)

#Examples Create a snapshot report including errata and conventional patches:

$ ./satprep_snapshot.py

Create a snapshot report only including errata from a remote server, using an auth file:

$ ./satprep_snapshot.py -s mysat.localdomain.loc -a authfile

Create a snapshot specifying custom fields and field order and a custom output file:

$ ./satprep_snapshot.py -o myreport.csv
Clone this wiki locally