Skip to content

Instantly share code, notes, and snippets.

<?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>
@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 = (
@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 = (
@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

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