hardware

SNMP: Linux software RAID state

Compile snmp-swraid
apt-get install -y git make build-essential libsnmp-dev
export GIT_SSL_NO_VERIFY=true
git clone https://github.com/jrossi/snmp-swraid.git /tmp/snmp-swraid
cd /tmp/snmp-swraid
make

tar cjf snmp-swraid.ubuntu-$(lsb_release -sr).tar.bz2 SWRAID-MIB.txt swRaidPlugin.so

# install
apt-get install -y snmpd snmp-mibs-downloader
wget -q http://dl.panticz.de/snmp-swraid/snmp-swraid.ubuntu-$(lsb_release -sr).tar.bz2 -O /tmp/snmp-swraid.ubuntu.tar.bz2
tar xjf /tmp/snmp-swraid.ubuntu.tar.bz2 -C /tmp
cp /tmp/SWRAID-MIB.txt $(find /var/lib -name ietf)

AXIS M1144-L network camera

# configure password
Basic Setup > Users > User Settings
Enable anonymous viewer login (no user name or password required)

Basic Setup > Date & Time > Time zone
GMT+01 (Amsterdam, Berlin, Rome, Stockholm, Warsaw)

Basic Setup > Video Stream > Overlay Settings
Rotate image
180

Include date
check
Include time
check

Text background color
transparent

Detectors > Motion Detection
Add Window
slect full window

save

Events > Action Rules
Add
Name
Motion

DHCPD

Add static DHCP entry
# create new entry
uci add dhcp host
uci set dhcp.@host[-1].name='srv1'
uci set dhcp.@host[-1].mac='00:01:02:25:96:99'
uci set dhcp.@host[-1].ip='192.168.2.55'
uci commit dhcp

# restart dhcpd server
/etc/init.d/dnsmasq restart

Ubuntu / Debian: Install and configure lm-sensors

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.lm-sensors.sh";
echo "wget -q $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Search for motherboard configuration
sudo dmidecode -t baseboard | grep "Product Name"
http://www.lm-sensors.org/wiki/Configurations/

Ignore sensors
# /etc/sensors.d/f71882fg-isa-0a00
chip "f71882fg-isa-0a00"
ignore fan2
ignore fan4

Motherboard configurations
# MSI X58 Pro-E (MS-7522) / Fintek f71882fg
echo "f71882fg" >> /etc/modules
echo "#coretemp" >> /etc/modules
modprobe f71882fg
wget http://dl.panticz.de/lm-sensors/ms-7522.conf -O /etc/sensors.d/f71882fg.conf
sensors -s

# ASUS M2N32 WS Professional
cat /etc/sensors.d/asus_m2n.conf
wget http://dl.panticz.de/lm-sensors/m2n32_ws_professional.conf -O /etc/sensors.d/m2n32_ws_professional.conf

# SuperMicro PDSMi-LN4+
wget http://dl.panticz.de/lm-sensors/pdsmi-ln4.conf -O /etc/sensors.d/pdsmi-ln4.conf

View raw sensor data
sensors -u

# default config file
/etc/sensors3.conf

# view hardwired? fan alarm value
cat /sys/class/hwmon/hwmon8/device/fan1_alarm

OPTIONAL: check with icinga
/usr/lib/nagios/plugins/check_sensors

Links
http://www.lm-sensors.org/wiki/Configurations/MSI/X58-Pro-E
http://www.lm-sensors.org/wiki/FAQ/Chapter3#HowdoIsetnewlimits