Coder Social home page Coder Social logo

codechain-io / codechain-dashboard Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 9.0 4.66 MB

CodeChain network management and monitoring tool

HTML 0.37% TypeScript 42.70% Makefile 0.16% Batchfile 0.20% Python 1.22% Rust 52.45% SCSS 2.90%
management monitoring network

codechain-dashboard's People

Contributors

baumstern avatar dependabot[bot] avatar gitter-badger avatar hoongee avatar joojis avatar kakao-jun-e avatar kseo avatar majecty avatar remagpie avatar sgkim126 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codechain-dashboard's Issues

Make the server send a daily report

Currently, the server sends an email and slack message only when there is a problem.
So the administrator is hard to know whether the server is alive or the server is silently gone.
Let's make it send a notification daily.

I don't think about the content of the notification, but I want the title of the email is the following format.

[info][{network id}][dashboard-server] is working - {Utc::now().to_rfc3339()}

Detect when the node is out of sync

Current dashboard just reports whether the node is 'Running' or 'Stopped'. Sometimes it isn't sufficient to diagnosis the error.

We should report when the node's best block number is far behind or spurious errors are flooding.

Use connection pool in the remove_network_usage loop

Ubuntu automatically updates PostgreSQL for the security. The dashboard server should reconnect when PostgreSQL is restarted. There are two parts that are using PostgreSQL connection. One is db_service and the other one is remove_network_usage. db_service is already using the connection pool but remove_network_usage is not using the connection pool.

Recognize ipc path in the config file

The agent(dashboard client) recognizes ipc path in the command line argument, but it doesn't understand the ipc path specified in the config file.

Killed by RPCError

#2018-10-11 02:30:51 UTC agent listen INFO agent-hub  The client encountered an error:
#2018-10-11 02:30:52 UTC agent listen INFO ws::io  Accepted a new tcp connection from 52.78.215.10:39808.
#2018-10-11 02:30:52 UTC agent-107 INFO agent-hub  Agent-107 started
#2018-10-11 02:31:14 UTC  ERROR iron::iron  Error handling:
Request {
    url: Url { generic_url: "http://<agent-hub-ip>:5012/log/validator1" }
    method: Get
    remote_addr: V4(<my local ip>:57714)
    local_addr: V4(0.0.0.0:5012)
}
Error was: RPCError Internal error about jsonrpc call : Timeout timed out waiting on channel
Killed

Send a disk alarm for each volumes

Currently, the agent server only checks total usable disk space. However, if a server has more than one volume, the agent server should send alarms for each volume.

Update the CodeChain by downloading binary file from URL

Currently, we are updating the node by compiling the new version of CodeChain in every node. However, the node may not have enough hardware spec for building CodeChain.

It is better to support updating CodeChain by downloading a binary file from the given URL.

Delete rows in the peer_count table that are older than a week

We are removing rows in the network_usage table that were inserted more than a week ago to reduce the usage of disk. We use the network usage table to find strange network throughputs. Since we will check the strange network behavior when it appeared, we don't need to save the previous data.

The purpose of the peer_count table is the same as the network_usage table. We need to remove old rows in the peer_count table.

Support PostgreSQL 12

Current dashboard server does not support PostgreSQL 12. If you run generate-schema it fails with the 12 version.

Cannot install the server

I tried to install server but generate-schema failed with the following messages.

     Running `target/debug/generate-schema`
#2019-06-05 13:39:13  main INFO agent-hub  Create agent_extra table
#2019-06-05 13:39:13  main INFO agent-hub  Create logs table
#2019-06-05 13:39:13  main INFO agent-hub  Create logs_timestamp index
#2019-06-05 13:39:13  main INFO agent-hub  Create logs_target index
#2019-06-05 13:39:13  main INFO agent-hub  Create network_usage table
#2019-06-05 13:39:13  main INFO agent-hub  Create network_usage_time_index
#2019-06-05 13:39:13  main INFO agent-hub  Create materialized views
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(Db(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("42P01"), message: "relation \"peer_count\" does not exist", detail: None, hint: None, position: Some(Normal(259)), where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("parse_relation.c"), line: Some(1180), routine: Some("parserOpenTable") }))', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I used PostgreSQL 10.8.

psql (PostgreSQL) 10.8 (Ubuntu 10.8-0ubuntu0.18.04.1)

Support docker for easy setup

We could provide a Docker file which set up environments.

We may use Docker Compose.
The cluster may have 1 of the Agent Hub and 2 of Agents.

Show network usage graphs

First page

  1. Network Out bytes of this week(All nodes)
  2. (Network Out bytes / peer count) of this week(All nodes)
  3. Network Out bytes of this week(To Known Nodes, To Unknown Nodes)
    스크린샷 2019-04-23 오후 5 17 46

Detail page

If you click a machine's name in the first page, you can see the detail page.

  1. Network Out bytes of this week(Per network extension)
  2. Network Out bytes of this week(Per to IP address)
    스크린샷 2019-04-23 오후 5 49 06

Cannot use the dashboard

Screenshot at 2019-06-20 19-11-55

I ran the dashboard and I show the following error.
It fixed when I restarted the dashboard server.
Please check it.

Make the node list sortable

nodes
Currently, the nodes list is shown in the fixed order.
How about changing it to be sortable by name/IP/block number/version/commit hash?

Show the number of connections in the node list

The number of connection is also important for stable block generation.
But there is no way to check it easily for now.
How about showing the number of established connections in the node list and make it sortable.
sort

Remove auto-update feature from agent

CodeChain agent tries to find & update the .git folder in the CodeChain directory, and build a new binary.
However, most of the machines running CodeChain don't have enough performance to build a binary, so it's useless now.
We might need some kind of auto-updating feature for CodeChain agent in the future, but it will be different from the current implementation.

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.