views:

17

answers:

1

I want to create an application similar to cacti.
I would like to store time-series data in a MySQL database (that is rotated on schedule).

  1. Where does cacti (nagios, zenoss) store polled data?
    a) in a MySQL database
    b) in a RRD database
    c) both?

  2. How does cacti (nagios, zenoss) make room for more data when it runs out of space?

  3. How is data back-up made (when there is no more space), without loosing the already inserted data ?

The questions are in the form "How does X do Y?" but the more general issue is "How should I do Y?".

A: 
  1. Cacti stores its data in an RRD, a "round robin database".
  2. Old data is rotated out, hence the "round robin" moniker. Alex VandenBogaert's basic rrdtool tutorial has more details about this: http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html
  3. This is one of those "it depends" answers - with RRDTool, the data gets averaged & aged out, so you don't run out of space in the RRD (see #2). Normally, you plan for the amount of data you want to store when you create the RRDs, but that can take some experience & tweaking.

As to how you should do this - it depends on what you want to do with the data. With RRDTool, you don't get back the exact data you put in (due to the averaging over time). The tutorial link above should give you enough info to help you make that decision.

gorthx