Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Icinga plugins

# basic plugins
apt-get install -y nagios-plugins-basic
# memory
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/icinga/master/plugins/scripts/check_mem.sh -O - | bash -
# hddtemp

https://raw.githubusercontent.com/panticz/icinga/master/plugins/scripts/check_hddtemp.sh

# ipmi

http://www.thomas-krenn.com/de/wiki/IPMI_Sensor_Monitoring_Plugin_Version_1.x

# sensors

http://www.panticz.de/lm-sensors

# automatic apt-update
# harddisc temperature (http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=341&cf_id=24)
wget http://mirrors.kernel.org/ubuntu/pool/universe/h/hddtemp/hddtemp_0.3-beta15-53_amd64.deb -P /tmp
dpkg -i /tmp/hddtemp_0.3-beta15-53_amd64.deb
wget -q "http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=341&cf_id=24" -O /usr/lib/nagios/plugins/check_hddtemp
chmod go+x /usr/lib/nagios/plugins/check_hddtemp

#wget -q http://dl.panticz.de/icinga/check_hddtemp.sh -O /usr/lib/nagios/plugins/check_hddtemp
#chmod go+x /usr/lib/nagios/plugins/check_hddtemp

# Linux memory usage check (TODO: find bether one)
# REQUIRED: apt-get install -y perl
wget -q --no-check-certificate https://raw.githubusercontent.com/justintime/nagios-plugins/master/check_mem/check_mem.pl -O /usr/lib/nagios/plugins/check_mem
chmod a+x /usr/lib/nagios/plugins/check_mem
# raid
apt-get install -y nagios-plugins-contrib --no-install-recommends

or
#wget -q http://mirrors.kernel.org/ubuntu/pool/universe/n/nagios-plugins-contrib/nagios-plugins-contrib_11.20140704_amd64.deb -P /tmp

Install Cinnamon

# add PPA
sudo add-apt-repository -y ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
# install cinnamon
sudo apt-get install -y cinnamon
# OPTIONAL: install nemo
sudo apt-get install -y nemo
# Links

http://wiki.ubuntuusers.de/Cinnamon
http://wiki.ubuntuusers.de/Paketquellen_freischalten/PPA#PPA-hinzufuegen

Icinga objects

Host
http://www.panticz.de/icinga-cbjects-debian_xen_host.cfg

VoIP phone
http://www.panticz.de/icinga-cbjects-sipphone1.cfg

# disable service

register 0

Examples
define serviceescalation {
host_name localhost
service_description HTTP
first_notification 5
contact_groups admins, managers
escalation_condition host linux=d | service linux.SSH=w,c
}

Snippets

# certificate check

define service {
use generic-service
host_name www.example.com
service_description https://www.example.com
check_command check_certificate!www.example.com!443!31!7
}

define command {
command_name check_certificate
command_line /usr/lib/nagios/plugins/check_http -S -I $ARG1$ -p $ARG2$ -C $ARG3$,$ARG4$
}

User permissions
authorized_contactgroup_for_all_service_commands

Install icinga srver

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.icinga.sh";

echo "wget $URL -O - | bash -";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

Admin login
http://YOUR_IP/icinga/
user: icingaadmin
pass: icingaadmin

Icinga Apache configuration
/etc/apache2/conf-available/icinga.conf

Icinga repository
http://packages.icinga.org/

Enable automatic updates

# http://www.panticz.de/debian-ubuntu-automatic-upgrades
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/scripts/master/enable_auto_update.sh -O - | bash -

configure contact

sed -i 's|root@localhost|YOUR@EMAIL-ADDRESS.com|g' /etc/icinga/objects/contacts_icinga.cfg

change password
htpasswd -c /etc/icinga/htpasswd.users icingaadmin

plugins
http://www.panticz.de/Icinga-plugins

LDAP
a2enmod authnz_ldap

echo "pass1234" > /etc/apache2/ldap_password.inc
chmod 600 /etc/apache2/ldap_password.inc
sed -i 's|=icingaadmin|=*|g' /etc/icinga/cgi.cfg

/etc/icinga/apache2.conf
- AuthUserFile /etc/icinga/htpasswd.users
+ AuthBasicProvider ldap
+ AuthLDAPBindDN "ldap@example.com"
+ AuthLDAPBindPassword "exec:/bin/cat /etc/apache2/ldap_password.inc"
+ AuthLDAPURL "ldap://ldap.example.com:3268/dc=example,dc=com?sAMAccountName?sub?(objectClass=*)" NONE
+ AuthLDAPRemoteUserIsDN off
+ Require ldap-group CN=IPG.DevOps,OU=_IntranetPermissionGroups,DC=example,DC=com

service apache2 restart
# config

https://wiki.icinga.org/display/Dev/Icinga+Core+Debug+Config

# cgi

http://docs.icinga.org/latest/de/cgiparams.html#cgiparams-ahas
http://icinga.example.com/cgi-bin/icinga/status.cgi?servicestatustypes=20&noheader=1

Icinga

Install Icinga master (server)
http://www.panticz.de/Install-icinga

Configure by ssh (minimalistic setup on clients)
http://www.panticz.de/Install-icinga-SSH-on-client

Templates

/etc/icinga/objects/generic-service_icinga.cfg

Check syntax

sudo /etc/init.d/icinga check

Check return codes

0 - OK
1 - warning
2 - critical
3 - unknown

Icons

wget http://cdn1.iconfinder.com/data/icons/fatcow/16x16/mail_yellow.png -O /usr/share/nagios/htdocs/images/logos/base/mail.png
wget http://cdn1.iconfinder.com/data/icons/free-business-desktop-icons/16/Telephone.png -O /usr/share/nagios/htdocs/images/logos/base/phone.png
wget http://cdn1.iconfinder.com/data/icons/nuvola2/16x16/devices/printer1.png -O /usr/share/nagios/htdocs/images/logos/base/printer.png

Docs
http://docs.icinga.org/latest/en/objectdefinitions.html#objectdefinitions-hostgroup - Object Definitions
http://books.google.de/books?id=Pessksf55WQC&printsec=frontcover - Learning Nagios 3.0

Change icingaadmin password

htpasswd /etc/icinga/htpasswd.users icingaadmin

Change Icinga password

htpasswd /etc/icinga/htpasswd.users foo
sed -i 's|icingaadmin|foo|g' /etc/icinga/cgi.cfg
/etc/init.d/apache2 restart
/etc/init.d/icinga restart

Accecp (new) host key

su -s /bin/bash nagios
ssh-keygen -f "/var/lib/nagios/.ssh/known_hosts" -R backup.example.com
ssh backup.example.com

CGI
http://docs.icinga.org/latest/de/cgiparams.html
http://icinga.example.com/cgi-bin/icinga/status.cgi?servicestatustypes=29&noheader=1

Enable external commands

IpFire

http://wiki.ipfire.org/de/addons/net-snmp/start - SNMP Daemon for IpFire

Edit Cron jobs on IpFire
fcrontab -e
/etc/init.d/fcron restart

# force update dyndns every day

#9 2 * * 0 [ -f "/var/ipfire/red/active" ] && /usr/local/bin/setddns.pl -f
0 19 * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/setddns.pl -f

Upgrade
pakfire update
pakfire upgrade

Install Addons
pakfire install -y iftop

Update XEN VM

mount /dev/vg1/fw-boot /mnt/
# add XEN boot entry in GRUB configuration
cat <<EOF>> /mnt/boot/grub/grub.conf

title IPFire (legacy XEN-Kernel 2.6.32.61)
kernel /vmlinuz-2.6.32.61-ipfire-xen root=UUID=2b205431-3429-45eb-a023-5d3b0cf55ddd panic=10 console=xvc0 ro
initrd /ipfirerd-2.6.32.61-xen.img
EOF

# copy kernel and initrd
cp /media/backup/daily.0/fw/boot/*2.6.32.61* /mnt/
umount  /mnt/
# copy kernel modules
mount /dev/vg1/fw-root /mnt/
cp -a /media/backup/daily.0/fw/lib/modules/2.6.32.61-ipfire-xen/ /mnt/lib/modules/
umount  /mnt/
# start vm

xm create -c fw

Update to beta

sed -i 's/2.13/2.15/g' /opt/pakfire/etc/pakfire.conf

pakfire update --force
pakfire upgrade

Links
http://wiki.ipfire.org/de/addons/start

Read SNMP informations from a device from Ubuntu / Linux

sudo apt-get install snmp
snmpwalk -v1 -c public 192.168.1.2

Spotify under Linux / Ubuntu

[embed_url: https://raw.githubusercontent.com/panticz/installit/master/install.spotify.sh]

Install from snap

sudo snap install spotify

cat < /usr/share/applications/spotify.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/snap/bin/spotify
Name=Spotify
Icon=/snap/spotify/current/usr/share/spotify/icons/spotify-linux-24.png
EOF

Fix "GLIBC_2.14 not found"on Debian Wheezy
http://www.random-dev.de/fix-version-glibc_2-14-found-error/

Spotify ripper
http://panticz.de/spotifyripper

OpenWrt on TP-Link TL-WR941ND / TL-WR1043ND / TL-WDR3600 / TL-WDR4300

# 15.05
https://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/

# 18.06.3
https://archive.openwrt.org/releases/18.06.3/targets/ar71xx/generic/

flash tl-wr1043nd

URL=http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/openwrt-15.05.1-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin
wget ${URL} -P /tmp
scp /tmp/openwrt-15.05-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin root@192.168.1.111:/tmp/
ssh root@192.168.1.111
echo 3 > /proc/sys/vm/drop_caches
mtd -r write /tmp/openwrt-15.05.1-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin firmware

flash tl-wdr4300

URL=http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/openwrt-15.05.1-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin
wget ${URL} -P /tmp
scp /tmp/openwrt-15.05.1-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin root@192.168.1.111:/tmp
ssh root@192.168.1.1
mtd -r write /tmp/openwrt-15.05.1-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin firmware
telnet 192.168.1.1
passwd
exit

TP-Link TL-WR1043ND OpenWrt
http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd

# OpenWrt Sysupgrade
http://wiki.openwrt.org/doc/howto/generic.sysupgrade

#
# reset settings
#
# failsave
http://wiki.openwrt.org/de/doc/howto/generic.failsafe

#
# flash
#
# configure ip
echo "nameserver 192.168.1.5" > /etc/resolv.conf
ifconfig br-lan 192.168.1.111 up
route add default gw 192.168.1.5

# free memory
echo 3 > /proc/sys/vm/drop_caches

Install FreeNAS

# boot from Ubuntu LiveCD
# install xz-utils package
sudo apt-get update
sudo apt-get install xz-utils
# download
wget http://iso.cdn.freenas.org/9.1.1/RELEASE/x64/FreeNAS-9.1.1-RELEASE-x64.img.xz -O /tmp/FreeNAS-RELEASE-x64.img.xz
# install to USB pen

xzcat /tmp/FreeNAS-RELEASE-x64.img.xz | dd of=/dev/sde bs=64k
sync
reboot

# Links

http://www.freenas.org/

Pagination

  • First page
  • Previous page
  • …
  • Page 30
  • Page 31
  • Page 32
  • Page 33
  • Page 34
  • Page 35
  • Page 36
  • Page 37
  • Page 38
  • …
  • Next page
  • Last page
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung