spacewalk-report

8

`spacewalk-report`

Generate reports from Spacewalk server in csv format

            spacewalk-report
            --info

            spacewalk-report

              --multival-on-rows
              --multival-separator=separator-string

            --info

            --list-fields--list-fields-info

            --where-column-id=VALUE

            --ne-where-column-id=VALUE

            --le-where-column-id=VALUE

            --ge-where-column-id=VALUE

            --like-column-id=VALUE

            --timezone=VALUE

            --legacy-report

            report-name

## Description

The `spacewalk-report` command can be used to generate canned reports from Spacewalk server database. The report which will be generated is selected by specifying its name as a parameter to `spacewalk-report`.

If the report name is not specified, list of available report names is printed, one name per line.

## Options

--info

- When listing available reports, also print synopsis for each report.

  When used with report name specified, print synopsis and description for the report, instead of running the report.

--multival-on-rows

- If certain field can have multiple values, you can use this option to have records for the entity repeated in output in the form of cartesian product. By default, those multiple values are presented on one row in one field, separated by semicolon.

--multival-separator=`separator-string`

- If multiple values are output on one row (the default), this option can change the string which separates multiple values in one field. The default is semicolon.

--list-fields

- Instead of running the report, shows fields that the report has, one field name per line.

--list-fields-info

- Instead of running the report, shows fields that the report has, one field name per line, and a description of that field.

--where-`column-id`=`VALUE`

- Limit the output to records where column-id has value VALUE. It can be used multiple times -- for the same column it will select records where the column has any of the VALUEs. When different columns are specified, all of them have to meet the condition.

--ne-where-`column-id`=`VALUE`

- Limit the output to records where column-id does not have value VALUE. It can be used multiple times -- for the same column it will select records where the column does not have any of the VALUEs. When different columns are specified, all of them have to meet the condition.

--le-where-`column-id`=`VALUE`

- Limit the output to records where column-id has value less than or equal to VALUE. It can be used multiple times -- for the same column it will select records where the column is less than or equal to all of the VALUEs. When different columns are specified, all of them have to meet the condition.

--ge-where-`column-id`=`VALUE`

- Limit the output to records where column-id has value greater than or equal to VALUE. It can be used multiple times -- for the same column it will select records where the column is greater than or equal to all of the VALUEs. When different columns are specified, all of them have to meet the condition.

--like-`column-id`=`VALUE`

- Limit the output to records where column-id has value like VALUE. This applies for string values only. It can be used multiple times -- for the same column it will select records where the column has any of the VALUEs. When different columns are specified, all of them have to meet the condition. Regular expressions for like clause are described by SQL standard. Most common wildcards are _ for any single character and % for multiple occurrences of any character.

--param=`PARAM`=`VALUE`

- Overwrite the default report parameter value

--timezone=`VALUE`

- As all dates are reported as in UTC timezone, this option sets the timezone to the custom one. List of applicable timezones may differ depending on your database backend. Common examples: CET, Europe/Prague; +7 for Postgresql database backend, +07:00 for Oracle one.

--legacy-report

- Use the legacy report definition instead of the one for the reporting database.

  Since the introduction of the reporting database, spacewalk-report targets by default the reporting database. This leads to some minor differences in the structure and the format of the report produced. If these differences are problematic, this flag can be used to fall back to the old reports which use only the application database.

## Authors

- Jan Pazdziora
- Tomas Kasparek