This page describes filtering of possible monitored sensors (to save disk space, disk writes, CPU cycles, space for graphs on server page, …).
There are two basic types of plugins depending on how they handle multiple instances of same resource (something we want to measure).
/proc/diskstats
, usage of mount points when parsing output of df
, …)
If you don't want to monitor certain MySQL instance you can just comment the relevant configuration. However if you don't want to monitor disks sd[a-z]
you must use filters (though you can filter sensors of MySQL plugin too).
Sensor is an abstraction of part of some resource and associated data (currently stored in RRD). Sensor name consists of base name (everything from start until first '-') and instance name (everything after first '-'). However sensor doesn't need to have associated instance. Examples:
if_rx-eth0
if_rx
eth0
apache_busyworkers-default
apache_busyworkers
default
fs_used-/home/www-data
fs_used
/home/www-data
sys_forks
sys_forks
Sensors aren't currently tied to plugins (on bijk-node). List of valid sensors is in /usr/share/bijk/sensors.db
.
Filters are configured under plugin node in /etc/bijk/plugins.yml
. In order to add filter, add sensors
node under plugin node (system
, disk
, filesystem
, …) with include
and/or exclude
child nodes. include
and exclude
nodes must contain array of Perl regular expressions which are matched with actual sensor. Example:
filesystem: sensors: include: - '^[^-]*-/lib/my_mount' exclude: - '^[^-]*-/lib' - '^[^-]*-/dev'
It's better to put regular expression in quotes to avoid YAML parser from interpreting some special characters. The ^[^-]*
matches sensor base name. Here we filter just instances.
Similar to host_access(5)
.
update_sensor( sensor_base, timestamp, value, sensor_instance )
sensor_base
and sensor_instance
) was already checked against filters, sensor is discarded/allowed instantlyinclude
array matches with sensor name, sensor is allowedexclude
array matches with sensor name, sensor is discarded
Suppose you have Ethernet interfaces eth0
, eth0:0
, eth0:1
, eth0:2
where only the first one is real you want to monitor. The configuration for this plugin will look like this:
traffic: sensors: exclude: - 'eth0:'
If you decided you want to monitor also eth0:2
, the configuration will look like this:
traffic: sensors: include: - 'eth0:2' exclude: - 'eth0:'