Monthly Shaarli

All links of one month in a single page.

August, 2025

Indre-et-Loire : un motard contrôlé à 177 km/h sur une route départementale, sans assurance et sans permis valide - ici

Sur une portion limitée à 90km/h, un motard a été flashé à 177 km/h samedi 30 août sur une route départementale d'Indre-et-Loire. Le pilote s'est vu retiré sa moto et son permis non valide.
"Il roulait quasiment deux fois au-dessous de la limite autorisée. "

http://zabbix top items

CREATE OR REPLACE FUNCTION get_top_itemids_history_uint()
RETURNS TABLE (itemid bigint, key varchar(2048), hosts varchar(2048), cnt bigint ) AS $$
DECLARE
last_chunk text;
chunk_schema text := '_timescaledb_internal';
BEGIN
SELECT chunk_name
INTO last_chunk
FROM timescaledb_information.chunks
WHERE hypertable_name = 'history_uint'
ORDER BY range_end_integer DESC
LIMIT 1;

RETURN QUERY EXECUTE format(
    'SELECT
        i.itemid,
        i.key_,
        h.host,
        COUNT(*) AS cnt
    FROM
        _timescaledb_internal.%I AS hu
        JOIN items i ON hu.itemid = i.itemid
        JOIN hosts h ON i.hostid = h.hostid
    GROUP BY
        i.itemid, i.key_, h.host
    ORDER BY
        cnt DESC
    LIMIT 10', last_chunk);

END;
$$ LANGUAGE plpgsql;

-- Appeler la fonction
SELECT * FROM get_top_itemids_history_uint();

CREATE OR REPLACE FUNCTION get_top_itemids_history()
RETURNS TABLE (itemid bigint, key varchar(2048), hosts varchar(2048), cnt bigint ) AS $$
DECLARE
last_chunk text;
chunk_schema text := '_timescaledb_internal';
BEGIN
SELECT chunk_name
INTO last_chunk
FROM timescaledb_information.chunks
WHERE hypertable_name = 'history'
ORDER BY range_end_integer DESC
LIMIT 1;

RETURN QUERY EXECUTE format(
    'SELECT
        i.itemid,
        i.key_,
        h.host,
        COUNT(*) AS cnt
    FROM
        _timescaledb_internal.%I AS hu
        JOIN items i ON hu.itemid = i.itemid
        JOIN hosts h ON i.hostid = h.hostid
    GROUP BY
        i.itemid, i.key_, h.host
    ORDER BY
        cnt DESC
    LIMIT 10', last_chunk);

END;
$$ LANGUAGE plpgsql;

-- Appeler la fonction
SELECT * FROM get_top_itemids_history();

Passage de Debian 12 (Bookworm) à Debian 13 (Trixie)

https://zythom.fr/2025/08/passage-de-debian-12-bookworm-a-debian-13-trixie/

Etape 1 : partir d’un système propre
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt –purge autoremove
sudo reboot

Etape 2 : préparer la migration
cat /etc/debian_version
mkdir ~/apt.old
cp /etc/apt/sources.list ~/apt.old
cp -r /etc/apt/sources.list.d/ ~/apt.old
sudo sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list
sudo sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list.d/*

Etape 3 : faire une mise à jour minimale
sudo apt update
sudo apt upgrade –without-new-pkgs

Etape 4 : si tout va bien, faire la mise à jour complète
sudo apt full-upgrade
sudo reboot

Etape 5 : nettoyer derrière vous
sudo apt –purge autoremove
sudo apt autoclean