GithubHelp home page GithubHelp logo

plds's Introduction

PLDS - Phoenix LiveDashboard Standalone

CI

PLDS is a command line interface for Phoenix LiveDashboard with some additional extensions.

It's useful in environments where you can't install Phoenix or the dashboard. This can be used to access remote systems that are reachable locally.

Usage

You can install PLDS by running the following command:

$ mix escript.install hex plds

Make sure the path used for installing escripts is available in your $PATH variable. If you installed Elixir with asdf, you'll need to run asdf reshim elixir once the escript is built.

After that, you can start PLDS with the following command:

$ plds server --connect node_a --connect node_b --port 9000 --open

The dashboard will open a page in your browser. Check the options available by typing plds server --help. Note that the PLDS node will be hidden from the other nodes.

To try out features from the main branch you can alternatively install the escript directly from GitHub like this:

$ mix escript.install github phoenixframework/plds

Environment variables

PLDS accepts some configuration through environment variables. The only one available today is:

  • PLDS_SECRET_KEY_BASE - the secret base used for session encryption. It must be at least 64 characters long. You can use OpenSSL or the :crypto.strong_rand_bytes/1 function to generate it. openssl rand -base64 48 if you have OpenSSL available. By default it's a random value.

Preinstalled tools

  • Ecto with extras - works for PostgreSQL databases.
  • Broadway Dashboard - to inspect Broadway pipelines.

Disabled pages

Note that some pages will be disabled when using PLDS. "Metrics" page is disabled because we can't tell which module is responsible for the data upfront. The "Request logger" page is disabled as well.

"OS Data" page is enabled only if the node has the os_mon application running.

Development

PLDS is primarily a Phoenix web application and can be setup as such:

git clone https://github.com/phoenixframework/plds.git
cd plds
mix deps.get

# Run the PLDS server
mix phx.server

# To test escript
MIX_ENV=prod mix escript.build
./plds server

License

MIT License. Copyright (c) 2021 Philip Sampaio.

plds's People

Contributors

josevalim avatar norbajunior avatar philss 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plds's Issues

Metrics appear disabled on remote node

Hi @philss!ย I just started plds and already it is amazing ๐Ÿคฉ great work!!

I noticed something oddโ€“ย I have a Phoenix app generated from 1.6.0.rc-0, and from its dashboard the Metrics tab is enabled.

If I start the app server like so:

$ elixir --name foo@localhost -S mix phx.server

and then I start plds (latest from github):

$ plds server --connect foo@localhost --open

When I select the foo@localhost node from the plds instance, the Metrics link is disabled.

Curiously, looking at the dashboard from the app instance, I can see both nodes in the drop-down, and selecting either node shows the app instance's metrics.

Let me know if I can provide any more information and/or any help debugging!

:os_mon is required

As :os_mon is registered in the extra_application, plds won't start if erlang-os-mon is not available on the system.
One can easily understand the issue when launching from master but it is a bit more tricky when using the escript:

โžœ  plds git:(main) โœ— mix phx.server                                                        
Generated plds app
[notice] Application runtime_tools exited: :stopped
** (Mix) Could not start application os_mon: could not find application file: os_mon.app
โžœ  plds git:(main) โœ— plds server --connect "toto@mynode" --cookie secret --open  
11:31:18.156 [notice] Application runtime_tools exited: :stopped
PLDS failed to start

After installing the package on ubuntu:

โžœ  plds git:(main) โœ— ./plds server --connect "toto@mynode" --cookie secret --open
11:38:08.350 [notice]     :alarm_handler: {:set, {:system_memory_high_watermark, []}}
[PLDS] using long names because one of the nodes is long. Current name is :"[email protected]"
11:38:08.532 [info] [PLDS] Connected to node :"toto@mynode"
11:38:08.563 [info] Running PLDSWeb.Endpoint with cowboy 2.9.0 at :::8090 (http)
11:38:08.565 [info] Access PLDSWeb.Endpoint at http://localhost:8090

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.