added default options for apps.plugin
Costa Tsaousis (ktsaou) committed
May 5, 2014 at 02:08 UTC
e282552219a3274fa43d6e97232e906ca1b11f9b
1 file changed
+5
-2
netdata.c
+5
-2
@@ -443,7 +443,7 @@ int create_listen_socket(int port)
443
// CONFIG
444
445
#define CONFIG_MAX_NAME 1024
446
-#define CONFIG_MAX_VALUE 1024
446
+#define CONFIG_MAX_VALUE 4096
447
#define CONFIG_FILENAME "conf.d/netdata.conf"
448
#define CONFIG_FILE_LINE_MAX 4096
449
@@ -5959,7 +5959,10 @@ void *pluginsd_main(void *ptr)
5959
5960
cd->enabled = enabled;
5961
cd->update_every = config_get_number(cd->id, "update every", update_every);
5962
- snprintf(cd->cmd, PLUGINSD_CMD_MAX, "exec %s %d %s", cd->fullfilename, cd->update_every, config_get(cd->id, "command options", ""));
5962
+
5963
+ char *def = "";
5964
+ if(strcmp(cd->id, "plugin:apps") == 0) def = "mplayer squid 'apache apache2 as apache' mysqld asterisk dovecot 'master as postfix' 'smbd nmbd as samba' sshd 'gdm as X' named 'clamd freshclam as clam' 'cupsd as cups' 'ntpd as ntp' 'deluge deluged as deluge' netdata";
5965
+ snprintf(cd->cmd, PLUGINSD_CMD_MAX, "exec %s %d %s", cd->fullfilename, cd->update_every, config_get(cd->id, "command options", def));
5966
5967
// link it
5968
if(pluginsd_root) cd->next = pluginsd_root;