commit 9c92bdef60a6edfa2743c77659a5ae82330f1bbd Author: juanlf Date: Wed Jul 30 09:12:49 2025 +0000 Subir archivos a "/" diff --git a/get_tags.bash b/get_tags.bash new file mode 100644 index 0000000..a78077b --- /dev/null +++ b/get_tags.bash @@ -0,0 +1,63 @@ + +#!/bin/bash + +# === CONFIGURACIÓN === +ZBX_URL="https://zabbix.seat.vwg/api_jsonrpc.php" +API_TOKEN="508108e67eb8534e049e105d84e75ae1ac8673ac74a0a165e440a40a8e773362" + +# Fecha UNIX de hace 90 días +FROM_UNIX=$(( $(date +%s) - 7776000)) + +# Límite de resultados por página +LIMIT=1000 +START=0 +PAGE=1 +TMPFILE=$(mktemp) + +echo "⏳ Buscando triggers modificados desde: $(date -d @$FROM_UNIX)" +echo "📄 Página $PAGE (offset $START)..." + +read -r -d '' PAYLOAD < "$TMPFILE" + +# Mostrar resultados +echo -e "\n✅ Tags únicos encontrados:" +sort "$TMPFILE" | uniq + +echo -e "\n📊 Conteo por tipo de tag:" +cut -d: -f1 "$TMPFILE" | sort | uniq -c | sort -nr + +rm -f "$TMPFILE"