Search the docs!

Proxmox: Remove subscription nag from UI


Remove subscription nag from UI:

Just paste command in pve shell:

echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/    javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
apt --reinstall install proxmox-widget-toolkit &>/dev/null	

Checkmk check podman containers

Checkmk local script:

# /usr/lib/check_mk_agent/local/check_podman.sh
#!/bin/bash
# Podman check
# mik, 2024.11.29

# Podman user
puser=admin

# Container overview
ncont=$(su - $puser -c "podman info|grep -A 4 containerStore"|head -2|tail -1|awk {'print $2'})
rcont=$(su - $puser -c "podman info|grep -A 4 containerStore"|head -4|tail -1|awk {'print $2'})
scont=$(su - $puser -c "podman info|grep -A 4 containerStore"|head -5|tail -1|awk {'print $2'})

# Checks: Images, Containers, Volumes
images=$(su - $puser -c "podman system df"|head -2|tail -1|awk {'print $4'})
containers=$(su - $puser -c "podman system df"|head -3|tail -1|awk {'print $4'})
volumes=$(su - $puser -c "podman system df"|head -3|tail -1|awk {'print $5'})

Checkmk local script

Checkmk local script:

Read out data from an rrd file and show the values e.g. bandwith up- and downstream:

# /usr/lib/check_mk_agent/local

#!/bin/bash
# set -x

workdir='/opt/iperfmon'
#get data for altoo_office
downstream=$(/usr/bin/rrdtool lastupdate $workdir/iperfmon.rrd |tail -1|awk '{ print $2}')
upstream=$(/usr/bin/rrdtool lastupdate $workdir/iperfmon.rrd |tail -1|awk '{ print $3}')

echo "0 Iperfmon downstream=$downstream|upstream=$upstream Iperf up- and downstream: $upstream | $downstream (MBit/s)"

#echo "0 My service myvalue=73 My output text which may contain spaces"

Opnsense acme-client

Acme client- let’s encrypt

Issue new cert in opnsense UI

Wait for a long time until it’s issued with acme.sh client.

Certs on system

Find all certs in:

/var/etc/acme-client/

Checkmk: Show current logins

Linux

# Check disk free
# mki- 2023.05.09
count=$(df -h / |awk {'print $5'} |tail -1)
echo "P "Container-Filesystem" count=$count;80;90 Overlay-Filesystem"

Homeassistant config

Add-ons

deConz add-on

deConz -> config

Options:

use serial connection: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2651844-if00

NGINX Home Assistant SSL proxy add-on

no special config needed

but

upload cert and privkey file

-> that’s why you have to use the Terminal&SSH add-on

Geräte&Dienste / Integration

  • Integration hinzufügen
  • deConz
  • Take ipaddress and port -> for that check API information in deConz Gateway (go by add-on)

deconz-gateway-config.png

Github access tokens

Repo usage with username and password on github is deprecated.

Use Personal access tokens: https://github.com/settings/tokens

or: Github -> Settings -> Developer Settings -> Personal access tokens -> Tokens (classic)

To store the token (credential) for your machine:

git config --global credential.helper store
(store is example)

after that:

git push

Login with username and Token!

Linux ssh key commands

Check a key

ssh-keygen -lf [key]

Scan a key

ssh-keyscan [host]

–> then do a scan ;-)

JavaScripts

Last edit in HTML

<script>
document.write("last edit:" + " " +document.lastModified);
</script>