Skip to content

Instantly share code, notes, and snippets.

View mattpr's full-sized avatar

Matt Probert mattpr

  • Hamburg, Germany | Seattle, WA
View GitHub Profile
@mattpr
mattpr / nginx_exporter.md
Last active August 1, 2024 16:37
using mtail and nginx access_log to export custom metrics from nginx for prometheus and other monitoring scrapers

Feedback

I'm sure I've gotten multiple things wrong here. Either flat out wrong, anti-patterns or just sub-optimal. I'm new to prometheus, grafana and mtail...so please feel free to share corrections/suggestions.

Background

There are a handful of custom nginx stats exporters.

Some are tying into internal nginx stats like the official nginx exporter: nginx-prometheus-exporter

@mattpr
mattpr / sip2pstn.php
Last active August 28, 2017 14:45
PHP implementation of sip2pstn which allows outgoing calls via Twilio from your SIP registered phone. Within Twilio, programmable voice, SIP Domain, you should point the Voice URL at this file (on your server).
<?php
// should be configured in twilio under Programmable Voice > SIP Domain > Voice Config
// http://yourdomain.com/sip2pstn.php?callerId=%2B<yourTwilioNumberIncludingCountryCode>
// to adapt this for other countries
// - change the +44 to your own country code and
// - change the ringTone from 'uk' to your country (us, de, etc)
// this is not currently setup for USA 10 digit dialing (ie you should dial 001 or +1 or 1 before the 10 digit US number.
$localCountryCode="+44";
@mattpr
mattpr / .gitignore
Last active September 8, 2015 10:02 — forked from pklaus/sms.conf
Command Line Tool to send an SMS via the Sipgate API found on <http://irq0.org/Code?action=AttachFile&do=view&target=sms.py> on 2008-03-16
/sms.conf.prod