diff --git a/plugin/curl_json.php b/plugin/curl_json.php new file mode 100644 index 0000000..97765b1 --- /dev/null +++ b/plugin/curl_json.php @@ -0,0 +1,33 @@ +args['type']) { + #COUNTER type example + case 'http_requests': + $obj->data_sources = array('count'); + $obj->ds_names = array('count' => "PHP requests"); + $obj->colors['count'] = '00b000'; + unset($obj->ds_names['value']); + $obj->rrd_title = $obj->args['type'].' of '.$obj->args['pinstance']; + $obj->rrd_vertical = 'con/s'; + break; + + #Insert other COUNTER type values here + + #By default values counted as GAUGE + default: + $obj->rrd_title = $obj->args['type'].' of '.$obj->args['pinstance']; + $obj->rrd_vertical = 'Count'; + break; +} + +$obj->rrd_format = '%5.1lf%s'; + +collectd_flush($obj->identifiers); +$obj->rrd_graph();