Giter VIP home page Giter VIP logo

Comments (5)

System25 avatar System25 commented on August 10, 2024

Hi, I think that this could be done by maintaining a list of GECOS CC servers in the database. For example, we could save a name and the IP address of the servers.

When a new GECOS CC server is added it would add automatically it's IP address to the list. But if a server is removed the administrator must remove manually the server from the list.

Given that server list, we could show the status of the servers by following these steps:

  1. The administrator user access to the log main web page (/server/log?lines=100)
  2. That particular GECOS CC server access internally to the other GECOS CC internal log page (/server/internal_log=lines=100) and aggregates the result.
  3. The admistrator user views an aggregated web page with the different logs.

logs gecos

The status of the server could have a different solution. Knowing the memory and CPU usage in a specific moment is not specially useful. So maybe it's better to create a thread that stores in the database information about the CPU and memory usage each 30 seconds.

With that data we could display a graph that shows the memory usage between a time interval. For example the last our.

What do you think about this solutions?

from gecoscc-ui.

alfem avatar alfem commented on August 10, 2024

Your log aggregation solution seems perfect to me.

About the status, I would rather prefer not to saturate the database with this data. Perhaps we will enhance this status api in a future, but right now a simple solution is preferable.

from gecoscc-ui.

System25 avatar System25 commented on August 10, 2024

I've realized that there are different processes in each GECOS CC server controlled by a "supervisor". So there are two (or more) logs inside "/opt/gecosccui-2.1.9/supervisor/log/"

After that, checking de documentation of "supervisor", I've noticed that I can obtain information from the "supervisor" if we change the configuration:
http://supervisord.org/configuration.html

So, instead of using:
[unix_http_server]
file=/opt/gecosccui-2.1.9/supervisor/run/supervisor.sock

we can use:
[inet_http_server]
port = 0.0.0.0:9001
username = user
password = 123

And instead of:

  • /server/log?lines=100
  • /server/internal_log?lines=100

we could use:

  • /server/log?server=[server_name]&process=[proces_name]&bytes=10000

Then the GECOSCC server would connect to the "supervisor" running in the desired server and obtain the last 10000 bytes of the log of that process.

To make this more usable, we could use the URL: "/server/log?server=[server_name]" as a first step by showing to the user a HTML table with the name and status of the processes.

NAVIGATION EXAMPLE:

  1. /server/status: Shows a HTML table with the servers in the cluster and the status of each server (CPU and RAM usage). The user clicks in the "log" button of the desired server.
  2. /server/log?server=[server_name]: Shows a HTML table with the name and status of the processes running on that server. The user selects a number of bytes from a list {5000, 10000 (default), 15000, 20000) and clicks in the "log" button of the desired process.
  3. /server/log?server=[server_name]&process=[proces_name]&bytes=10000: Shows last 10.000 bytes of the log of that process in that server.

What do you think about this solution?

from gecoscc-ui.

alfem avatar alfem commented on August 10, 2024

Some urls in views/server.py have 'http' schema hardcoded.
This feature fails in production, with a "https" deployment.

from gecoscc-ui.

System25 avatar System25 commented on August 10, 2024

Pull request created for this issue. Please considerate it.

Thanks

from gecoscc-ui.

Related Issues (20)

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.