Cacti / plugin_syslog

Syslog Plugin for Cacti
GNU General Public License v2.0
21 stars 16 forks source link

More fixing for PR#159: change syslogs partition column to timestamp #168

Closed ddb4github closed 2 years ago

ddb4github commented 2 years ago

More fixing for PR#159: https://github.com/Cacti/plugin_syslog/pull/159#issuecomment-944793639

TheWitness commented 2 years ago

This pull request breaks a lot. Since we receive the timestamp of the server at the received timestamp, this is the best we can do if we want to have daily partitions. The other option would be to have a partition per day of the year 1-365 and re-organize. That way we could stick with a timestamp column. That would be a design change that would be acceptable. But make that a separate pull request.

The last option that would work would be to create a numeric value as follows:

YYYYDDD

Where DDD is a zero padded Day of Year (001-365) and YYYY is the year. That would be a numeric value. Then, we could partition by that value instead of the timestamp, and there would simply need to be X partitions where X is the number of days to keep.

TheWitness commented 2 years ago

You would still need to have the MAX value partition for bleed overs during reorganization of the partitions. This way again, you could get the partitioning to sort of work. However, looking back at this, it would then break MariaDB's ability to find the range unless you always use that column ins searches, which would not be so bad.

TheWitness commented 2 years ago

Okay. closing this for now.