From: octo Date: Tue, 4 Apr 2006 07:30:37 +0000 (+0000) Subject: Changed the DS of the apache-plugin to contain upper limits. Since logrotate restarts... X-Git-Tag: collectd-3.8.6^2~80 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ed3b4a8fe6377817e1dadfbc713c4cc5c0bc4444;p=collectd.git Changed the DS of the apache-plugin to contain upper limits. Since logrotate restarts the webserver regularly the counter seems to `overflow' often, causing ugly peaks.. --- diff --git a/src/apache.c b/src/apache.c index 8ceb754e..c410dc43 100644 --- a/src/apache.c +++ b/src/apache.c @@ -46,18 +46,21 @@ static int apache_buffer_len = 0; static char apache_curl_error[CURL_ERROR_SIZE]; #endif +/* Limit to 2^27 bytes/s. That's what a gigabit-ethernet link can handle, in + * theory. */ static char *bytes_file = "apache/apache_bytes.rrd"; static char *bytes_ds_def[] = { - "DS:count:COUNTER:"COLLECTD_HEARTBEAT":0:U", + "DS:count:COUNTER:"COLLECTD_HEARTBEAT":0:134217728", NULL }; static int bytes_ds_num = 1; +/* Limit to 2^20 requests/s */ static char *requests_file = "apache/apache_requests.rrd"; static char *requests_ds_def[] = { - "DS:count:COUNTER:"COLLECTD_HEARTBEAT":0:U", + "DS:count:COUNTER:"COLLECTD_HEARTBEAT":0:1048576", NULL }; static int requests_ds_num = 1;