Renamed `host' and `port' to `global_host' and `global_port' to distinguish between...
[collectd.git] / src / load.c
index 8d0963b..4d43dd4 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/load.c
- * Copyright (C) 2005  Florian octo Forster
+ * Copyright (C) 2005,2006  Florian octo Forster
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -48,9 +48,9 @@ static char *load_file = "load.rrd";
 
 static char *ds_def[] =
 {
-       "DS:shortterm:GAUGE:25:0:100",
-       "DS:midterm:GAUGE:25:0:100",
-       "DS:longterm:GAUGE:25:0:100",
+       "DS:shortterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
+       "DS:midterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
+       "DS:longterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
        NULL
 };
 static int ds_num = 3;
@@ -65,6 +65,7 @@ static void load_write (char *host, char *inst, char *val)
        rrd_update_file (host, load_file, val, ds_def, ds_num);
 }
 
+#if LOAD_HAVE_READ
 #define BUFSIZE 256
 static void load_submit (double snum, double mnum, double lnum)
 {
@@ -78,7 +79,6 @@ static void load_submit (double snum, double mnum, double lnum)
 }
 #undef BUFSIZE
 
-#if LOAD_HAVE_READ
 static void load_read (void)
 {
 #if defined(HAVE_GETLOADAVG)