Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.
/ serenity_exporter Public archive

๐Ÿ“ˆ A Prometheus exporter for SerenityOS

License

Notifications You must be signed in to change notification settings

linusg/serenity_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

serenity_exporter

A Prometheus exporter for SerenityOS.

Installation

Copy the cloned repository, or at minimum, src/exporter.js, src/metrics.js, and run.js into the SerenityOS disk image.

NOTE: In the future a port script will be provided upstream.

Usage

The exporter simply can be run standalone using the js(1) REPL, as a module:

js -m src/exporter.js

For convenience, a SerenityOS Shell script is provided to start WebServer in the current working directory and export to metrics.txt every 10 seconds.

It can either be invoked manually, or run by SystemServer after boot by adding a service like this:

[serenity_exporter]
Executable=/bin/Shell
Arguments=run.sh
WorkingDirectory=/path/to/serenity_exporter
KeepAlive=true

Lastly, add a new scrape configuration to prometheus.yml:

scrape_configs:
  - job_name: "serenity"
    metrics_path: "/metrics.txt"
    static_configs:
      - targets: ["localhost:8000"]