Newer
Older
check file syslog_iscsi with path /var/log/syslog
if match "Kernel reported iSCSI connection [0-9]:[0-9] error" then alert
<% @local_volumes.split(",").each do |volume| -%>
<% unless @exclude_filesystems.include?(volume) -%>
<% unless volume.start_with?("/var/lib/docker/zfs","/var/lib/docker/overlay2") -%>
<%
df = %x(df --output=size,itotal $volume ).split("\n")[1].split(' ')
if df[0].to_i / 5 > 800000
usage_pc = 95
elsif df[0].to_i / 5 > 400000
usage_pc = 90
else
usage_pc = 80
check filesystem fs_<%= volume %> with path <%= volume %>
if space usage > <%= usage_pc %>% for 5 times within 15 cycles then alert
if inode usage > <%= usage_pc %>% for 5 times within 15 cycles then alert

Benedikt Wegmann
committed
<% end -%>

Benedikt Wegmann
committed
<% if @nfs_volumes.to_s != '' -%>

Benedikt Wegmann
committed
<% @nfs_volumes.split(",").each do |nfs_volume| -%>
<% unless @exclude_filesystems.include?(nfs_volume) -%>

Benedikt Wegmann
committed
check filesystem fs_<%= nfs_volume %> with path <%= nfs_volume %>
if space usage > 80% for 5 times within 15 cycles then alert
if inode usage > 80% for 5 times within 15 cycles then alert
<% end -%>
<% end -%>