Skip to content

Instantly share code, notes, and snippets.

@ragingcomputer
ragingcomputer / README.md
Last active November 1, 2022 12:34
Collect pfSense DHCP lease counts using telegraf and built-in tools

Collect pfSense DHCP lease counts using telegraf and built-in tools

Grafana Dashboard for pfSense highlighting DHCP Leases

Existing Collector

pfSense has the ability to collect DHCP lease statistics in it's Status -> Monitoring menu. That means it has some way to collect them.

searching through the source on github reveals dhcpd_gather_stats.php referenced in rrd.inc

pfSense runs this command to collect dhcpd lease counts from the lan interface: /usr/local/bin/php-cgi -q /usr/local/bin/dhcpd_gather_stats.php lan and this for the opt1 interface: /usr/local/bin/php-cgi -q /usr/local/bin/dhcpd_gather_stats.php opt1

@k-bx
k-bx / sublime-text-2.el
Created June 10, 2012 22:02
sublime text 2 like theme for emacs
(defun sublime-text-2 ()
(interactive)
(color-theme-install
'(sublime-text-2
((background-color . "#171717")
(background-mode . light)
(border-color . "#1a1a1a")
(cursor-color . "#fce94f")
(foreground-color . "#cfbfad")
(mouse-color . "black"))
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@olivierlacan
olivierlacan / An_example.markdown
Created February 18, 2012 05:40 — forked from renz45/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.