+function meta_graph_dns_event($host, $plugin, $plugin_instance, $type, $type_instances, $opts = array()) {
+ global $config;
+ $sources = array();
+
+ $title = "$host/$plugin".(!is_null($plugin_instance) ? "-$plugin_instance" : '')."/$type";
+ if (!isset($opts['title']))
+ $opts['title'] = $title;
+ $opts['rrd_opts'] = array('-v', 'Events', '-r', '-l', '0');
+
+ $files = array();
+// $opts['colors'] = array(
+// );
+
+// $type_instances = array('IQUERY', 'NOTIFY');
+ while (list($k, $inst) = each($type_instances)) {
+ $file = '';
+ $title = $opts['title'];
+ foreach ($config['datadirs'] as $datadir)
+ if (is_file($datadir.'/'.$title.'-'.$inst.'.rrd')) {
+ $file = $datadir.'/'.$title.'-'.$inst.'.rrd';
+ break;
+ }
+ if ($file == '')
+ continue;
+
+ $sources[] = array('name'=>$inst, 'file'=>$file);
+ }
+ return collectd_draw_meta_stack($opts, $sources);
+}
+