Skip to content

Instantly share code, notes, and snippets.

@ssm
ssm / gist:5712910
Created June 5, 2013 10:12
hiera json for munin node definitions.
{
"munin::node::mastergroup" : "smartos;kvm",
"munin::master::node_definitions" : {
"smartos;master;dhole.fnord.no" : {
"address" : "dhole.fnord.no"
},
"smartos;zone;mediatank.fnord.no" : {
"address" : "mediatank.fnord.no"
},
"smartos;zone;bokrug.fnord.no" : {
@ssm
ssm / talk.md
Last active October 8, 2018 19:15
lightning talk about rrdcached and munin

Scaling munin

Running a large munin master is all about herding bottlenecks. Memory, CPU and storage IO are candidates for "bottleneck of the day"

Munin used to be cron driven.

Then we got CGI.

@ssm
ssm / gist:5791574
Created June 16, 2013 09:56
systemd trigger issue? Needs investigating.
Script started, file is /home/ssm/.local/share/apt-dater/history/daoloth.fnord.no:0/1371376476-8770/typescript
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
dbus libdbus-1-3
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/571 kB of archives.
After this operation, 4096 B of additional disk space will be used.
@ssm
ssm / gist:5797171
Created June 17, 2013 14:13
munin team bio
My first commit to the munin project was in 2007.
I mostly care about the Munin Guide (https://munin.readthedocs.org), and the plugin documentation. From time to time, I dig into the perl code of Munin, but not very often.
I am also the sysadmin for the Munin project servers. I take care of our Trac instance, and did the migration of the project from subversion to git in 2012.
@ssm
ssm / zone.rb
Last active December 20, 2015 14:49
zone fact
Facter.add(:zone) do
setcode do
something=Facter.value('hostname')
if not something.nil? and something =~ /(.)$/
$1
end
end
end
Description:
libmunin-master-perl - perl modules for munin master
libmunin-node-perl - perl module Munin::Node
libmunin-perl - common perl modules for munin
libmunin-plugin-http-perl - perl bindings for HTTP munin plugins
libmunin-plugin-perl - perl bindings for munin plugins
libmunin-plugin-pgsql-perl - perl bindings for Postgresql munin plugins
libmunin-plugin-snmp-perl - perl bindings for SNMP munin plugins
munin - network-wide graphing framework (grapher/gatherer)
munin-async - network-wide graphing framework (async master/client)
@ssm
ssm / Puppetfile
Created December 23, 2015 13:37
Puppet configuration for SMTP smarthost with postfix
mod 'postfix',
:git => 'https://github.com/camptocamp/puppet-postfix.git',
:ref => '1.2.14'
@ssm
ssm / test.vcl
Created February 22, 2016 14:11
sub redirect_to_https {
if (std.port(local.ip) == 80) {
set req.http.x-redir = "https://" + req.http.host + req.url;
return(synth(850, "Moved permanently"));
}
}
sub vcl_synth {
if (resp.status == 850) {
set resp.http.Location = req.http.x-redir;
sub no_php_here {
if (req.url ~ "\.php(\?|$)") {
std.log("denied: request for .php");
return(synth(418, "I'm a teapot!"));
}
}
@ssm
ssm / gist:9bd2e210b230d264bb9e0591398afe22
Created September 19, 2016 06:44
Logstash parsing dpkg.log
else if [fields][log_format] == "dpkg" {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} %{GREEDYDATA:message}" }
overwrite => [ "message" ]
}
date {
match => [ "timestamp", "YYYY-MM-dd HH:mm:ss" ]
remove_field => [ "timestamp" ]
}
grok {