What information should we record for the data points? We definitely need the name of the node that is sending the data. We also need to record the time at which we got the data point so that we can figure out the latest status of the node. Of course, we need to know the type and value of the data point. The type of the data point is simply the name of the quantity that we are measuring, such as CPU usage, memory usage, uptime, and so on.
For now, I think these are all the things that we need to measure:
Node name
Date and time
Type
Value
While thinking about which fields we needed in our model, I thought of another approach. It involved having a different model for each data point type, so we could have Django models named SystemLoad
, MemoryUsage
, DiskUsage
, Uptime
, and so on. However, once I thought about it further, I figured out that doing so would be very restrictive as now we'd need to define a new model every time we wanted to measure something new. Having the type of the data...