Project

General

Profile

Actions

Feature #24135

closed

Reduce/filter output of reporting info when submitting via salt api

Added by Ben Howell over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Reports
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Currently when running upload-salt-reports while logging is at "INFO", the entire highstate report gets published unfiltered into the production.log:

2018-07-02T15:53:20 713bdfc3 [app] [I] Started POST "/salt/api/v2/jobs/upload" for 192.168.1.228 at 2018-07-02 15:53:20 -0500
2018-07-02T15:53:20 713bdfc3 [app] [I] Processing by ForemanSalt::Api::V2::JobsController#upload as JSON
2018-07-02T15:53:20 713bdfc3 [app] [I]   Parameters: {"job"=>{"function"=>"state.highstate", "result"=>{"foreman-rutabaga.thecitybase.net"=>{"pkg_|-basic-packag
es_|-basic-packages_|-installed"=>{"comment"=>"3 targeted packages were installed/updated.\nThe following packages were already installed: strace, screen, vim",
 "name"=>"basic-packages", "start_time"=>"20:28:25.831402", "result"=>true, "duration"=>41136.155, "__run_num__"=>1, "__sls__"=>"basic_packages", "changes"=>{"m
...
L"}, "__id__"=>"add_sre_users_to_sudoers"}}}, "job_id"=>"20180702202819503701"}, "apiv"=>"v2"}
2018-07-02T15:53:20 713bdfc3 [app] [I] Current user: foreman_api_admin (administrator)
2018-07-02T15:53:20 713bdfc3 [app] [I] Processing job 20180702202819503701 from Salt.
2018-07-02T15:53:20 713bdfc3 [app] [I] Completed 200 OK in 84ms (Views: 0.3ms | ActiveRecord: 9.3ms)

Would it be possible to filter the output of the highstate data before logging? This only appears in "INFO" so it's not a problem if using "WARN" or higher.

Actions #1

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Bernhard Suttner
  • Pull request https://github.com/theforeman/foreman_salt/pull/120 added
Actions #2

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases 11.0.0 added
Actions #3

Updated by Bernhard Suttner over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Bernhard Suttner over 4 years ago

  • Fixed in Releases 13.2.0 added
  • Fixed in Releases deleted (11.0.0)
Actions

Also available in: Atom PDF