Skip to content

Instantly share code, notes, and snippets.

View llamafilm's full-sized avatar

Elliott Balsley llamafilm

View GitHub Profile
@llamafilm
llamafilm / python-execd.conf
Last active February 9, 2025 20:48
Telegraf execd config
[[inputs.execd]]
command = ["python", "-u", "./python-execd.py", "localhost"]
data_format = "influx"
signal = "STDIN"
[[outputs.file]]
files = ["stdout"]
use_batch_format = false
data_format = "influx"
@llamafilm
llamafilm / lightware_mx2_exporter.py
Last active April 3, 2025 17:30
Lightware MX2 prometheus exporter
import logging
import os
import urllib
import socket
import sys
import wsgiref
import prometheus_client
from prometheus_client.core import GaugeMetricFamily, InfoMetricFamily
@llamafilm
llamafilm / sleep_exporter.py
Created May 15, 2025 22:59
Prometheus exporter that just sleeps a specified duration and returns that number as a metric
#!/usr/bin/env python3
import argparse
import logging
import os
from urllib.parse import parse_qs
import time
import wsgiref.simple_server
import wsgiref.util
from wsgiref.simple_server import ServerHandler