richardpringle

richardpringle

So, I’ve been toying around with the idea of building application monitoring tools with Elixir. I can’t decide whether using the entire BEAM is worth adding just to manage other processes (non-Elixir processes).

I know there are already some great cloud-based tools for monitoring or process managing but I want to build some pretty custom logic depending on exits and stderr messages, etc.

A great tool that I already use is built with Node.js, called PM2, however, I don’t have the ability to add custom logic and even if I did… if I bug finds it’s way into my custom logic, Node.js isn’t fault-tolerant.

I’m not sure if many problems exist like this, but I am essentially trying to monitor blockchain nodes… Downtime is incredibly expensive because the nodes have to “catch-up” for the period in which new blocks were being created. There’s a whole slew of different custom logic triggers depending on the blockchain software’s behaviour. I hate to bring up blockchain because it’s such a buzzword, but I think that the problem could apply to any other log-based distributed system (monitoring kafka nodes for example).

Any thoughts?

Showing Posts 1 to 6

kokolegorille

kokolegorille

I like Nagios as monitoring tool, but it’s not done in Elixir.

dch

dch

personally, I’d add a simple /health style checkpoint to your app, expose it to something like collectd using its curl plugin for an up/down type check, and funnel the results into http://riemann.io/ I’ve been using this setup for a long time, across multiple customers, and it’s super flexible, and not overly hard to get your head around. You can set up multiple riemann servers that monitor each other if required, and you can get collectd to send data to multiple riemann instances as well. Cool kids these days would probably go for prometheus, but I’ve not tried that myself.

richardpringle

richardpringle OP

Maybe my phrasing can be improved. I need the same functionality as an Elixir supervisor, except I need it for non-elixir applications.

Having different callbacks run on failure (depending on the reason) is critical. Having automatic restarts or triggering the process on a different server is also essential. I know that Elixir does a very good job of this for monitoring a distributed cluster of other Elixir applicarions. I’m trying to figure out if it’s overkill to use that functionality on “external” (external to the BEAM) applications.

The beam has a pretty big memory footprint compared to applications like nagios but I need to do more than just monitor.

OvermindDL1

OvermindDL1

Not at all, it’s well suited to manage Ports too.

dimitarvp

dimitarvp

If using a Port is a bit much you can always try and utilize a wrapper like Porcelain.

richardpringle

richardpringle OP

Haha I’m fairly new to Elixir, but I actually found Port easier to use than Porcelain. It’s quite probable that I just didn’t know what I was doing before getting Port to work. I have a little PoC that works really well, I can kill a node.js process and restart it and the restart works well if the elixir process dies too.

I’m still a little concerned that running the whole BEAM vm is overkill though. For a Node.js process is definitely is as it’s using more memory than my little PoC.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4663 61218 595
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
515 12931 101
New
wmnnd
Hey folks, I wanted to share with you a project I’ve been working on for a while: It’s an Open Source (AGPLv3) newsletter tool. Think Ma...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
gtcode
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
New
Ganna
Hi everyone, I have 8 years of production experience with Erlang/OTP and I’m just starting to get to know Elixir. What would you learn f...
New

Other Trending Topics Top

schainks
SystemOneClient v0.4.0 has been released. Added provider: :gemini for Google’s Gemini Decisions API (POST /v1beta/decisions, default m...
New
dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews