Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Log job modifications

#266

Whenever a job is created, modified or deleted, it should be logged. This could be the service.log or a separate log file. Information must include:

  • User
  • Time
  • Job group/name

Nice to haves for job updates, distinguish if it is a

  • sequence change
  • step change
  • option change

Reported by Alex-SF · April 26th, 2011 @ 11:05 AM

State: resolved
Milestone: Rundeck 1.3
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Deleted User
    Deleted User

    Like the ability to trace where the job was copied from before the modification.

    April 26th, 2011 @ 11:25 AM

  2. Greg Schueler
    Greg Schueler

    what is the difference between "sequence change" and "step change"? do you mean re-order of workflow sequence, vs. modification of a step?

    Also, how about: method of job modification, e.g. XML uploade, API, GUI?

    • also track Job ID to correlate b/w name changes

    So something like this?

    greg [timestamp] [ID1] "some/job" * MODIFIED: workflow[+1,-2,*3], options[+1], nodefilter, description
    greg [timestamp] [ID2] "another/job" * CREATED
    greg [timestamp] [ID3] "third/job" * DELETED
    

    The +1,-2 etc are perhaps optimistic because recording simplified diff between workflow changes might not be possible/easy.

    April 26th, 2011 @ 11:31 AM

  3. Alex-SF
    Alex-SF

    Sequence change meant adding/re-ordering the steps.
    Yah method of job modification is important.

    April 26th, 2011 @ 11:34 AM

  4. Alex-SF
    Alex-SF

    BTW, if we ultimately start serializing job defs to a file on disk, then perhaps characterizing the kind of change in the log is less important.

    April 26th, 2011 @ 11:35 AM

  5. Deleted User
    Deleted User

    +1

    If there on disk, then you can use diff to compare them (or some equivalent tool). Probably fits into an existing tool chain much easier.

    April 26th, 2011 @ 11:49 AM

  6. Greg Schueler
    Greg Schueler

    here's some sample output using this log4j format:

    [%d{ISO8601}] %X{user} %X{change} [%X{id}] %X{project} "%X{groupPath}/%X{jobName}" (%X{method})%n

    [2011-04-26 17:28:39,976] admin create [254] test "api-test/job-delete/cli job" (apiJobsImport)
    [2011-04-26 17:28:40,096] admin delete [254] test "api-test/job-delete/cli job" (apiJobDelete)
    [2011-04-26 17:28:40,334] admin create [255] test "test/api/test job/executions" (apiJobsImport)
    [2011-04-26 17:28:46,547] admin create [256] test "test/api/test job/executions 2" (apiJobsImport)
    [2011-04-26 17:28:49,915] admin create [257] test "test/api/test job/executions 3" (apiJobsImport)
    [2011-04-26 17:28:53,550] admin create [258] test "api-test/job-export/cli job" (apiJobsImport)
    [2011-04-26 17:28:53,916] admin create [259] test "api-test/job-run/cli job" (apiJobsImport)
    [2011-04-26 17:28:59,170] admin create [260] test "api-test/job-run/cli job" (apiJobsImport)
    [2011-04-26 17:29:01,596] admin create [261] test "-/cli job2" (apiJobsImport)
    [2011-04-26 17:29:01,677] admin create [262] test "-/cli job2" (apiJobsImport)
    [2011-04-26 17:29:01,787] admin create [263] test "api-test/cli job" (apiJobsImport)
    [2011-04-26 17:29:01,902] admin create [264] test "api-test/cli job" (apiJobsImport)
    

    April 26th, 2011 @ 05:33 PM

  7. Alex-SF
    Alex-SF

    Looks good for starters.

    April 27th, 2011 @ 11:32 AM

  8. Greg Schueler
    Greg Schueler
    • Assigned user set to Greg Schueler

    April 27th, 2011 @ 01:11 PM

  9. Deleted User
  10. Greg Schueler
    Greg Schueler
    • State changed from new to open

    committed this log format.

    log is written to rundeck.jobs.log

    April 29th, 2011 @ 10:22 AM

  11. Deleted User
  12. Deleted User
  13. Deleted User
  14. Greg Schueler
    Greg Schueler
    • State changed from open to needs_verification

    June 3rd, 2011 @ 04:33 PM

  15. Alex-SF
    Alex-SF
    • Tag set to audit, jobs
    • State changed from needs_verification to resolved

    June 8th, 2011 @ 09:29 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.