this post was submitted on 07 Sep 2023
8 points (100.0% liked)

General Programming Discussion

7814 readers
1 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 5 years ago
MODERATORS
 

cross-posted from: https://lemmy.ml/post/4560181

A follow up on [DISCUSS] Website to monitor Lemmy servers' performance/availability


I wanted to experiment w/ Lemmy's APIs to, eventually, build a public-facing performance monitoring solution for Lemmy.

It started w/ a couple of shell commands which I found myself repeating. Then I recalled the saying "Don't repeat yourself - make Make make things happen for you!" and, well, stopped typing commands in bash.

Instead I, incrementally, wrote a makefile to do the crud work for me (esp thanks to its declarative style): https://github.com/bahmanm/lemmy-clerk/blob/v0.0.1/run-clerk


TBH there's nothing special about the file. But I thought I'd share this primarily b/c it is a demonstration of the patterns I usually use in my makefiles and I'd love some feedback on those.

Additionally, it's a real world use-case for bmakelib (a library that I maintain ๐Ÿ˜Ž )

top 2 comments
sorted by: hot top controversial new old
[โ€“] andrew@lemmy.stuart.fun 3 points 1 year ago (1 children)

This is the kind of thing I'd probably just monitor with prometheus' blackbox exporter if I wanted the list, and to be able to see trends and/or alerts for http response time, http response code, cert expiration, all that.

[โ€“] bahmanm@lemmy.ml 2 points 1 year ago

Now that I know which endpoints I'm interested in and which arguments I need to pass, exporting them to Prometheus is my next step. Though I wasn't sure where to begin w/ - I was thinking about writing the HTTP requests in Java or Python and export the results from there.

Blackbox exporter is definitely easier and cleaner. Thanks for the tip ๐Ÿ’ฏ