Using MeNotify Sensors
Note
This tutorial shows how to publish and use a Lua-based menotify sensor.
It uses the shipped GitHub issues demo because it is a real networked
example and does not require building a custom Rust listener.
Overview
menotify is a scripted sensor family. Instead of writing a new Rust sensor
for each user-space integration, you publish a Lua script into the shared
library tree and reference it with:
listener: menotify.<module>
For this tutorial, the module is:
listener: menotify.githubissues
The shipped demo polls issues on a public GitHub repository and emits a normal Sysinspect event every time it sees a newly opened issue.
What you need
A working Sysinspect installation.
Access to the SysMaster node.
A public GitHub repository you control.
Permission to publish libraries and sync the cluster.
Files used in this tutorial
The example already exists in the source tree:
examples/demos/menotify/
README.md
sensors.cfg
model.cfg
lib/
sensors/
lua/
githubissues.lua
Only sensors.cfg and the lib tree matter for the actual sensor.
Step 1: Publish the Lua sensor
From the demo directory, publish the shared library tree:
cd examples/demos/menotify
sysinspect module -A --path ./lib -l
This uploads:
lib/sensors/lua/githubissues.lua
That path is where menotify.githubissues is resolved on the minion.
Step 2: Install the sensor configuration
Copy sensors.cfg into the master’s sensors tree, for example:
$MASTER/data/sensors/menotify/sensors.cfg
Then edit the demo sensor arguments:
sensors:
github-public-issues:
listener: menotify.githubissues
args:
owner: your-github-user-or-org
repo: your-public-repo
state: open
per_page: 20
user_agent: sysinspect-menotify-demo
At minimum, set:
ownerrepo
Optional arguments already used by the script are:
stateper_pageuser_agenttokenapibootstrap_emit_existing
Step 3: Export and sync
Ensure the master exports that sensor scope:
config:
master:
fileserver.sensors:
- menotify
Then sync the cluster:
sysinspect --sync
After sensor configuration changes, restart the minion so the listener is reloaded.
Step 4: Observe the sensor
Once the minion starts:
The first successful poll seeds the local in-memory cursor.
It emits nothing on that first pass.
Create a new issue in the configured GitHub repository.
On the next poll, the sensor logs something like:
New issue here: #42 Example issue title
The sensor emits a normal Sysinspect event.
The demo routes those events to console-logger, so the payload appears in
the minion log stream.
What the script does
The demo script uses exactly the current v1 menotify APIs:
ctx.argsfor configurationctx.statefor the last seen issue numberhttp.get(...)for GitHub pollinglog.info(...)andlog.error(...)for loggingctx.emit(...)for event creation
The emitted event uses:
ctx.emit(data, {
action = "opened",
key = tostring(number),
})
So the resulting event ID looks like:
github-public-issues|menotify.githubissues|opened@42|0
Where to go next
Once this example works, the next step is usually to replace the GitHub polling logic with your own integration and keep the same packaging pattern:
Put your Lua script under
lib/sensors/lua/.Publish it with
sysinspect module -A --path ./lib -l.Reference it as
listener: menotify.<module>insensors.cfg.Sync the cluster and restart the minion.