In this post I am going to explain how I used SNMP traps on a Linux Debian system in order to get some telegram notifications. I used them in order to be informed in case our company UPS systems runs on battery. First of all, you have to setup and test a Telegram Notification script. I used the one here: https://github.com/samsulmaarif/telegram-notify , it is very easy to install and use. The binary is installed in: /usr/local/bin/telegram-notify We assume that you already have a telegram bot running. The two things you 've got to find are your bot api-key and chat id or Channel id. In case you are not yet using a telegram bot, there are plenty of guides showing how to setup one and how to get your user-id. In order to get SNMP traps from your UPS Network management card, you should first enable them in the "Notifications". Just enter your Linux hostname as a trap receiver. First install snmpd and snmptrapd sudo apt install snmpd snmptrapd Edit your config files: The o...
Requirements: -an IFTTT account -a Dropbpx account linked to your IFTTT account -a server running linux (mine runs Debian linux). - incrontab package, available on most linux distros. First of all, install Dropbox on your linux box. You may find instructions here: https://www.dropbox.com/install?os=lnx Run Dropbox and create a folder named IFTTT on your home Dropbox folder. mkdir ~/Dropbox/IFTTT Then, you have to create your IFTTT recipe at ifttt.com. You may use whatever "this" statement you wish. On "that" statement you chose Dropbox, and create a file. Give a name to your file, for my example I use "runme". In the content you may put whatever you want. In Dropbox folder path you use IFTTT. Create your script file on your home folder named "script.sh" and make it executable: chmod +x script.sh. Make sure your script executes properly: ./script.sh Add the user that has both rights to run the script and to write into the Drop...
I am using a Ubiquiti AirRouter flashed with OpenWrt as a PPPoE client and my old linksys ADSL modem/router is configured in bridged mode and only handles the ADSL connection. This setup applies to openwrt Attitude Adjustment 12.09 and it is updated on Nov 2014 You have to install the follwing packages: dhcp6-client radvd opkg update opkg install radvd dhcp6-client If you are using the Luci web i/f, you should enable "Enable IPv6 negotiation on the PPP link" on the WAN advanced settings. It is more efficient though to do the changes via cli: config interface 'wan' option _orig_ifname 'eth1' option _orig_bridge 'false' option ifname 'eth1' option proto 'pppoe' option password 'somepasshere' option username 'username.ath.forthnet.gr@stv6forthnet.gr' option ipv6 '1' option keepalive '5 5' Then, edit /etc/config/dhcp6c : config in...
Σχόλια
Δημοσίευση σχολίου