Git Product home page Git Product logo

snetsystems / cloudhub Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 7.0 15.2 MB

CloudHub is a totally designed system that lets you monitor and manage the availability of something like servers, applications, virtual machines, Kubernetes, and so on.

Home Page: https://seversky.atlassian.net/wiki/spaces/CSHD/pages/219414598/Introduction

License: Other

Shell 0.10% Makefile 0.05% Go 26.78% JavaScript 5.55% TypeScript 60.83% HTML 0.01% Python 0.59% SCSS 6.10%
influxdata chronograf telegraf monitoring visualization go react typescript 128-technology alert

cloudhub's Introduction

CloudHub

Intro

CloudHub is a totally designed system that lets you monitor and manage the availability of something like servers, applications, virtual machines, Kubernetes, and so on. And this is another branch of an open-source web application derived from Influxdata's Chronograf written in Go and React.js that provides the tools to visualize your monitoring data and easily create alerting and automation rules.

Therefore, CloudHub has been enhanced by adding our direction, such as automation of configuration management(via SaltStack Rest API) and monitoring the systems or applications over several Clouds.

CloudHub has been started with Chronograf version 1.7.11.

Using the basic common features

As we follow on using guides like the way of TICK Script or Flux queries, for more informations of the basic common features between Chronograf 1.7.11 and CloudHub refer to the following link.
Github for chronograf
Documentation for TICK Stack
But you should use Forked Snetsystems/telegraf

Test Environment

For running this project, maybe, you should get the environment for test data and composition like telegraf, kapacity and influxdb (but not need chronograf). This Sandbox provided by sysnetsystems will help to do.
Download snetsystems/sandbox

For the agent management or vsphere, k8s inventory viewer test, you prepare to Salt master, api, minion.
You should use Forked Snetsystems/salt
Documentation for SaltStack

How to use Cloudhub

Documentation for CloudHub Guide (Korean)

Key Differences against Chronograf at this point(version).

  • Add a Basic(id/pw) authentication and management feature.
    • Regarding to above, an activity log is added.
  • Add multi-tenant feature across Users-Roles-Groups-DataSources.
  • Hosts to Infrastructures and basic charts added.
  • Infrastructure Topology Map authoring feature by user group.
    • Status Overview of entire nodes(About CPU Temperature, CPU Memory, Disk usage, etc.).
    • Show IPMI Sensor Data.
    • Addable to connect to Public Cloud(AWS, GCE).
  • Visualization added by criteria of Applications.
  • Integration a backend with SaltStack.
    • Avoid CORS Problem: Web UI > CloudHub Salt Proxy > Salt API Server > Salt Master > Salt Minions.
    • Telegraf agent management and configuration editing and deploying remotely via SaltStack Rest API.
  • Web SSH Terminal Console feature.
    • Connection to hosts using ssh protocol via CloudHub WebSocket Proxy.
  • Add Statistic graphs for data visualization.
  • Optionable Addon features.
    • VMWare Infrastructure Viewer.
      • via VSphere API and Salt
    • _OpenStack Infrastructure__ Monitoring.
    • K8s Infrastructure Diagram & Viewer.
      • via customized Salt Kuberetes Module.
    • AWS Instances Monitoring.
    • GCE Instances Monitoring.
    • SWAN Router & SDPlex(Oncue) Features.
    • Bare-metal Server Remote Management via IPMI

Change log

You could know the changelog by versions via the follows.
Version <= v1.2.0: Projects(Legacy)
Version >= v1.3.0: Projects(Newly)

Setting in VSCode

  • Add the followings into User Setting or Workspace Setting.
{
  "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
  "terminal.integrated.rightClickBehavior": "default",
  "terminal.explorerKind": "external",
  "terminal.integrated.copyOnSelection": true,
  "terminal.integrated.scrollback": 10000,
  "breadcrumbs.enabled": true,
  "editor.renderControlCharacters": true,
  "editor.largeFileOptimizations": false,
  "editor.formatOnSave": true,
  "editor.renderWhitespace": "none",
  "editor.wordWrap": "on",
  "workbench.startupEditor": "newUntitledFile",
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": false,
  "files.eol": "\n",
  "go.formatTool": "goimports",
  "go.lintOnSave": "package",
  "go.autocompleteUnimportedPackages": true,
  "prettier.singleQuote": true,
  "prettier.bracketSpacing": false,
  "prettier.semi": false,
  "prettier.trailingComma": "es5",
  "prettier.arrowParens": "avoid",
  "eslint.alwaysShowStatus": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.associations": {
    "*.yml": "yaml"
  },
  "window.zoomLevel": 0,
  "gitlens.views.repositories.files.layout": "tree",
  "git.ignoreLegacyWarning": true,
  "screencastMode.onlyKeyboardShortcuts": true,
  "diffEditor.ignoreTrimWhitespace": false,
  "workbench.sideBar.location": "left"
}

How to build

Preparing dependencies

  • CloudHub works with go 1.16.x, node 12.x ~ node 14.x, and yarn 1.15.x ~ 1.22.x. Thus, you have to install that according to each offcial guide.
  • Install protoc(protocol buffer compiler)
    • Download here proper package.
    • Unzip and then add bin/protoc or bin/protoc.exe to $PATH env. or simply put into $GOPATH/bin or $GOROOT/bin/ diretory.
  • In the case of Windows, it cannot be invoked "make" command,
    So you need to download and install GNUMake for windows.

Getting the source code from github.

[If you're on Windows, run "Git Bash" and] type the followings.

# If you're on Windows, run "Git Bash" and type the followings.

$ git clone https://github.com/snetsystems/cloudhub.git
$ cd cloudhub
$ make

If well done, you can see the binary.

$ cd backend/cmd/cloudhub
$ ls -l
total 28072
...
-rwxr-xr-x 1 Snetsystems 197121 28610048 Jul 15 09:09 cloudhub

Once run cloudhub, 8888 port will be listened.

$ ./cloudhub

You can see the CloudHub UI via browser: http://localhost:8888

How to debug via VSCode for Development.

Run "cloudhub.code-workspace" within cloudhub folder.

$ code cloudhub.code-workspace

Simply, select "Launch Server" and then run.
Also, for UI debugging, select "Launch Chrome" and then run debug.
For continuous debugging, you can use "Launch Chrome" after yarn start

[Note] On Windows, you have to use "Launch Chrome" after yarn start

[Note]
For continuous debugging, you need to add develop mode into the running argument.

We already prepared ".vscode/launch.json" and ".vscode/settings.json"

  • Using GO111MODULE.
    • Not need a vendor directory anymore.
  • Snetsystems Github login setting as a default.
    • You need to change to the Github's keys of your organization.
    • If you don't need to login, get rid of the login information.
     ...
     "args": [
       "-l=debug",
       "-d"
       "-c=./cloudhub-canned/",
       "--protoboards-path=./cloudhub-protoboards/",
       "--auth-duration=0",
       "-t=74c1e9e245088f060b5bff36b935cd0bf2976d35",
       "--github-client-id=c170bbdbc5cb2ea8f6d3",
       "--github-client-secret=55c35715b0e4eebab7edbdeef3081bf890e79d22"
     ],
     ...

If you run a not login mode, you can use "Launch Chrome via Proxy" after yarn start

$ cd $CloudHub_PATH/frontend
$ yarn start
yarn run v1.15.2
$ node parcel.jsx
Serving on http://localhost:8080
√  Built in 7.54s.

cloudhub's People

Contributors

bnt10 avatar daiboom avatar dependabot[bot] avatar jaegeunha avatar jaegeunha94 avatar jaeheesnet avatar jaemyeongroh avatar jijii779 avatar kim-jinhyeong avatar minsoo77 avatar munhyeonseok avatar snetsystems avatar yongsikgi avatar

Stargazers

 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

cloudhub's Issues

The Tooltip disappears

Tooltip is missing from Telegram in the Configure Alert Endpoints menu, so Link cannot be selected.
제목 없음

Addon: Oncue On/Off

For Oncue feature, on/off optionable and Proxy Service for Oncue.
Similar to On/Off optionable for Add-on features. #74
and Proxy Service for 3rd party Rest API #80.

Multi-tenant Feature

As Group, Data Source has to be assigned.
Therefore, each function(visualize, infrastructure, etc) has to be under this rule/policy.

Collector Config in Agent Configuration

Report a two problem

  1. If you edit and apply the telegraf configuration, and then reload it, there is a new line at the bottom.
  2. When editing the configuration, the first input is sometimes ignored.

Too slow Salt-minion's list up on the outage cases

In "Agent configuration" menu, if at lease one or more of Salt-Minion's responses are pending by something like HW or NW outage, anyway whatever causes, whole listing is too slow.

I need to discuss how to resolve as a good way.

LocalStorage Property Check

Whenever new data is added to the local storage and used, there will be an error if there is garbage data inside the local storage. Residue data should be updated or deleted.

Occur the permission denied in some Telegraf plugins

Sometimes, Telegraf emits the error log about the permission denied like once this collects the metrics against Docker container, etc.
This occurrence is due to Telegraf is not get authorization against the monitoring target applications.
Therefore, the routine that add Telegraf user into the root group has to be in after install Telegraf.
Like below,

$ salt \server01-vm01.snetsystems.com group.adduser root telegraf
server01-vm01.snetsystems.com:
    True

Also, as Salt API's request body

{
    "token": "c7d94d708185dbe550cac551985e060783458b774f6dad0d6fb59057af26d9e5",
    "eauth": "pam",
    "client": "local",
    "tgt": "server01-vm01.snetsystems.com",
    "fun": "group.adduser",
    "arg": [
        "root",
        "telegraf"
    ]
}
# Reponse
{
    "return": [
        {
            "server01-vm01.snetsystems.com": true
        }
    ]
}

For check out if well done

# In target minion,
$ lid -g root
 root(uid=0)
 sync(uid=5)
 shutdown(uid=6)
 halt(uid=7)
 operator(uid=11)
 telegraf(uid=997)

On/Off optionable for Add-on features.

  1. Add the argument into SCMP execution argument.
  2. Transfer(API response) Add-on list, URL, and token to the client
  3. Apply addon in the client side.
  4. Update the API Spec. document

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.