Default when you install Munin Cpanel lacks a few nice configs that we have to make by hand. За мен един от тях е мониторинга на температурата на дисковете.
In general, the configuration is trivial
1. We need to determine the type of our disks – it can be one of the following : they, scsi, sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,x][,N], usbsunplus, marvell, areca,NEITHER, 3ware,N, hpt,L/M/N, megaraid,N, cciss,N, auto, test. The easiest way to do this is through cat's “/proc / ide” or “/proc/scsi”. To me:
# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD1003FBYZ-0 Rev: 01.0 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD1003FBYX-0 Rev: 01.0 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi4 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: TOSHIBA DT01ACA1 Rev: MS2O Type: Direct-Access ANSI SCSI revision: 05
As you can see I have 3 ATA disk type.
2. За да почнем да следим температурата трябва да опишем в munin node дисковете ни. В файла /etc/munin/plugin-conf.d/hddtemp_smartctl добавяте записи от следният тип
# cat /etc/munin/plugin-conf.d/hddtemp_smartctl [hddtemp_smartctl] user root env.drives sda sdb env.args_sda -d ata env.args_sdb -d ata
Можем да ударим тест на нашият бъдещ конфиг по следният начин
# env drives="sda sdb sdc" args_sda="-d ata" args_sdb="-d ata" args_sdc="-d ata" /etc/munin/plugins/hddtemp_smartctl sda.value 32 sdb.value 33 sdc.value 33
If you get values then everything is ok. If you get an error you need to check if everything is described correctly. You should restart your munin nod and wait 10-15 min to populate some data and start drawing a graph. You can check /var/log/munin/munin-node.log for errors and easy troubleshooting.
If you want to receive an email at a critical disk temperature, you must add a description for the critical temperature:
[example.com] address 127.0.0.1 use_node_name yes hddtemp_smartctl.sda.critical 55 hddtemp_smartctl.sdb.critical 55