Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send interim report at a cadence before final CME report #339

Open
mgalloy opened this issue Sep 7, 2023 · 14 comments
Open

Send interim report at a cadence before final CME report #339

mgalloy opened this issue Sep 7, 2023 · 14 comments
Assignees
Labels
enhancement new feature
Milestone

Comments

@mgalloy
Copy link
Member

mgalloy commented Sep 7, 2023

Send an interim report at a cadence (default 5 min) before the final report. The report would be exactly the same except with a different subject: "Interim report" and "Final report".

Specify cadence in configuration file: cme/report_interval with default 300.0 (5 minutes).

@mgalloy mgalloy added the enhancement new feature label Sep 7, 2023
@mgalloy mgalloy added this to the CME detection milestone Sep 7, 2023
@mgalloy mgalloy self-assigned this Sep 7, 2023
mgalloy added a commit that referenced this issue Sep 24, 2023
@mgalloy
Copy link
Member Author

mgalloy commented Sep 24, 2023

Do the interim reports get sent as JSON alerts as well?

@mgalloy mgalloy added the questions coding is stoppped to determine correct path label Sep 24, 2023
@jburkepile
Copy link
Collaborator

jburkepile commented Sep 25, 2023

I haven't explicitly asked them but I think they would answer yes. That is there way to get data into the scoreboard. I need to look at the current JSON files and see if there is any other info we may want to add to an interim report JSON.

Good question. Thanks for asking.

@mgalloy
Copy link
Member Author

mgalloy commented Sep 25, 2023

I guess the real question is how should interim reports be marked. Should there be a a new alert_type: "SUMMARY" and "INTERIM"?

@jburkepile
Copy link
Collaborator

'INTERIM' is perfect for the updated report info jsons. I would call the last report json 'FINAL'

mgalloy added a commit that referenced this issue Sep 25, 2023
@mgalloy mgalloy removed the questions coding is stoppped to determine correct path label Sep 25, 2023
@mgalloy
Copy link
Member Author

mgalloy commented Sep 26, 2023

The cadence of the sent interim reports doesn't match exactly with the cadence specified in the config file. In testing, I set the cadence to 300 sec, but it is more like 420 or more seconds.

@jburkepile
Copy link
Collaborator

jburkepile commented Sep 26, 2023

@mgalloy Can you identify the reason for the increase in cadence? Is that due to generating the json file and interim plots and csv file? I would think they would only take seconds to produce. We do want to send those every 5 minutes and send them along with the heartbeats. Let's talk tomorrow at our 10 AM meeting. Thanks!

@mgalloy
Copy link
Member Author

mgalloy commented Sep 26, 2023

I think it is where I am testing for whether to send a report is "deeper" in the hierarchy of if statements that doesn't always happen, even during a CME. I could move it out to where the heartbeat cadence is tested for.

@jburkepile
Copy link
Collaborator

That sounds good. It is a lot of work to change the logic to have it tested with the heartbeat cadence?

@mgalloy
Copy link
Member Author

mgalloy commented Sep 27, 2023

Trying a run with the check at the top level where the heartbeat check is...

@mgalloy
Copy link
Member Author

mgalloy commented Sep 27, 2023

This didn't help either:

mlso_kcor.2013-12-16T194907Z.2013-12-16T195121Z.json   ALERT         CME     109.50 deg
mlso_kcor.2013-12-16T195146Z.2013-12-16T195557Z.json   INTERIM       CME     114.00 deg
mlso_kcor.2013-12-16T195649Z.2013-12-16T200302Z.json   INTERIM       CME     112.50 deg
mlso_kcor.2013-12-16T195649Z.2013-12-16T201237Z.json   INTERIM       CME     112.50 deg
mlso_kcor.2013-12-16T195649Z.2013-12-16T202103Z.json   INTERIM       CME     112.50 deg
mlso_kcor.2013-12-16T195649Z.2013-12-16T203013Z.json   INTERIM       CME     112.50 deg
mlso_kcor.2013-12-16T195649Z.2013-12-16T203959Z.json   INTERIM       CME     112.50 deg
mlso_kcor.2013-12-16T195649Z.2013-12-16T204759Z.json   INTERIM       CME     112.50 deg
mlso_kcor.2013-12-16T204638Z.2013-12-16T204934Z.json   SUMMARY       clear   250.50 deg
mlso_kcor.2013-12-16T204615Z.2013-12-16T204944Z.json   ALERT         CME     250.50 deg
mlso_kcor.2013-12-16T205141Z.2013-12-16T205544Z.json   INTERIM       CME     247.50 deg
mlso_kcor.2013-12-16T210047Z.2013-12-16T210320Z.json   INTERIM       CME     246.00 deg
mlso_kcor.2013-12-16T210822Z.2013-12-16T211105Z.json   INTERIM       CME     247.50 deg
mlso_kcor.2013-12-16T211411Z.2013-12-16T215657Z.json   SUMMARY       clear   246.00 deg

@mgalloy
Copy link
Member Author

mgalloy commented Sep 27, 2023

I think the clock when running in simulation mode is inaccurate.

@mgalloy
Copy link
Member Author

mgalloy commented Sep 29, 2023

This looks better:

16$ kcor alert --by-issue-time | grep -v heartbeat
mlso_kcor.2013-12-16T194907Z.2013-12-16T195106Z.json   ALERT         CME     109.50 deg   # initial
mlso_kcor.2013-12-16T195146Z.2013-12-16T195431Z.json   INTERIM       CME     114.00 deg   # 3:25
mlso_kcor.2013-12-16T195649Z.2013-12-16T195936Z.json   INTERIM       CME     112.50 deg   # 5:05
mlso_kcor.2013-12-16T195649Z.2013-12-16T200437Z.json   INTERIM       CME     112.50 deg   # 5:01
mlso_kcor.2013-12-16T195649Z.2013-12-16T200947Z.json   INTERIM       CME     112.50 deg   # 5:10
mlso_kcor.2013-12-16T195649Z.2013-12-16T201447Z.json   INTERIM       CME     112.50 deg   # 5:00
mlso_kcor.2013-12-16T195649Z.2013-12-16T201952Z.json   INTERIM       CME     112.50 deg   # 5:05
mlso_kcor.2013-12-16T195649Z.2013-12-16T202453Z.json   INTERIM       CME     112.50 deg   # 5:01
mlso_kcor.2013-12-16T195649Z.2013-12-16T202958Z.json   INTERIM       CME     112.50 deg   # 5:05
mlso_kcor.2013-12-16T195649Z.2013-12-16T203503Z.json   INTERIM       CME     112.50 deg   # 5:05
mlso_kcor.2013-12-16T195649Z.2013-12-16T204008Z.json   INTERIM       CME     112.50 deg   # 5:05
mlso_kcor.2013-12-16T195649Z.2013-12-16T204513Z.json   INTERIM       CME     112.50 deg   # 5:05
mlso_kcor.2013-12-16T204638Z.2013-12-16T204749Z.json   SUMMARY       clear   250.50 deg   # 2:36
mlso_kcor.2013-12-16T204615Z.2013-12-16T204804Z.json   ALERT         CME     250.50 deg   # initial
mlso_kcor.2013-12-16T204955Z.2013-12-16T205139Z.json   INTERIM       CME     249.00 deg   # 3:35
mlso_kcor.2013-12-16T205458Z.2013-12-16T205649Z.json   INTERIM       CME     249.00 deg   # 5:10
mlso_kcor.2013-12-16T205901Z.2013-12-16T210154Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T210319Z.2013-12-16T210659Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T210938Z.2013-12-16T211203Z.json   INTERIM       CME     247.50 deg   # 5:04
mlso_kcor.2013-12-16T211411Z.2013-12-16T211704Z.json   INTERIM       CME     246.00 deg   # 5:01
mlso_kcor.2013-12-16T211411Z.2013-12-16T212209Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T211411Z.2013-12-16T212714Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T211411Z.2013-12-16T213215Z.json   INTERIM       CME     246.00 deg   # 5:01
mlso_kcor.2013-12-16T211411Z.2013-12-16T213720Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T211411Z.2013-12-16T214225Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T211411Z.2013-12-16T214730Z.json   INTERIM       CME     246.00 deg   # 5:05
mlso_kcor.2013-12-16T211411Z.2013-12-16T215231Z.json   INTERIM       CME     246.00 deg   # 5:01
mlso_kcor.2013-12-16T211411Z.2013-12-16T215651Z.json   SUMMARY       clear   246.00 deg   # 4:20

@mgalloy
Copy link
Member Author

mgalloy commented Sep 29, 2023

I've updated the listing of alerts above with interval between them. The time between interim alerts is very close to 5 minutes now. The time between an initial alert and an interim alert, or between and interim alert and the summary alert, is not necessarily close to 5 minutes because the other alerts are firing on a different system.

@mgalloy mgalloy closed this as completed Sep 29, 2023
@jburkepile jburkepile reopened this May 9, 2024
@jburkepile
Copy link
Collaborator

jburkepile commented May 9, 2024

No rush on this task.

The current filenames of the PNG plots and CSV files for the interim and final reports are identical. Need to update the filenames with each interim report. Currently, if you wish to save the interim report information then the previous files are overwritten unless you manually change the filenames, and that is a hassle.

Current filenames:

  • yyyymmdd.hhmmss.cme_plot.png
  • yyyymmdd.hhmmss.cme_plot.csv

where the time is the first alert time which is fixed

New filenames:

  • increment filename by one: yyyymmdd.hhmmss.cme_plot_1.png [same for .csv], 2nd interim report filename: yyyymmdd.hhmmss.cme_plot_2.png, etc.
  • change final report filenames to: yyyymmdd.hhmmss.cme_plot_final.png [same for .csv]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature
Projects
None yet
Development

No branches or pull requests

2 participants