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

Engine activity tracker #433

Open
johnml1135 opened this issue Jul 16, 2024 · 3 comments
Open

Engine activity tracker #433

johnml1135 opened this issue Jul 16, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@johnml1135
Copy link
Collaborator

Being able to see, for a specific engine, has there been any activity on this engine lately could be helpful for understanding the usage, both for things like Acts2 but also for our own internal teams to monitor usage. Here are a few ideas as to how this may be able to work, and how it could be integrated into a larger monitoring system:

  1. Super simple
  • Per engine, the last call is recorded and retrievable, along with when that call was made.
  • This can be used to ask the simple question, "is this project active"? but little more.
  1. Digested Data
  • Per engine, have a data structure of each call that could be made on the engine with the number of total calls and the time of the last call. That can determine a bit more, including how active the project is overall, but doesn't show progression over time, and can't determine how the call was made, nor anything about the calls.
  1. Running list of commands run against an engine
  • Have a running list of calls to the API, with some form of discarding old commands (time or number) after a period of time
  • This can be stored in the following ways:
    a. As a list of the last 100 commands run against an engine, stored in the engine data structure (FIFO)
    b. As a list of the last 100,000 commands run against Serval, stored separately
    c. As logs output and collected and analyzed by Loki - then export it (issue - it is not as easy as it seems - it would be hard to integrate with other data.

If we can make (3c) work, it would be simplest (in terms of data format and data handling), and most robust. It's all about if we can actually make it work...

@johnml1135 johnml1135 added the enhancement New feature or request label Jul 16, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Serval Jul 16, 2024
@johnml1135
Copy link
Collaborator Author

Through making Panel in the Grafana dashboard, Inspecting it and then downloading a CSV, I can get the data (at least 5000 records back). This won't work - I'll need a set of API calls to make Loki viable.

@johnml1135
Copy link
Collaborator Author

johnml1135 commented Jul 16, 2024

Also, we could make a new table in MongoDB for logs that we could pull and analyze with python (3b). We could make a TTL FIFO in MongoDB, persisting the records for 3 months: https://www.mongodb.com/docs/manual/tutorial/expire-data/#:~:text=TTL%20collections%20make%20it%20possible,MongoDB%20deployments%20in%20the%20cloud.
This could give us a "complete enough" picture to both monitor individual projects (if there has been no activity for 3 months, it is inactive) as well as look at trends (how quickly are people asking for new books/chapters/retraining)?

While Loki sounds nice (in having more storage and being a pre-fabbed solution), the LogQL language vs. python would be much more restrictive and hitting the Loki API itself has challenges. If we are ok with only 3 months of logs and with daily or weekly analytics reports (could be auto-run as a cron job) instead of live, there should be no hard limitation with going this route.

@ddaspit - do you have any thoughts?

@ddaspit
Copy link
Contributor

ddaspit commented Jul 22, 2024

It seems to me that tracing or logging is the right way to handle this.

@johnml1135 johnml1135 moved this from 🆕 New to 📋 Backlog in Serval Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants