View Full Version : FEATURE REQUEST: Add File Modtime check
James Wells
25-08-2005, 00:31
Greetings,
One of the most common checks SysAdmins do on Unix systems is checking modtime for various files. They will then do various things based on this information.
What I would like to request is adding this functionality to the agent as well. The check would then return the date, in seconds, when the file was last modified. If used correctly, this would allow various other system health checks to be brought under Zabbix monitoring.
Hi!
You should be able to do that with a UserParameter using
/bin/stat --format '%Y' file
/bin/stat is included in GNU coreutils. Of course, forking programs takes resources - but is easy. ;)
/Tommie
James Wells
25-08-2005, 16:27
Yup, is how I currently do it, but as you say it has to fork a process to do it, and, even more importantly for me, it has to be pushed out in the zabbix_agentd config file.
Just a thought...
Would it be enough to store the configuration in a central location and to download it to the agent and restart that once a day? Possibly running a preprocessor on it to use the file on various hosts.
Just curious; in what way is the config-file troublesome?
/Tommie
James Wells
25-08-2005, 21:16
Just a thought...
Would it be enough to store the configuration in a central location and to download it to the agent and restart that once a day? Possibly running a preprocessor on it to use the file on various hosts.
That would work quite well for me.
Just curious; in what way is the config-file troublesome?
The config file isn't really that troublesome, it is simply an issue of economy of scale. At present, the confiuration file has to be different for each and every system, specifically the hostname entry.
For my network, due to the way my network was built, before I started working here, each configuration file has to have two other custom values set for each system. And while I manage the current configs with a pre-processor, it still adds yet one more area for mischief. And with the number and variety of systems I currently manage... It can get a bit painful if one of them should the wrong way. ;)