0

I have problem with backups disk that are not part of RAID or anything similar ( so no notifications from raid controller if disk dies). It happens that disk dies completely and only thing that is left i mount point that is inaccessible if you try to cd into it.

Is there a way for me to monitor/get alert if disk dies ? I have zabbix at my disposal and I have found some smart scripts that can be used but I'm not certain if that will work since there will be no /dev/sdb or /dev/sda to use smart on when disk dies.

If anyone has some script to share or idea, I would be grateful on it.

chicks
  • 3,639
  • 10
  • 26
  • 36
Pimpljek
  • 3
  • 1

2 Answers2

0

/var/log/syslog should contain some information related to device disconnections; even without building stacks like ELK (ElasticSearch, Logstash, Kibana) to analyze the log, you should be able to catch such events with tools like sec.

S19N
  • 1,693
  • 1
  • 17
  • 28
  • This is correct .I found a lot of info int he messages log about it. e.g. kernel: EXT4-fs error (device sdb1): __ext4_get_inode_loc: unable to read inode block - inode=30598648, block=122162815 Do you think it would be possible to use zabbix to monitor this log and send alert when it detects it ? – Pimpljek Aug 19 '15 at 15:07
  • Not a Zabbix user, but I think the following is relevant: https://www.zabbix.com/documentation/1.8/manual/log_file_monitoring – S19N Aug 20 '15 at 11:13
0

I wrote a nagios plugin that you may be able to adapt to Zabbix. I wrote it when we had a bunch of Linux servers going read-only because of random disk errors. It helped us catch problems early and the code is there to test-write a file but we disabled that so the check could run as non-root.

chicks
  • 3,639
  • 10
  • 26
  • 36