#SNMP

Antranig Vartanianantranigv@antranigv.am
2025-06-12

antranigv.am/posts/2025/06/108

A while back I needed to get the input voltage from one of our UPSes, so I used bsnmpwalk(1) to get the information needed and ran it in a script with a loop and sleep. Running it in tmux(1), of course.

#!/bin/shlastoff="maybe"while true;do  inpvol=$(bsnmpwalk -o quiet -s public@172.20.42.101 1.3.6.1.2.1.33.1.3.3.1.3)  [ $? != 0 ] && \    curl -s -X POST \    https://api.telegram.org/botXXX:YYY/sendMessage \    -d chat_id=-ZZZ \    -d text="Something is wrong with the SNMP server"  [ "${inpvol}" -lt 200 ] && \    curl -s -X POST \    https://api.telegram.org/botXXX:YYY/sendMessage \    -d chat_id=-ZZZ \    -d text="Power seems to be off. I see Input Voltage as ${inpvol}" && \    lastoff="true"  [ "${inpvol}" -ge 200 ] && [ "${lastoff}" == "true" ] && \    curl -s -X POST \    https://api.telegram.org/botXXX:YYY/sendMessage \    -d chat_id=-ZZZ \    -d text="Power back on. I see Input Voltage as ${inpvol}" && \    lastoff="false"  printf "%s  ---  %s\n" "$(date)" "${inpvol}"  sleep 60done

This got the job done, but I guess there’s place for improvement (leave a reply).

Anyways, I kept forgetting that I need to run the script in tmux after reboots, so I decided to use daemon(8).

touch /etc/rc.localchmod +x /etc/rc.localcat - >> /etc/rc.local#!/bin/shdaemon -u nobody -r -R 5 -f -t ups-notifier -o /var/log/ups_notifier.log /usr/local/bin/ups_notifier.sh

Again, there’s a place for improvement, specifically I can use a proper rc.d(8) script, yet again, this gets the job done.

Gotta say, I love the simplicity of FreeBSD.

#FreeBSD #Shell #SNMP

Dj PorCus - WillPorCus@hostux.social
2025-06-06

hey ! looking for experiences on #UPS to be #rack ed, like 1/2U, integration in #librenms (so #snmp and #linux support) for 2x #Arista 7050 , a server, a management oobm switch ( 2960 ) and some small stuff. Im aiming at durability and option to swap batteries, possibly ethernet for mgmt.

I'm looking for alternatives to APC, would Eaton be a good option ? Other ideas ?

Ho and I'm in Europe so #230V :)

Retoots welcome !

2025-04-26

Как читать MIB файлы

Если для общения по SNMP со своими "железками" вы начинаете поиск не в документации бренда а ищете mib файлы для нее, эта статья не для вас. Ну а если слова SNMP, Net-SNMP, snmpwalk, snmpget вам уже встречались, но открыв любой "*.mib" вы предпочитаете его закрыть и обратиться к какому либо из mib browsers - вам стоит это почитать.

habr.com/ru/articles/904634/

#snmp #mib #network #азы #oid #snmpwalk

2025-04-18

Jesus ran a bug bounty on humanity. Only Judas found the zero-day. The rest filtered grace like Swiss cheese. We’re still patching Golgotha. #BugBounty #Cybersecurity #infosec #Easter #SNMP

N-gated Hacker Newsngate
2025-03-29

In today's riveting installment of "Tech Buzzwords for Dummies," we learn that someone decided to reinvent the wheel by creating yet another fancy acronym for keeping your from throwing a tantrum when the power goes out. ⚡🔌 Apparently, is the secret sauce we've all been missing—because adding more (Three-Letter Acronyms) to the mix always clears up confusion, right? 😂
nupst.serve.zone

2025-03-21

Ahh shit #netdata broke my damn #snmp stuff with there automatic discovery nonsense. Now it won't output prometheus metrics which i use to graph shit!

2025-03-11

From SNMP to INT to Open-Source: Is Your Network Monitoring Future-Ready? 🌐⚡

Network monitoring is evolving. SNMP has long been the go-to for basic device status, but its polling-based method struggles with real-time accuracy. INT (In-band Network Telemetry) changes the game, embedding real-time insights directly into data packets for unmatched visibility.

Now, open-source tools like Prometheus, Zabbix, and Grafana offer flexible, scalable, and cost-effective solutions for modern networks. Whether you're managing a small business or a cloud-scale infrastructure, choosing the right tool can optimize performance and security.

Is your network ready for the future? Let’s break it down and find the best solution! 🚀

#TechTalk #NetworkMonitoring #SNMP #INT #OpenSource #FutureReady

📖 Read more: cloudswit.ch/blogs/snmp-to-int

2025-03-06

Fundamentals SNMP

SNMP (Simple Network Management Protocol) — это протокол для управления и мониторинга сетевых устройств, таких как маршрутизаторы, коммутаторы и фаерволы. Он является частью системы управления сетью и позволяет администраторам: Раскройте все возможности SNMP

habr.com/ru/articles/888692/

#SNMP #snmp_управление #snmp_monitoring #snmpv3 #snmpмониторинг #ccna

Pasquale 📷 🇫🇷 🦻pasqualeberesti@piaille.fr
2025-02-27

A défaut d'arriver à faire fonctionner le #snmp sur #HomeAssistant directement, j'ai installé snmp sur mon Raspberry, qui va récupérer les informations sur mon routeur #Omada. Car évidemment, toutes les informations fournis par mon #Archer sont un peu trop grand public pour les récupérer sur le Omada. Bref, j'ai pu remettre ma supervision de réseau en route. Et j'en ai profité pour installer #SpeedtestCLI sur le raspberry, comme ça il mesure le débit régulièrement pour voir si ça marche bien. Et tout ça avec l'intégration #REST qui récupère les données depuis HomeAssistant sur le Rapsberry. Pourquoi faire simple quand on peut faire (un peu plus) compliqué ?

2025-02-21

When my power went out a few weeks ago due to a guest overloading the same circuit my rack is on, I realized I don't have a graceful way to shutdown all the systems in the rack except the NAS which is connected directly to the UPS.

The NAS has an SNMP server I can enable, where the other devices in my rack can then poll the SNMP server with a root cronjob and shutdown if the UPS drops below a certain level.

I'm sure there's a better way to do this…



A screenshot of a network topology schematic drawn on an iPad. The background is black, the text and shapes are white, and the interconnects are green and blue lines.
Garrett Wollmanwollman
2025-02-21

Discovering today that the reason my ancient script to check the alarm MIB on a Juniper switch is now broken is that now refuses to accept SNMP requests that arrive on any interface that isn't in the default routing-instance. It can be told to allow them, but then it just responds with an error rather than dropping the request. (One fly in the ointment: we use SNMPv3. But this has Just Worked for 20+ years!) Probably going to have to open a TAC case, sigh.

2025-02-07

Have you ever seen someone warn and advocate against U.S. government or corporate control of the Internet? Of course you have, we all have. From the root of the DNS to the big cloud providers, there is lots for non or anti-US people to worry about.

But did you know that practically all our Internet gear and much software is managed with #SNMP OIDs that all start with 1.3.6.1 and that the "6" is for DoD? Yep, that DoD.

Why haven't we seen anyone stir up outrage and launch a "US-free" OID movement yet? Surely there are some DeFi people who need a new cause?

Have a good weekend, don't disappoint me Internet. See you Monday. :-)

2025-01-25

BSD Router Project - дистрибутив предназначен для создания компактных программных маршрутизаторов, поддерживающих протоколы маршрутизации RIP, OSPF, BGP и PIM. Управление производится в режиме командной строки через CLI-интерфейс, напоминающий интерфейс Cisco IOS. Дистрибутив доступен в сборках для архитектуры x86_64 (размер установочного образа 190 МБ).
Основные характеристики дистрибутива:
В комплект входят два пакета с реализацией протоколов маршрутизации: FRRouting (форк Quagga) с поддержкой BGP, RIP, RIPng (IPv6), OSPF v2, OSPF v3 (IPv6), ISIS и BIRD с поддержкой BGP, RIP, RIPng (IPv6), OSPF v2 и OSPF v3 (IPv6).
Дистрибутив адаптирован для параллельного использования нескольких обособленных таблиц маршрутизации (FIB), привязанных к реальным и виртуальным интерфейсам.
Для мониторинга и управления может использоваться SNMP (bsnmp-ucd).
Поддерживается экспорт данных о трафике в форме потоков Netflow.
Для оценки производительности сети в состав входят утилиты NetPIPE, iperf, netblast, netsend и netreceive. Для накопления статистики о трафике используется ng_netflow.
Поддержка создания отказоустойчивых маршрутизаторов из двух серверов - в штатном режиме нагрузка может быть распределена на оба сервера, но в случае сбоя первый маршрутизатор может взять на себя нагрузку второго, а второй - первого (применяется привязка к активному серверу виртуального MAC-адреса). Реализация основана на использовании протоколов VRRP (Virtual Router Redundancy Protocol) и CARP (Common Address Redundancy Protocol), реализованный при помощи пакета ucarp.
Поддержка PPTP, PPPoE и L2TP при помощи mpd (Multi-link PPP daemon).
Поддержка ограничения пропускной способности при помощи IPFW + dummynet или ng_car.
Для Ethernet поддерживается работа с VLAN (802.1q), агрегация линков и использование сетевых мостов (802.1w, Rapid Spanning Tree Protocol).
Для мониторинга применяется пакет monit.
Поддержка VPN: GRE, GIF, IPSec (IKEv1 и IKEv2 со strongswan), OpenVPN и Wireguard.
Поддержка NAT64 с использованием демона tayga и встроенная поддержка туннелей IPv6-to-IPv4.
Возможность установки дополнительных программ, используя пакетный менеджер pkgng.
Использование в качестве DHCP-сервера dnsmasq, а в качестве агента доставки почты - ssmtp.
Поддержка управления через SSH, последовательный порт, telnet и локальную консоль. Для упрощения администрирования в комплект входит утилита tmux (BSD-аналог screen).
Загрузочные образы сгенерированы на основе FreeBSD при помощи скриптов из NanoBSD.
Механизм обновления системы основывается на создании двух разделов на Flash-накопителе: новая версия загружается во второй раздел, который после перезагрузки становится активным, а другой раздел ожидает появления очередного обновления (разделы меняются местами). В случае выявления проблем с установленным обновлением возможен откат на прошлое состояние системы.
Для проверки целостности системы для каждого файла сохраняется контрольная сумма sha256.

#BSDRouterProject #FreeBSD #Routing #Networking #OSPF #BGP #VRRP #Firewall #NAT64 #OpenVPN #Wireguard #NetFlow #CLI #CompactRouter #NanoBSD #IPv6 #SNMP #L2TP #ipsec

pocketnet.app/pureaceton?ref=P

After a whole day of fighting with this #Python script I think I'm finally pleased with the results.

My goal is to be able to scan a network for hosts and their details, including MAC address. The rub is more often than not I'm across a layer 3 network (ie: a VPN), and thus do not have access to the layer 2 data.

It was working solely from the ARP table of a remote device, (commonly a gateway), but it wasn't seeing all devices, (presumably because some devices did not send traffic through the gateway recently), and it was single threaded, so scanning an entire network would take a fair amount of time.

New version pings every device on the network to try to encourage that remote ARP cache to be populated and is now multi threaded.

I now better understand why the Pythonic way is just to `try` something and catch errors when necessary. These queues can be difficult to wrap your head around, especially when you have multiple threads manipulating the queue simultaneously.

Oh yeah, it's available on github of course. github.com/cdp1337/net-diag (new functionality will be posted shortly)

#Networking #SNMP #SysAdmin

(thinking about ways to get data from the TZ to someplace meaningful) i need a network protocol that is simple, and designed for lightweight monitoring... hmmmm.... i know! #pinball #tz #snmp

A screenshot showing audit data from a Twilight Zone pinball machine being retrieved via SNMP.
2025-01-12

Мониторим ONU/ONT Huawei в телеграмм боте

Всем привет. В этом посте я расскажу, как я упростил себе, и операторам тех поддержки жизнь, с помощью телеграм бота и питона. Избавив себя от просмотра состояния абонентских терминалов (ONU/ONT) через SSH.

habr.com/ru/articles/873134/

#huawei #olt #snmp #python #telegram_bot

Kushal Das :python: :tor:kushal@toots.dgplug.org
2024-11-16

Any #rust programmer on the timeline can show me a good example of creating an #SNMP client in Rust using the existing libraries? #network
I need to fetch data from a lot of systems.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst