{"id":13453405,"url":"https://github.com/cypherglassdotcom/windshield","last_synced_at":"2025-03-24T01:31:25.090Z","repository":{"id":215204034,"uuid":"135387547","full_name":"cypherglassdotcom/windshield","owner":"cypherglassdotcom","description":"A dashboard tool for monitoring internal Block Producer infrastructure.","archived":false,"fork":false,"pushed_at":"2018-08-13T02:01:10.000Z","size":497,"stargazers_count":19,"open_issues_count":14,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-01-25T04:52:48.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cypherglassdotcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-30T04:22:02.000Z","updated_at":"2019-04-23T18:57:43.000Z","dependencies_parsed_at":"2024-04-27T00:45:15.163Z","dependency_job_id":null,"html_url":"https://github.com/cypherglassdotcom/windshield","commit_stats":null,"previous_names":["cypherglassdotcom/windshield"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypherglassdotcom%2Fwindshield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypherglassdotcom%2Fwindshield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypherglassdotcom%2Fwindshield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cypherglassdotcom%2Fwindshield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cypherglassdotcom","download_url":"https://codeload.github.com/cypherglassdotcom/windshield/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245194223,"owners_count":20575725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:39.499Z","updated_at":"2025-03-24T01:31:24.593Z","avatar_url":"https://github.com/cypherglassdotcom.png","language":"Elm","funding_links":[],"categories":["Tools","Developers"],"sub_categories":["Network Tracking","Block Producer tools"],"readme":"# Cypherglass WINDSHIELD\n\n![Cypherglass WINDSHIELD](https://github.com/cypherglassdotcom/windshield/raw/master/banner.png \"Cypherglass WINDSHIELD\")\n\nWINDSHIELD is a dashboard tool for monitoring internal Block Producer infrastructure.  This tool was designed to run inside a Block Producer’s firewall.  With access to all the BP’s internal nodes, it will alert the BP to issues with their nodes that might not otherwise be apparent.\n\n\n## List of Alerting Functionality\n\n* Block creation\n    - Receive alerts if your Block Producer node has not produced blocks in a specified period of time..\n* Forked/unsynchronized node\n    - Windshield will let you know if your node has become forked or unsynchronized.\n* Handshake response\n    - Windshield constantly checks to insure that your node is up and running.\n* Full Node to Block Producer node synchronization\n    - If your Full Nodes aren’t talking to your Block Producer node Windshield will send you an alert.\n* BP vote movement\n    - When your node shifts up or down in position among Block Producers Windshield will tell you.\n* Availability of one third of block producers\n    - If the number of Block Producers available drops below fourteen, Windshield will send you an alert.\n\n\n## Alerting Formats\n\n* Web based executive dashboard\n* Email\n* SMS\n* Slack\n\n## Type of Nodes\n\n* Block Producer\n* Full Node\n* External Node\n\n##  Installation\n\nPlease feel free to follow the next steps of this document to download and install the latest version of Windshield.\n\n## WINDSHIELD Structure\n\n```\n/backend   # contains the server application, made with elixir + mongodb\n/frontend  # contains the UI web application Static HTML, made with elm + js + html\n```\n\n## Installation Steps\n\nYou need to prepare your server to have the backend elixir process always running. By default it runs on port 4000. And for the UI of the application you need to serve the static HTML files using a webserver like Apache.\n\nPrepare the WINDSHIELD root folder by cloning this repo, we will call it the WINDSHIELD root folder.\n\n```\ncd ~\ngit clone https://github.com/cypherglassdotcom/windshield.git\ncd ~/windshield\n```\n\nNow, follow the next steps to fully setup WINDSHIELD. Usually you will want to create a `windshield` user on your server to go over the next steps and installation instructions.\n\n### Backend Installation\n\nFirst of all, install elixir on the server:\n\n```\ncd ~\nwget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb\nsudo dpkg -i erlang-solutions_1.0_all.deb\nsudo apt-get update\nsudo apt-get install esl-erlang\nsudo apt-get install elixir\n```\n\nThen we need to add mongodb, to save and restore chain state:\n\n```\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927\necho \"deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list\nsudo apt-get update\nsudo apt-get install -y mongodb-org\nsudo systemctl start mongod\nsudo systemctl enable mongod\n```\n\nNow create the file `~/windshield/backend/config/prod.secret.exs` with your server specific data, like the below one:\n\n```\nuse Mix.Config\n\n# here you setup any secret key hash and your public address + port for windshield\nconfig :windshield, WindshieldWeb.Endpoint,\n  secret_key_base: \"SUPER_SECRET_KEY_BASE_HASH\",\n  url: [host: \"http://windshield.awesome.com\", port: 80]\n\n# here you can setup a slack alert with your slack hook check\n# https://api.slack.com/custom-integrations/incoming-webhooks\nconfig :windshield, :slack_alert,\n  hook: \"https://hooks.slack.com/services/TZZ2KBQ7R/CBRFUSSNR/p5TV1Ow5VVHuMwp9Ue7jWzxv\",\n  channel: \"#general\"\n\n# this is the interface master password to setup the monitor nodes and settings\n# you can create your secret salt used to token generation\nconfig :windshield, Windshield.SystemAuth,\n  salt: \"your_secret_salt\",\n  password: \"admin\",\n  user: \"admin\"\n\n# setup your smtp settings\nconfig :windshield, Windshield.Mailer,\n       server: \"localhost\",\n       port: 25,\n       username: \"\",\n       password: \"\",\n       sender_email: \"outbound@awesome.com\",\n       recipients: [ \"itguy@awesome.com\", \"superdev@awesome.com\",\n       \"1234567890@txt.att.net\" ] # yes you can also send sms alerts!\n```\n\nThe above file represents some of the parameters that can be changed. Copy, paste and edit with your specific values.\nOther basic settings can be changed in the config files under `~/windshield/backend/config` directory.\n\nFinally, to start the WINDSHIELD server:\n\n```\ncd ~/windshield/backend\nmix local.hex --force\nmix local.rebar\nmix deps.get\nMIX_ENV=prod mix compile\n./start.sh\n\n# after a few seconds (10s) try:\ncurl http://localhost:4000/api/health-check\n```\n\nIf the installation was successfull you should see an `\"OK\"` after the last command. If you don't please open stderr.txt (in this very same directory) and open an issue with the occurred error.\n\n### Frontend UI Installation from Release\n\nYou can simply download our latest `frontend-build.zip` release from the [Releases Page](https://github.com/cypherglassdotcom/windshield/releases), unzip it on your webserver root folder (for Apache2 it's usually `/var/www/html`) and change the following line inside `index.html` with your server address:\n\n```\nAPP_BACKEND_SERVER=\"http://localhost:4000\",APP_SOCKET_SERVER=\"ws://localhost:4000/socket/websocket\"\n```\n\n### Frontend UI Compilation (skip if you downloaded the above release)\n\nIf you want to compile the frontend, we will assume that you have `node` \u0026 `npm` installed already in your server, there are many ways to install it and we usually recommend the `nvm` one (check https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04#how-to-install-using-nvm).\n\nAfter node installation is done (you can check by running `node -v`), follow the next steps to fully deploy the frontend HTML and JS static files.\n\n```\ncd ~/windshield/frontend\nnano public/index.html       # set the APP_BACKEND_SERVER and APP_SOCKET_SERVER\nnpm install -g elm elm-github-install create-elm-app\nnpm install\nelm-app build\n```\n\n### Frontend UI Deploy\n\nFrom the prior steps you will have a `build` folder or the zipped release. This is the folder that you will put in your webserver.\n\nAssuming that you have Apache2, you can just put it on the root webserver folder (it must be in a root address to work - you can use `domain.com`, `windshield.domain.com`, so on, but does not work in a regular subpath like `domain.com/windshield`):\n\n```\n# for release zipped build version\nsudo rm -rf /var/www/html\nsudo mkdir /var/www/html\nsudo cp frontend-build.zip /var/www/html/frontend-build.zip\ncd /var/www/html \u0026\u0026 sudo unzip frontend-build.zip\n\n# for compiled build version\nsudo rm -rf /var/www/html\nsudo cp -R build /var/www/html\n```\n\nJust open your webserver address and if everything is correct you will receive a green success toast saying: `\"Connected to WINDSHIELD Server\"` - If you don't see this message you should setup your webserver properly to serve the backend endpoints.\n\nHere's a config file sample `/etc/apache2/sites-enabled/000-default.conf` for Apache2:\n\n```\n\u003cVirtualHost *:80\u003e\n        #ServerName www.example.com  # here you will use the host you setup on config.exs of the backend\n\n        ServerAdmin webmaster@localhost\n        DocumentRoot /var/www/html\n\n        ErrorLog ${APACHE_LOG_DIR}/error.log\n        CustomLog ${APACHE_LOG_DIR}/access.log combined\n\n        RewriteEngine On\n        RewriteCond %{HTTP:Connection} Upgrade [NC]\n        RewriteCond %{HTTP:Upgrade} websocket [NC]\n        RewriteRule /ws/(.*) ws://localhost:4000/$1 [P,L]\n\n        ProxyPass /api http://localhost:4000/\n        ProxyPassReverse /api http://localhost:4000/\n\u003c/VirtualHost\u003e\n```\n\nFor the above Apache2 configuration you will need to install the following Apache modules:\n\n```\nsudo a2enmod proxy\nsudo a2enmod proxy_http\nsudo a2enmod proxy_wstunnel\nsudo a2enmod rewrite\nsudo service apache2 restart\n```\n\nThis Apache configuration sets up a proxy that, if your server domain is www.example.com, everything that goes to www.example.com/api will hit the backend http://localhost:4000 and the websockets connecteds to www.example.com/ws will hit the websocket channel at ws://localhost:4000, therefore you should adjust your index.html to your domain:\n\n```\nAPP_BACKEND_SERVER=\"http://www.example.com/api\",APP_SOCKET_SERVER=\"ws://www.example.com/ws/socket/websocket\"\n```\n\n### Nodes Setup\n\nOk, now that you had setup the server it's the fun time! Let's setup your nodes so you can keep track of them and receive any crictical alerts and keep watching their synchronization and performance.\n\n1. Click in the `locker` icon and enter the password you setup on the `prod.secret.exs` file, it's the master password.\n1. Now click in add node and add your main BlockProducer info. It's important that you put the same name of the EOS block producer account, so we can give you stats of when you are producing or not. WINDSHIELD uses this node as the principal one to monitor blocks production.\n1. Now click in add node and add your full nodes info, you can put any account name because it your public nodes does not have an account anyways, just set a unique name for easy identification as `fullnode.us1`.\n1. After you setup your block producer node and full nodes, click in `Settings` on the top menu and edit the form with your preferred options and add your Block Producer as the Principal Node account. Usually the default settings are good to start and you don't need to play with it, but you can always adjust later.\n1. Click on save, go back to the `Dashboard` page, do a refresh and your nodes will automatically starts to synchronize.\n\nPS: You will receive alerts saying that you need to enter the first top 21 block producer nodes. To do this just add all of the block producers nodes as External Node using their public full node information. WINDSHIELD requires this external nodes setup to detect fork and also the 1/3 Network Kill, as suggested by Dan Larimer, that if we have 7 BPs off we should stop the network, find the problem and restart it.\n\n## Special Thanks\n\n   * All the people who made the Jungle Test Net a success.\n   * The people at Cryptolions for their great monitor software which inspired this effort.\n   * Bohdan CryptoLions For great patience and lots of help.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcypherglassdotcom%2Fwindshield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcypherglassdotcom%2Fwindshield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcypherglassdotcom%2Fwindshield/lists"}