Merge branch 'collectd-4.2' into collectd-4.3
[collectd.git] / src / collectd.c
index 2d161aa..4e521f9 100644 (file)
 #include "plugin.h"
 #include "configfile.h"
 
+#if HAVE_STATGRAB_H
+# include <statgrab.h>
+#endif
+
 /*
  * Global variables
  */
@@ -87,7 +91,11 @@ static int init_hostname (void)
        status = getaddrinfo (hostname_g, NULL, &ai_hints, &ai_list);
        if (status != 0)
        {
-               ERROR ("getaddrinfo failed.");
+               ERROR ("Looking up \"%s\" failed. You have set the "
+                               "\"FQDNLookup\" option, but I cannot resolve "
+                               "my hostname to a fully qualified domain "
+                               "name. Please fix you network "
+                               "configuration.", hostname_g);
                return (-1);
        }