[collectd] rrdcached+collectd

Yves Mettier ymettier at free.fr
Tue Mar 5 11:45:33 CET 2013


Hello,

@octo : Has this been taken into account in the new and already closed 
#262 ?

Regards,
Yves

Le 2013-03-05 06:14, Benjamin Wang (gendwang) a écrit :
> Hi,
> This should be a code fault. When rrdcached plugin is started,
> rrdcached plugin will create the rrd files with the current value. 
> But
> after the rrd files
> are created, rrdcached plugin will update the same value to
> rrdcached. The rrdcached will return error. When I update the code as
> following, it works well:
> rc_write method in rrdcached.c
>   if (config_create_files)
>   {
>     struct stat statbuf;
>
>     status = stat (filename, &statbuf);
>     if (status != 0)
>     {
>       if (errno != ENOENT)
>       {
>         char errbuf[1024];
>         ERROR ("rrdcached plugin: stat (%s) failed: %s",
>             filename, sstrerror (errno, errbuf, sizeof (errbuf)));
>         return (-1);
>       }
>
>       status = cu_rrd_create_file (filename, ds, vl, 
> &rrdcreate_config);
>       if (status != 0)
>       {
>         ERROR ("rrdcached plugin: cu_rrd_create_file (%s) failed.",
>             filename);
>         return (-1);
>       }
>
> +      return (0);
>     }
>   }
>
> The above code will skip the first update when the file is created.
> What about your comments?
>
> B.R.
> Benjamin Wang
>
> From: Cyril Feraudet [mailto:collectd at feraudet.com]
> Sent: 2013年3月4日 21:46
> To: Benjamin Wang (gendwang)
> Cc: collectd at verplant.org; jmauro at anti.net; jmauro at autidot.net; Yang
> Zhou (yangzho)
> Subject: Re: [collectd] rrdcached+collectd
>
> You don't need both rrdtool and rrdcached plugin.
>
> Cyril
> http://perfwatcher.org/
>
> On 4 mars 2013, at 14:38, Benjamin Wang (gendwang)
> <gendwang at cisco.com<mailto:gendwang at cisco.com>> wrote:
>
>
> Hi,
>   I try to setup rrdcached and collectd in one VM(Redhat 6.2).
> rrdcached also listens on the network port for remote query.
> rrdtool: 1.4.7
> collectd: 5.2.0
>
> The collectd.conf is as following:
> LoadPlugin rrdcached
> LoadPlugin rrdtool
> <Plugin rrdcached>
>         DaemonAddress "unix:/tmp/rrdcached.sock"
>         DataDir "/root/tools/rrdcached"
>         CreateFiles true
> </Plugin>
>
> <Plugin rrdtool>
>         DataDir "/opt/collectd/var/lib/collectd"
> </Plugin>
>
>
> The rrdcached start script is as following:
> rrdcached -F -b /root/tools/rrdcached -j /root/tools/rrdcached/cached
> -p /root/tools/rrdcached/rrdcached.pid  -l unix:/tmp/rrdcached.sock 
> -l
> 10.74.125.141
>
> But the collectd log always show the error:
> [2013-03-04 21:24:56] rrdcached plugin: rrdc_update
> (/root/tools/rrdcached/10.74.125.141/memory/memory-used.rrd,
> [1362403496:4414574592.000000], 1) failed with status -1.
> [2013-03-04 21:24:56] rrdcached plugin: rrdc_update
> (/root/tools/rrdcached/10.74.125.141/memory/memory-buffered.rrd,
> [1362403496:363573248.000000], 1) failed with status -1.
> [2013-03-04 21:24:56] rrdcached plugin: rrdc_update
> (/root/tools/rrdcached/10.74.125.141/memory/memory-cached.rrd,
> [1362403496:1231032320.000000], 1) failed with status -1.
>
> I have gone through the old threads and have tried “chmod 777
> /root/tools/rrdcached”. But it doesn’t work.
>
> What is the problem?
>
> B.R.
> Benjamin Wang
> _______________________________________________
> collectd mailing list
> collectd at verplant.org<mailto:collectd at verplant.org>
> http://mailman.verplant.org/listinfo/collectd
>
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd

-- 
- Homepage       - http://ymettier.free.fr                             
-
- GPG key        - http://ymettier.free.fr/gpg.txt                     
-
- C en action    - http://ymettier.free.fr/livres/C_en_action_ed2.html 
-
- Guide Survie C - http://www.pearson.fr/livre/?GCOI=27440100673730    
-



More information about the collectd mailing list