Project

General

Profile

« Previous | Next » 

Revision 24fa000b

Added by Warren Baker about 14 years ago

Remove Total users graph this has become redundant and replaced with a cumulative result.

View differences:

etc/inc/rrd.inc
742 742
			$rrdupdatesh .= "# polling Captive Portal for number of logged in users\n";
743 743
			$rrdupdatesh .= "CP=`$php -q $captiveportal_gather loggedin`\n";
744 744
			$rrdupdatesh .= "$rrdtool update $rrddbpath$ifname$captiveportalloggedin \${CP}\n";
745
			
746
			$ifname= "captiveportal";
747
			if (!file_exists("$rrddbpath$ifname$captiveportaltotalusers")) {
748
				$rrdcreate = "$rrdtool create $rrddbpath$ifname$captiveportaltotalusers --step $rrdcaptiveportalinterval ";
749
				$rrdcreate .= "DS:totalusers:GAUGE:$captiveportalvalid:0:10000 ";
750
				$rrdcreate .= "RRA:AVERAGE:0.5:1:1000 ";
751
				$rrdcreate .= "RRA:AVERAGE:0.5:5:1100 ";
752
				$rrdcreate .= "RRA:AVERAGE:0.5:60:1175 ";
753
				$rrdcreate .= "RRA:AVERAGE:0.5:720:3000 ";
754
				$rrdcreate .= "RRA:MIN:0.5:1:1000 ";
755
				$rrdcreate .= "RRA:MIN:0.5:5:1100 ";
756
				$rrdcreate .= "RRA:MIN:0.5:60:1175 ";
757
				$rrdcreate .= "RRA:MIN:0.5:720:3000 ";
758
				$rrdcreate .= "RRA:MAX:0.5:1:1000 ";
759
				$rrdcreate .= "RRA:MAX:0.5:5:1100 ";
760
				$rrdcreate .= "RRA:MAX:0.5:60:1175 ";
761
				$rrdcreate .= "RRA:MAX:0.5:720:3000 ";
762
				$rrdcreate .= "RRA:LAST:0.5:1:1000 ";
763
				$rrdcreate .= "RRA:LAST:0.5:5:1100 ";
764
				$rrdcreate .= "RRA:LAST:0.5:60:1175 ";
765
				$rrdcreate .= "RRA:LAST:0.5:720:3000 ";
766 745

  
767
				create_new_rrd($rrdcreate);
768
			}
769

  
770
			/* enter UNKNOWN values in the RRD so it knows we rebooted. */
771
			if($g['booting']) {
772
				mwexec("$rrdtool update $rrddbpath$ifname$captiveportaltotalusers N:U");
773
			}
774
			
775
			/* the Captive Portal stats gathering function. */
776
			$rrdupdatesh .= "\n";
777
			$rrdupdatesh .= "# polling Captive Portal for number of concurrent users\n";
778
			$rrdupdatesh .= "CP=`$php -q $captiveportal_gather total`\n";
779
			$rrdupdatesh .= "$rrdtool update $rrddbpath$ifname$captiveportaltotalusers \${CP}\n";
780
			
781 746
		}
782 747

  
783 748
		$rrdupdatesh .= "sleep 60\n";

Also available in: Unified diff