Headless Observer with Web interface

Hey,
I’ve been wrestling with an idea for headless observer (or possibly entirely new application) that could work without machine with GUI in the cluster and simply use a modern web interface to present all the metrics/traces/process trees and so on to the end user.
Since English isn’t my native language I’ll speak Erlang:

1> Options = [{port, 8080}, {bind, 127.0.0.1}].
2> observer:start({headless, [Options]).
Observer started in headless mode
https://127.0.0.1:8080?api_key=ffffffffffffffffffffffff

This shall start observer without gui, but also a lightweight web server, providing authentication and frontend to the web browser.

Now, when the frontend gets loaded, it connects to the observer through the web socket which can be used to stream real-time data to the web browser.
This would remove some of the hassles with using gui observer, but also open a new door for the community to improve observability in general.
By creating custom views or dashboards, user could easily filter, process, color-code and present the data in a way that is easy to digest and quick to analyze within the interface itself.

This could be done with help from the community in smaller steps, eg:
First, make observer working without GUI, but also exposing simple REST and WebSocket APIs that can provide all the data that observer already tracks.
Then release the documentation of APIs.
Community can start working on frontend concepts and ideas.
Eventually, one could be pulled into OTP and used as default presentation layer.
Optionally, observer could be setup to serve files from user-specified directory making frontends swappable.

What do you think about this? Is something worth pursuing?

2 Likes

For headless observer there is observer_cli

https://hex.pm/packages/observer_cli
https://hexdocs.pm/observer_cli/

2 Likes

You can use GitHub - ieQu1/system_monitor: "htop" for erlang / elixir processes , it’s a headless OTP application that saves process top data to a Postgres database, so it can be visualized with Grafana. Obviously, it requires more complex setup than observer_cli , but allows to view historical data (e.g. “what was happening before the server blew up”)

1 Like

Hi there,
you might consider GitHub - systra/ObserverWeb: Erlang observer web frontend

1 Like

you can use observer:start/1 to obsrver any remote node.

1 Like

Oh, that is nice. I didn’t realize there are so many solutions already.
Thanks guys!

1 Like