Skip to content

Instantly share code, notes, and snippets.

@eykd
eykd / nginx_error_rate.py
Created July 26, 2011 15:44
Munin plugin for displaying error rates from Nginx
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""nginx_error_rate -- Munin plugin to report the error rate in an access log.
The access log defaults to `/var/log/nginx/access.log`. This may be
customized with the following stanza in your munin plugin conf:
[nginx_error_rate]
env.access_log /path/to/access.log
"""
@alq666
alq666 / gist:2422980
Created April 19, 2012 18:53
Using rrdtool & datadog
rrdtool fetch localhost_load_1min_5.rrd AVERAGE --start -15min

             load_1min           load_5min          load_15min

1334860500: 6.0133333333e-02 1.3013333333e-01 1.2003333333e-01
1334860800: 1.0983333333e-01 1.0010000000e-01 9.0100000000e-02
1334861100: 7.0133333333e-02 1.0000000000e-01 9.0000000000e-02
1334861400: -nan -nan -nan

Extract time stamp & first column

@mikeda
mikeda / gist:4369294
Last active December 10, 2015 02:39
muninのRRDから簡単なレポートを作るサンプル
#!/usr/bin/perl
use strict;
use warnings;
use RRDs;
use Data::Dumper;
#ホストのリストをどこから取ってくるか・・・
my $hostname = 'test01';
my @rrds = (
@mikeda
mikeda / cassandra_task.pl
Last active December 11, 2015 19:19
Cassandra監視用のmuninプラグインその1
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my $command = 'nodetool -h localhost tpstats';
my $prefix = "cassandra_task_";
my @graphs = qw(active pending completed);
my %configs = (
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-03-22T04:14:28Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@studio3104
studio3104 / ProvisioningFrameworksCasualTalks01.md
Last active December 16, 2015 10:08
Provisioning Frameworks Casual Talks vol.1

Provisioning Frameworks Casual Talks vol.1

ChefとかPuppetとかの勉強会です
次回があるかはわかりませんが、今回はChef成分多めになっております

インターネット情報

Twitterハッシュタグ #pfcasual
IRCチャンネル #chef-casual@freenode

@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.

@hogelog
hogelog / ssh_invalid
Created July 12, 2013 03:28
Munin plugin for measure ssh invalid user
#!/bin/sh
# -*- sh -*-
: << =cut
=head1 NAME
ssh_invalid - Plugin to measure invalid ssh user.
=head1 AUTHOR
@ysaotome
ysaotome / update_motd_by_screenfetch.sh
Last active March 4, 2021 13:29
/etc/motdにサーバ情報を書き込むスクリプト。cronとかで回しておくと便利。#Ubuntu(http://manpages.ubuntu.com/manpages/lucid/man5/update-motd.5.html) やAmazonLinuxみたいなupdate-motdがCentOSにも欲しい。
#!/bin/bash
# Description:UpdateMotd by screenFetch
# References: http://goo.gl/xpWV7L
# 2015/07/08 @ysaotome
FILE_MOTD='/etc/motd'
BIN_DATE='/bin/date'
BIN_FIGLET='/usr/bin/figlet'
BIN_HOSTNAME='/bin/hostname'
@ohtake
ohtake / gist:7786790
Last active December 30, 2015 05:59
クラウドマネジメントツール勉強会第2回