Zabbix for greater control of file system detection


If you need greater control over file system detection

On the Client

Create file fs_discovery.pl in script directory. Set owner and permissions

chmod zabbix:zabbix fs_discovery.pl
chmod 755 fs_discovery.pl

Create file /etc/zabbix/zabbix_agentd.d/ispconfig_fs with the following contents

# replacement file system discover
UserParameter=vfs.fs.discovery2,/opt/zabbix/fs_discovery.pl

Restart Zabbix Agent

On the Server

Add template 'RWR Template OS Linux' and use it instead of 'Template OS Linux' on the machines.

What this does

The fsdiscovery is can be set on a machine by machine basis to ignore certain mounts. I created this because ISPConfig3 makes a couple of mounts for each site created. These are bind mounts which means they are there simply for convenience and logic (it puts the logs for each web site into that web sites directory tree), but on even a small installation results in tons of extra mount points, which Zabbix dutifully notifies you of.

the first line of code in the script fs_discovery.pl is

my @mounts = ´grep -v 'var/www/clients' /proc/mounts´;

and this can be modified to allow  you to customize what mount points are searched for monitoring.

Attached files: fs_discovery.pl

Last update:
2015-07-31 02:44
Author:
Rod
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.