Hello Damien,
There is a little bug in the script
/usr/sbin/hpacucli ctrl all show config | grep drive logicaldrive 1 (273.4 GB, RAID 1+0, OK) physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 146.8 GB, OK) physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 146.8 GB, OK) physicaldrive 2I:1:3 (port 2I:box 1:bay 3, SAS, 146.8 GB, OK) physicaldrive 2I:1:4 (port 2I:box 1:bay 4, SAS, 146.8 GB, OK) physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146.8 GB, OK, spare)
/usr/sbin/hpacucli ctrl all show config | grep drive | awk '{print $NF}' | sed s/\)// OK OK OK OK OK Spare
So the sparedisk is reported as bad 😊
My change below: STATUS=$(echo $OUTPUT | awk '{print $NF}' | sed s/\)//)
if [ "$STATUS" == "spare" ] ; then
STATUS=$(echo $OUTPUT | cut -d',' -f4 | sed 's/ //g')
fi
-----Oorspronkelijk bericht----- Van: Steffan <mailinglist at tikklik.nl> Verzonden: donderdag 11 oktober 2018 16:22 Aan: 'xymon at xymon.com' <xymon at xymon.com> Onderwerp: xymon at xymon.com
Hello Damien,
I treid your script. When running in testmode it works fine. It is creating /var/lib/xymon/tmp/xymon-hardware.msg
But when running as a deamon i am getting /bin/cat: /var/lib/xymon/tmp/xymon-hardware.msg: No such file or directory
Any idees?
Steffan
-----Oorspronkelijk bericht-----
Hi Théo,
With all due modesty, I wrote something that could match with your expectations : https://wiki.xymonton.org/doku.php/monitors:hardware_sensors
Regards, Damien Martins