r5396 - branches/2.1/varnish-tools/nagios
tfheen at varnish-cache.org
tfheen at varnish-cache.org
Mon Oct 4 15:10:19 CEST 2010
Author: tfheen
Date: 2010-10-04 15:10:19 +0200 (Mon, 04 Oct 2010)
New Revision: 5396
Modified:
branches/2.1/varnish-tools/nagios/check_varnish.c
Log:
Remove explicit handling of uptime in nagios plugin
This makes it compile against 2.1.4 again
Modified: branches/2.1/varnish-tools/nagios/check_varnish.c
===================================================================
--- branches/2.1/varnish-tools/nagios/check_varnish.c 2010-10-04 09:49:04 UTC (rev 5395)
+++ branches/2.1/varnish-tools/nagios/check_varnish.c 2010-10-04 13:10:19 UTC (rev 5396)
@@ -166,18 +166,10 @@
check_stats(struct varnish_stats *VSL_stats, char *param)
{
const char *info;
- struct timeval tv;
- double up;
intmax_t value;
int status;
- gettimeofday(&tv, NULL);
- up = tv.tv_sec - VSL_stats->start_time;
- if (strcmp(param, "uptime") == 0) {
- value = up;
- info = "Uptime";
- }
- else if (strcmp(param, "ratio") == 0) {
+ if (strcmp(param, "ratio") == 0) {
intmax_t total = VSL_stats->cache_hit + VSL_stats->cache_miss;
value = total ? (100 * VSL_stats->cache_hit / total) : 0;
@@ -224,7 +216,6 @@
"identifier listed in the left column by 'varnishstat -l'. In\n"
"addition, the following parameters are available:\n"
"\n"
- "uptime How long the cache has been running (in seconds)\n"
"ratio The cache hit ratio expressed as a percentage of hits to\n"
" hits + misses. Default thresholds are 95 and 90.\n"
"usage Cache file usage as a percentage of the total cache space.\n"
More information about the varnish-commit
mailing list