reported url now uses the rrdset name, not the id, since the id may contain slashes; minor other fixes
Costa Tsaousis (ktsaou) committed
Mar 23, 2015 at 21:45 UTC
5b0c7032ebe3716f70a46c661260f28c9b9c7c19
4 files changed
+9
-6
netdata.start
+2
-2
@@ -60,10 +60,10 @@ echo "Compiling netdata (debug=$NETDATA_CONFIG_DEBUG)"
60
if [ $NETDATA_CONFIG_DEBUG -eq 1 ]
61
then
62
ulimit -c unlimited
63
- make install debug=1 # this installs in the current directory
63
+ make install debug=1 || exit 1 # this installs in the current directory
64
debug_opts="-df 0xfffffadf"
65
else
66
- make install # this installs in the current directory
66
+ make install || exit 1 # this installs in the current directory
67
debug_opts="-df 0x00000000"
68
fi
69
src/daemon.c
+3
-2
@@ -74,8 +74,9 @@ void prepare_rundir() {
74
75
snprintf(pidfile, FILENAME_MAX, "%s/netdata.pid", rundir);
76
77
- if(mkdir(rundir, 0775) != 0)
78
- fprintf(stderr, "Cannot create directory '%s' (%s).", rundir, strerror(errno));
77
+ if(mkdir(rundir, 0775) != 0) {
78
+ if(errno != EEXIST) fprintf(stderr, "Cannot create directory '%s' (%s).", rundir, strerror(errno));
79
+ }
80
}
81
82
int become_user(const char *username)
src/plugins.d/apps_plugin.c
+3
-1
@@ -631,7 +631,7 @@ unsigned long file_descriptor_find_or_add(const char *name)
631
if(c == 0) continue;
632
633
if(!all_files[c].count) {
634
- if(debug) fprintf(stderr, "apps.plugin: >> eximining slot %d.\n", c);
634
+ if(debug) fprintf(stderr, "apps.plugin: >> Examining slot %d.\n", c);
635
636
if(all_files[c].magic == 0x0BADCAFE && all_files[c].name && file_descriptor_find(all_files[c].name, all_files[c].hash))
637
error("apps.plugin: fd on position %d is not cleared properly. It still has %s in it.\n", c, all_files[c].name);
@@ -1715,6 +1715,8 @@ int main(int argc, char **argv)
1715
{
1716
// debug_flags = D_PROCFILE;
1717
1718
+ info("apps.plugin: starting...");
1719
+
1720
unsigned long started_t = time(NULL), current_t;
1721
Hertz = get_hertz();
1722
pid_max = get_pid_max();
src/rrd2json.c
+1
-1
@@ -47,7 +47,7 @@ unsigned long rrd_stats_one_json(RRDSET *st, char *options, struct web_buffer *w
47
, st->priority
48
, st->enabled
49
, st->units
50
- , st->id, options?options:""
50
+ , st->name, options?options:""
51
, rrdset_type_name(st->chart_type)
52
, st->counter
53
, st->entries