Giter Club home page Giter Club logo

combined_log_job_done_parser's Introduction

RDM Combined Log Parser

A quick and dirty ruby script to extract all log entries denoting the completion of a NEOCAST job from a combined log

This program expects the full path of the combined log to parse as the first command line argument

This program will output to standard out Tab Delimited of the following:

  1. DateTime of log entry
  2. Job Name
  3. Job ID
  4. Job Duration

This program will also output the following headers for later analysis in a spreadsheet:

  1. Unique Job
  2. Min
  3. Max
  4. Average
  5. Job Count

An example of the entries the script will extract for Tab Delimited output: Aug 10 06:24:34 localhost neocast-queue: 2020-08-10T06:24:34.993Z 18113 TID-goie5j8g5 Neocast::Gateway::Jobs::SaveLogsJob JID-aed615fc84305c5a7865f9ab INFO: done: 0.106 sec

The Tab Delimited output can be redirected to a file if desired for import into a spreadsheet program of choice for further analysis

If no command line argument is provided, the program will output a delimited list of the formula specified below that can be copy and pasted into cell E2. For some reason, Google Sheets does not correctly utilize the formula if embedded directly in the initial tab-delimted output.

NOTE: I chose tab-delimited because the formulas contain commas which a CSV parser will break upon and render the formula useless.

Google Sheets snippets

Procedure to setup a Google Sheet

  1. Import the Tab Delimited output into a Google Sheet:
    1. Replace Current Sheet
    2. Tab as delimiter
    3. Yes for Convert text to numbers
  2. Unique Job Listing - In cell E2 paste the following formula:
    1. =UNIQUE(B2:B)
  3. Minimum Job Duration - In cell F2 paste the following, deleting/adding as necessary:
    1. =MINIFS(D2:D, B2:B,E2)
    2. =MINIFS(D2:D, B2:B,E3)
    3. =MINIFS(D2:D, B2:B,E4)
    4. =MINIFS(D2:D, B2:B,E5)
    5. =MINIFS(D2:D, B2:B,E6)
    6. =MINIFS(D2:D, B2:B,E7)
    7. =MINIFS(D2:D, B2:B,E8)
    8. =MINIFS(D2:D, B2:B,E9)
    9. =MINIFS(D2:D, B2:B,E10)
    10. =MINIFS(D2:D, B2:B,E11)
    11. =MINIFS(D2:D, B2:B,E12)
    12. =MINIFS(D2:D, B2:B,E13)
    13. =MINIFS(D2:D, B2:B,E14)
    14. =MINIFS(D2:D, B2:B,E15)
    15. =MINIFS(D2:D, B2:B,E16)
    16. =MINIFS(D2:D, B2:B,E17)
    17. =MINIFS(D2:D, B2:B,E18)
    18. =MINIFS(D2:D, B2:B,E19)
    19. =MINIFS(D2:D, B2:B,E20)
    20. =MINIFS(D2:D, B2:B,E21)
    21. =MINIFS(D2:D, B2:B,E22)
    22. =MINIFS(D2:D, B2:B,E23)
  4. Maximum Job Duration - In cell G2 paste the following, deleting/adding as necessary:
    1. =MAXIFS(D2:D, B2:B,E2)
    2. =MAXIFS(D2:D, B2:B,E3)
    3. =MAXIFS(D2:D, B2:B,E4)
    4. =MAXIFS(D2:D, B2:B,E5)
    5. =MAXIFS(D2:D, B2:B,E6)
    6. =MAXIFS(D2:D, B2:B,E7)
    7. =MAXIFS(D2:D, B2:B,E8)
    8. =MAXIFS(D2:D, B2:B,E9)
    9. =MAXIFS(D2:D, B2:B,E10)
    10. =MAXIFS(D2:D, B2:B,E11)
    11. =MAXIFS(D2:D, B2:B,E12)
    12. =MAXIFS(D2:D, B2:B,E13)
    13. =MAXIFS(D2:D, B2:B,E14)
    14. =MAXIFS(D2:D, B2:B,E15)
    15. =MAXIFS(D2:D, B2:B,E16)
    16. =MAXIFS(D2:D, B2:B,E17)
    17. =MAXIFS(D2:D, B2:B,E18)
    18. =MAXIFS(D2:D, B2:B,E19)
    19. =MAXIFS(D2:D, B2:B,E20)
    20. =MAXIFS(D2:D, B2:B,E21)
    21. =MAXIFS(D2:D, B2:B,E22)
    22. =MAXIFS(D2:D, B2:B,E23)
  5. Average Job Duration - In cell H2 paste the following, deleting/adding as necessary:
    1. =AVERAGEIFS(D2:D, B2:B,E2)
    2. =AVERAGEIFS(D2:D, B2:B,E3)
    3. =AVERAGEIFS(D2:D, B2:B,E4)
    4. =AVERAGEIFS(D2:D, B2:B,E5)
    5. =AVERAGEIFS(D2:D, B2:B,E6)
    6. =AVERAGEIFS(D2:D, B2:B,E7)
    7. =AVERAGEIFS(D2:D, B2:B,E8)
    8. =AVERAGEIFS(D2:D, B2:B,E9)
    9. =AVERAGEIFS(D2:D, B2:B,E10)
    10. =AVERAGEIFS(D2:D, B2:B,E11)
    11. =AVERAGEIFS(D2:D, B2:B,E12)
    12. =AVERAGEIFS(D2:D, B2:B,E13)
    13. =AVERAGEIFS(D2:D, B2:B,E14)
    14. =AVERAGEIFS(D2:D, B2:B,E15)
    15. =AVERAGEIFS(D2:D, B2:B,E16)
    16. =AVERAGEIFS(D2:D, B2:B,E17)
    17. =AVERAGEIFS(D2:D, B2:B,E18)
    18. =AVERAGEIFS(D2:D, B2:B,E19)
    19. =AVERAGEIFS(D2:D, B2:B,E20)
    20. =AVERAGEIFS(D2:D, B2:B,E21)
    21. =AVERAGEIFS(D2:D, B2:B,E22)
    22. =AVERAGEIFS(D2:D, B2:B,E23)
  6. Job Count - In cell I2 paste the following, deleting/adding as necessary:
    1. =COUNTIFS(B2:B, E2)
    2. =COUNTIFS(B2:B, E3)
    3. =COUNTIFS(B2:B, E4)
    4. =COUNTIFS(B2:B, E5)
    5. =COUNTIFS(B2:B, E6)
    6. =COUNTIFS(B2:B, E7)
    7. =COUNTIFS(B2:B, E8)
    8. =COUNTIFS(B2:B, E9)
    9. =COUNTIFS(B2:B, E10)
    10. =COUNTIFS(B2:B, E11)
    11. =COUNTIFS(B2:B, E12)
    12. =COUNTIFS(B2:B, E13)
    13. =COUNTIFS(B2:B, E14)
    14. =COUNTIFS(B2:B, E15)
    15. =COUNTIFS(B2:B, E16)
    16. =COUNTIFS(B2:B, E17)
    17. =COUNTIFS(B2:B, E18)
    18. =COUNTIFS(B2:B, E19)
    19. =COUNTIFS(B2:B, E20)
    20. =COUNTIFS(B2:B, E21)
    21. =COUNTIFS(B2:B, E22)
    22. =COUNTIFS(B2:B, E23)

combined_log_job_done_parser's People

Contributors

jmoons avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.