[collectd] Using Cacti as a frontend for collectd
Florent Monbillard
f.monbillard at gmail.com
Sat Nov 1 17:45:08 CET 2008
Hi again,
On Sat, Nov 1, 2008 at 16:26, Sebastian Harl <sh at tokkee.org> wrote:
> Hi Florent,
>
> On Sat, Nov 01, 2008 at 04:03:30PM +0100, Florent Monbillard wrote:
>> On Sat, Nov 1, 2008 at 10:32, Sebastian Harl <sh at tokkee.org> wrote:
>> > On Fri, Oct 31, 2008 at 04:28:06PM +0100, Florent Monbillard wrote:
>> >> On Fri, Jul 11, 2008 at 7:49 PM, Pavel Georgiev <pavel at netclime.com> wrote:
>> >> > Has anyone managed to use cacti just as a frontend for collectd (or
>> >> > use both tools in any other way)? I read in the FAQ there are
>> >> > reports of people doing this but I could not find any info about
>> >> > that.
>> >>
>> >> You have to do this manually. Create your datasources and point them to
>> >> collectd datasource files. More you have datasources, longer is this step...
>> >> When you finish "importing" datasources, you can use them in cacti like usual,
>> >> referencing them into graphs.
>> >
>> > How does such a data-source definition look like? Is it specific for a
>> > certain installation or is it some generic definition of the data found
>> > in the RRD files. In the latter case, would it make sense to ship your
>> > definitions somewhere in contrib/ in the collectd sources so others
>> > won't have to recreate them over and over again?
>>
>> Sadly, it's the first case : it's specific of your collectd installation
>> (RRD directory = BaseDir setting).
>
> Hrm ... too bad. However, judging from the information you've provided,
> generating the cacti data-sources could be done by a small script:
Great idea, that would be a lot easier and quicker.
>> - datasource path: the full path to the RRD file
>
> We'd just have to provide the base path and let the script find all RRD
> files automatically.
Problem is that you should know about the plugins internals:
- how do you know that the host has a dual core CPU (so two RRDs
files) ? or you just parse all files in subdirectories ?
- others explicit setup can be found in collectd.conf. But what is not
setup and gathered only by plugins is more difficult to script.
>
>> - data Input Method: the script/source used to gather data for this data source
>> (select it to none as collectd does this job for you)
>> - step is 10 in default collectd installation
>
> These would be parameters the user would have to set manually. Well, you
> could get them from collectd.conf but parsing the file for that purpose
> does not make sense imho.
if you don't read in collectd.conf, parameters can be given to the script
>
>> - you can safely let others datasource paramaters their default values
>
>> - name of the piece of data inside of the rrd file: to get it, you can
>> - Datasource type is also important: in the example above, both are GAUGE type.
>
> When using RRD files generated by collectd, you can get those
> information from the RRD filename and types.db.
didn't know about that, I will give it a look
>
>> - Heartbeat is 20 in default collectd installation
>
> Unless people have a very strange setup, you can assume this to be twice
> the step size provided by the user.
or override it with script parameters. assume collectd default values otherwise.
>
> What do you think?
that's definitly a great idea, I will look into cacti code if this
could be done easily (connect to database, create datasource entries
with given parameters).
Cheers,
Florent
More information about the collectd
mailing list