Coder Social home page Coder Social logo

alicemq's Introduction

AliceMQ - RabbitMQ Visualizer

We use the RabbitMQ management plugin API to query multiple endpoints: overview, queues, exchanges, bindings, channels - then parse the data and re-pipe it into a D3.js/React app. The app is meant to focus on traffic flowing into the system and show which exchanges are getting hit and how hard.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

We have pre-built packages available for Windows, MacOSX, Linux. Please visit AliceMQ download page.

For MacOSX and Linux platforms, please ensure to have git and npm installed.

Manual Install

If you want build your own electron app, please follow the following instruction.

git clone https://github.com/alicelabs/alicemq.git
cd alicemq
npm run buildapp

For Mac and Windows build:

npm run buildappwin
npm run buildappmac

Once the command finishes, please find the executable electron app in its subfolder. The app is specific built for the platform which you are running.

For Linux: We haven't yet packaged the production build for Linux. You can package it yourself or run it in development mode.

npm run app

Testing AliceMQ with your server

To help you test the app is working correctly with your RabbitMQ server, we provide you with AliceMQ testing suite. It is a series of producer and consumer scripts that can simulate all types of RabbitMQ messages: Direct, Topic, Header and Fanout. Please see detailed instruction on its readme.

Troubleshooting

Web App not Working

Since the current script is built for the electron build, the web app may not work out of the box. Please modify

in ./Clinet/Containers/Main.jsx - Change isWeb false to true

isWeb: true

then run the script

npm run web

Connecting to Cloud Services

AliceMQ suppports both local and cloud RabbitMQ instance like AWS. If you have problem with connection please check:

  • Check internet connectivity.
  • RabbitMQ server is running.
  • Double check username and password to log into RabbitMQ.
  • Ensure RabbitMQ port is correct, open and forward.
  • Still having issues, continue reading below.

CORS

When accessing the rabbitmq API remotely on a network, you'll need to whitelist your ip to allow for cross origin fetching. Check out this page on how to setup configure file

If running on AWS EC2 server:

  • SSH into your EC2 server.
  • Edit your RabbitMQ config file.
  • Edit EC2 security group to open RabbitMQ port in inbound rules.

Color Legend

If you'd like to modify the color legend ranges to better suit your RabbitMQ instance's throughput. Two simple modifications need to be made.

/client/Components/Legend.jsx

let ranges = [['0', '#bdbdbd'], ['1-50', '#b9f6ca'], ['50-150', '#ffeb3b'], ['150-500', '#f9a825'], ['500-2000', '#ff5722'] , ['> 2000', '#b71c1c']]

The ranges are static values in the 1st element of the sub arrays

/client/Components/NetworkGraph.jsx

function setRateColor(rate){
  let lineColor = '';
  if (rate === 0) { lineColor = '#bdbdbd' } 
  else if (rate > 0 && rate <= 50) { lineColor = '#b9f6ca' }
  else if (rate > 50 && rate <= 150) { lineColor = '#ffeb3b' }
  else if (rate > 150 && rate <= 500) { lineColor = '#f9a825' }
  else if (rate > 500 && rate <= 2000) { lineColor = '#ff5722' }
  else if (rate > 2000) { lineColor = '#b71c1c' }
  return lineColor;
}

Be sure to have the static ranges in the Legend component match in the setRateColor function and you're all set.

Built With

  • React - Framework used
  • Electron - Build cross-platform application
  • D3 - Used to draw graphs
  • RabbitMQ - Message broker and underlining technology

Versioning

v1.0.1

Authors

Anthony Valentin, Christian Niedermayer, Parket Allen, Siye Sam Yu

License

Mozilla Public License 2.0

Acknowledgments

alicemq's People

Contributors

chris-n avatar csrudy avatar dependabot[bot] avatar sagar-rout avatar vhsconnect avatar yudataguy avatar yzevm 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  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  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  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

alicemq's Issues

CORS: internal server error 500 /api/bindings

Making a fetch call from the development web application to http://{rabbitMQ}:15672/api/bindings along with the credential options to log in results in an error. All endpoints work with producers, consumers, queues, exchanges but not with bindings.

However it works in postman.

Issue with connecting to cloud rmq instances

There is a CORS issue with trying to connect to cloud instances. The base64 encoding headers are correct, but are not being passed with the fetch. There needs to be either a fix from Carrot-Input or need to include instructions in docs for enabling cors through wildcard. It would be ideal to handle this on our client side.

Failed to launch app

Hi, thanks for amazing visualizer 👍

  • Bug
  • Linux Ubuntu

Steps to reproduce

npm install
npm run buildapp
npm run app

Error message

> [email protected] app /home/egor/Desktop/github/repos/iqoption/alicemq
> webpack --config webpack.config.js && electron .

Hash: 375d232837f453373d20
Version: webpack 4.35.2
Time: 728ms
Built at: 07/05/2019 12:49:18 PM
                  Asset     Size  Chunks             Chunk Names
./client/dist/bundle.js  959 KiB    main  [emitted]  main
Entrypoint main = ./client/dist/bundle.js
[./client/index.js] 257 bytes {main} [built]
[./client/static/style.css] 1.15 KiB {main} [built]
[./node_modules/css-loader/dist/cjs.js!./client/static/style.css] 5.83 KiB {main} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {main} [built]
    + 14 hidden modules

ERROR in ./client/index.js
Module not found: Error: Can't resolve './App.jsx' in '/home/egor/Desktop/github/repos/iqoption/alicemq/client'
 @ ./client/index.js 4:0-28 6:36-39

map of undefined object onLoad

When Alice visualizer’s onLoad and refresh returns error “map of undefined”. Possible error with one of the methods in blueBottle that is mapping the wrong data.

Isolate exchanges and their relatives via toggle

The visualization sometimes looks a little busy and hard to read, it would be nice to isolate exchanges and their relatives via a toggle.
The problem is that blueBottle currently does not serve nodes in groupings. Meaning we can't look to the state and find these relations easily.
I will look into how we can modify the blueBottle lib to pass down an exchange to the state along with information about its relatives.
Once that is done we will be able to toggle exchanges on and off.

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.