7 SMT Reports #
This chapter explains how to generate reports using the data from the SMT and SUSE Customer Center. These reports contain statistics of all the registered machines, products used and all active, expiring or missing subscriptions.
If you are using more than one SMT server, generated reports may not include all SMT servers or machines in your environment. For the complete statistics of all your registered machines, refer to the information in the SUSE Customer Center.
7.1 Report Schedule and Recipients #
Generated SMT reports can be periodically sent to a list of specified e-mail addresses. To create or edit this list and to set the frequency of the reports, use the YaST SMT Configuration module. How to configure this list is described in Section 3.4, “Setting E-mail Addresses to Receive Reports with YaST”. Configuration of the report schedule is covered in Section 3.5, “Setting the SMT Job Schedule with YaST”.
The list can also be edited manually in the reportEmail
part of the /etc/smt.conf configuration file. For
more information about manually editing the list of addresses, see
Section 8.2.1.6, “[REPORT] Section of /etc/smt.conf”. To set the frequency of
reports manually, you can edit the
smt-gen-report lines of the crontab in
/etc/cron.d/novell.com-smt. For more information
about the crontab format, see man 5 crontab.
Reports, including those generated as a scheduled SMT job, are created by
the smt-report command. This command supports various
parameters. To edit parameters used with scheduled commands, edit the
/etc/smt.d/smt-cron.conf configuration file. For
more information, see Section 8.2.2, “/etc/smt.d/smt-cron.conf”.
7.2 Report Output Formats and Targets #
SMT reports can be printed to the standard output, exported to one or
multiple files (in the CSV format), and mailed to a specified list of
e-mail addresses. The following parameters can be used with the
smt-report command:
--quietor-qSuppress output to STDOUT and run
smt-reportin quiet mode.--fileor-FExport the report to one or several files. By default, the report is written to a single file, with the results formatted as tables. Optionally, the file name or whole path may be specified after the parameter:
--file FILENAME. If no file name is specified, the default file name containing a time stamp is used. However, SMT will not check if the file or files already exist.In the CSV (Comma-Separated Value) mode, the report is written to multiple files, therefore the specified file name expands to
[PATH/]FILENAME-reportname.extensionfor every report.--csvor-cThe report is exported to multiple files in the CSV format. The first line of each *.csv file consists of the column names. It is recommended to use the
--csvparameter together with the--fileparameter. If the specified file name contains a.csvextension, the report format will be CSV (as if the--csvparameter was used).--mailor-mSend the report to the addresses configured using the YaST SMT Configuration module and stored in
/etc/smt.conf. The report is rendered as tables.--attachor-aAttach the report to the mails in the CSV format. This option should only be used in combination with the
--mailoption.--pdfThe report is exported to multiple files in the PDF format.
--xmlThe report is exported to multiple files in the XML format.
To disable sending CSV attachments with report mails, edit
the /etc/smt.d/smt-cron.conf configuration file as
follows: remove the --attach option from the
REPORT_PARAMS value. The default line reads:
REPORT_PARAMS="--mail --attach -L
/var/log/smt-report.log". To disable CSV attachments, change
it to: REPORT_PARAMS="--mail -L
/var/log/smt-report.log".
If you have disabled CSV attachments but need them occasionally, you can
send them manually with the smt-report --mail --attach -L
/var/log/smt-report.log command.