I have a couple different pairs of Linux HA servers. One such pair is setup to have a MySQL server running on 1 and only 1 server at a time. When the MySQL server is running on a server, it will have a couple partitions mounted from a shared storage backend for the database data & transaction logs. If the server is not running, these partitions are not mounted on the host.
The trick becomes monitoring free space on the data & log partitions. In this particular case, the data partition is more important, since the logs are static sized, however, the principle applies to both.
My first thought is to build a trigger condition that looks to see if the size of the the data partition is different from the size of the parent partition, and if that is true, checks for a designated amount of free space. This does not seem to work though:
{Template_HOST:vfs.fs.size[/var/lib/mysql,pfree].avg(1200)}<95 & ({Template_HOST:vfs.fs.size[/var/lib/mysql,total].last(0)} # {Template_HOST:vfs.fs.size[/,total].last(0)})
With this setup, the triggers stay in an unknown state, even for the host with the partition mounted. Is there a relatively simple way this might be built to work?
Thank you,
The trick becomes monitoring free space on the data & log partitions. In this particular case, the data partition is more important, since the logs are static sized, however, the principle applies to both.
My first thought is to build a trigger condition that looks to see if the size of the the data partition is different from the size of the parent partition, and if that is true, checks for a designated amount of free space. This does not seem to work though:
{Template_HOST:vfs.fs.size[/var/lib/mysql,pfree].avg(1200)}<95 & ({Template_HOST:vfs.fs.size[/var/lib/mysql,total].last(0)} # {Template_HOST:vfs.fs.size[/,total].last(0)})
With this setup, the triggers stay in an unknown state, even for the host with the partition mounted. Is there a relatively simple way this might be built to work?
Thank you,
Comment