aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/varnish.php
blob: 78d33bd455c7e3cccda5031f7f2696d58ff5ffff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

# Collectd varnish plugin

require_once 'conf/common.inc.php';
require_once 'type/Default.class.php';
require_once 'inc/collectd.inc.php';

## LAYOUT
#varnish-default-backend/connections-failures.rrd
#varnish-default-backend/connections-recycled.rrd
#varnish-default-backend/connections-success.rrd
#varnish-default-backend/connections-unused.rrd
#varnish-default-backend/connections-not-attempted.rrd
#varnish-default-backend/connections-reuses.rrd
#varnish-default-backend/connections-too-many.rrd
#varnish-default-backend/connections-was-closed.rrd
#varnish-default-cache/cache_result-hitpass.rrd
#varnish-default-cache/cache_result-hit.rrd
#varnish-default-cache/cache_result-miss.rrd
#varnish-default-connections/connections-accepted.rrd
#varnish-default-connections/connections-dropped.rrd
#varnish-default-connections/connections-received.rrd

$obj = new Type_Default($CONFIG);
$obj->rrd_format = '%5.1lf%s';
$obj->rrd_title = sprintf('%s (%s)', ucfirst($obj->args['pinstance']), $obj->args['category']);
$obj->rrd_vertical = 'hits';

collectd_flush($obj->identifiers);
$obj->rrd_graph();