Skip to content

Conversation

jirihnidek
Copy link
Contributor

@jirihnidek jirihnidek commented Jul 2, 2025

  • Card ID: CCT-1439
  • Added all rhc collector sub-commands, but most of them are no-op ATM
  • rhc collector run
  • run rhc collector run as non-root user
  • rhc collector info
  • rhc collector list
  • rhc collector timers
  • rhc collector enable
  • rhc collector disable

* Card ID: CCT-1439
* Added all "rhc collector" sub-commands, but most of them
  are no-op ATM
* Implemented "rhc collector list"
* Implemented "rhc collector list --format json"

Signed-off-by: Jiri Hnidek <[email protected]>
* Card ID: CCT-CCT-1439
* It does not display all required information, but
  it display majority of information
* The output to JSON format is also limited

Signed-off-by: Jiri Hnidek <[email protected]>
* Card ID: CCT-1439
* It is possible to run collector, archiver and uploader
* The output to JSON format is not implemented yet

Signed-off-by: Jiri Hnidek <[email protected]>
* Each collector sub-command was moved to its own
  module.

Signed-off-by: Jiri Hnidek <[email protected]>
* When version command is defined in the collector configuration
  file, then this version command is used for gathering version
* When it is not possible to run run version command, then the
  error is written to log and "-" is used on the place of version
  value

Signed-off-by: Jiri Hnidek <[email protected]>
* When "/bin/bash -c" is used for running commands, then it is
  possible to use all features of bash (e.g. set env. var. in
  the command, redirect stderr, etc.)

Signed-off-by: Jiri Hnidek <[email protected]>
* The content_type should be specified as CLI option
  of uploader. No need to set it as configuration
  option of uploader

Signed-off-by: Jiri Hnidek <[email protected]>
* It is possible to enable and disable collector timer
  and start service using --now

Signed-off-by: Jiri Hnidek <[email protected]>
* Information about timers was added
* The last_run.json is also used
* Some refactoring

Signed-off-by: Jiri Hnidek <[email protected]>
* Moved some generic code to collector.go
* The "run collector" just prints help

Signed-off-by: Jiri Hnidek <[email protected]>
* The user can be defined in the collector config in the exec section

  [exec]
  user = <USERNAME>

* When user is not defined, then collector is run using current user
* The user used for running collector has to be member of grou
  `rhc-collector`
* Small changes not related to this commit. ;-)

Signed-off-by: Jiri Hnidek <[email protected]>
* The /var/cache/rhc/collector.d/<COLLECTOR_ID> has to be
  writable by system user and group used for running
  collector
* Small refactoring

Signed-off-by: Jiri Hnidek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant