| 
									
										
										
										
											2011-09-26 11:49:38 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | require 'includes/graphs/common.inc.php'; | 
					
						
							| 
									
										
										
										
											2011-09-28 23:24:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-01 10:10:02 +00:00
										 |  |  | $scale_min    = 0; | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $colours      = 'blue'; | 
					
						
							|  |  |  | $nototal      = (($width < 224) ? 1 : 0); | 
					
						
							|  |  |  | $unit_text    = 'Packets/sec'; | 
					
						
							| 
									
										
										
										
											2016-07-07 01:33:43 -05:00
										 |  |  | $rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id'])); | 
					
						
							| 
									
										
										
										
											2011-10-01 10:10:02 +00:00
										 |  |  | $array        = array( | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |                  'pc_hit'  => array( | 
					
						
							|  |  |  |                                'descr'  => 'Hits', | 
					
						
							|  |  |  |                                'colour' => '008800FF', | 
					
						
							|  |  |  |                               ), | 
					
						
							|  |  |  |                  'pc_miss' => array( | 
					
						
							|  |  |  |                                'descr'  => 'Misses', | 
					
						
							|  |  |  |                                'colour' => '880000FF', | 
					
						
							|  |  |  |                               ), | 
					
						
							|  |  |  |                  'pc_size' => array( | 
					
						
							|  |  |  |                                'descr'  => 'Size', | 
					
						
							|  |  |  |                                'colour' => '006699FF', | 
					
						
							|  |  |  |                               ), | 
					
						
							|  |  |  |                 ); | 
					
						
							| 
									
										
										
										
											2011-09-28 23:24:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $i = 0; | 
					
						
							| 
									
										
										
										
											2011-09-28 23:24:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-08 15:09:11 -05:00
										 |  |  | if (rrdtool_check_rrd_exists($rrd_filename)) { | 
					
						
							| 
									
										
										
										
											2017-02-24 15:22:15 +00:00
										 |  |  |     foreach ($array as $ds => $var) { | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |         $rrd_list[$i]['filename'] = $rrd_filename; | 
					
						
							| 
									
										
										
										
											2017-02-24 15:22:15 +00:00
										 |  |  |         $rrd_list[$i]['descr']    = $var['descr']; | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |         $rrd_list[$i]['ds']       = $ds; | 
					
						
							| 
									
										
										
										
											2017-02-24 15:22:15 +00:00
										 |  |  |         $rrd_list[$i]['colour']   = $var['colour']; | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |         $i++; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-08-18 20:28:22 -05:00
										 |  |  | } else { | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |     echo "file missing: $file"; | 
					
						
							| 
									
										
										
										
											2011-10-01 10:10:02 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2011-09-28 23:24:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | require 'includes/graphs/generic_multi_simplex_seperated.inc.php'; |