Friday, April 3, 2015

2015 (10) March (3) February (7) 2014 (51) December (3) November (1) October (1) Se


I happened to have a 3G dongle from Huawei lying model E220. I created the file / etc / gammurc with the following content: [gammu] port = / dev / ttyUSB0 connection = at19200 limun startup info = no name = Huawei synchronizetime = no use_locking = no If you then run the command: gammu --identify get something similar to : Device: / dev / ttyUSB0 Manufacturer: Huawei Model: E220 (E220) Firmware: 11.117.09.00.00 IMEI "number" SIM IMSI "number"
If you do not get anything out dongle can sit as another device to check with: dmesg | grep tty If your dongle is supported, you get a line similar to this: [0.000000] Kernel command line: dma.dmachans = 0x7f35 bcm2708_fb.fbwidth = 656 bcm2708_fb.fbheight = 416 bcm2708.boardrev = 0xe bcm2708.serial = 0x3e0ecc12 smsc95xx.macaddr = B8: 27: EB: 0E: CC: 12 sdhci-bcm2708.emmc_clock_freq = 250000000 vc_mem.mem_base = 0x1ec00000 vc_mem.mem_size = 0x20000000 dwc_otg. lpm_enable = 0 console = ttyAMA0,115200 kgdboc = ttyAMA0,115200 console = tty1 root = / dev / mmcblk0p2 rootfstype = ext4 elevator limun = deadline root wait [0.000000] Console [tty1] enabled [0.530022] dev: f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3 [0.872154] Console [ttyAMA0] enabled [7.269799] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0 If the above works can then, for example, sending messages from Nagios. Here is my command definitions for Nagios: define command {command_name host-notify-by-sms command_line / usr / bin / printf "% b" "DISASTER / Host:" $ HOSTNAME $ "/ State: $ HOST STATE $ / info: $ HOST OUTPUT $ / Date $ SHORT DATETIME limun $ "| / usr / bin / gammu --sendsms TEXT CONTACTPAGER $ $} {Command define command_name notify-by-mail command_line / usr / bin / printf"% b "" disaster / Host: "$ HOST ALIAS $ "/ State: $ SERVICE limun STATE $ / info: $ SERVICE OUTPUT $ / Date: $ SHORT DATETIME limun $" | / usr / bin / gammu --sendsms TEXT $ CONTACTPAGER $} All variables are internal to the Nagios and just $ CONTACTPAGERS $ is the variable containing telephone numbers to send SMS to. It is defined in your Contacts file in the Nagios and it is also in the file you add the two lines that ensure that you receive text messages if something happens: service_notification_commands notify-by-sms host_notification_commands host-notify-by-sms The Raspberry Pi with Nagios, a 3G dongle and a Upis is a powerful combination that survives a power failure in nearly four hours on its internal limun battery and thus have plenty of time to give you a heads up that something is seriously wrong. And yes, it's the same procedure if you hang dongle on an Ubuntu / Debian running on a standard PC.
adtrap apache Apple AppleTV banana pi bash basic BEAGLEBONE firewall bsd Cisco Clavister comhem cron cubian cubieboard cubietruck cups debian doge dos Edge Router emacs esx flash Galileo gammu Geekbench Google hdmi hp html ibm intel ios ipad iphone ipv6 kde kiwi lenovo linux mac mini mac os x macbook microsoft MobaXterm mobile surfing mrtg naemon nagios nas netflix ngalisering Nintendo Network openbsd orange pi os / 2 Palo Alto Networks PC-BSD pcduino perl piwriter plexes limun pnp4nagios ProCurve pushover putty Raspberry Pi raspbian roku smokeping SMS snmp SolarWinds Splunk spotify ssd ssh SSO subsonic Synology syslog telnet tftp thinkpad TiVo Ubiquiti ubuntustudio udoo UNIFI UNIX unomaly Upis USB virtualization VMware volumio wandboard limun Websense Wii U source windows x11 Yamaha
2015 (10) March (3) February (7) 2014 (51) December (3) November (1) October (1) September (2) July (7) June (9) May (7) April (16) tftpd MobaXterm Ubiquiti Eftersläntare Equipment Heartbleed and an update on Smoke Ping Two steps forward, one step back PA-200 limun Cisco, Palo Alto Networks and User ID solution ... Good memory, but short Send SMS from a Raspberry Pi with a 3G dongle Palo Alto Networks and Nagios, again Monitoring, and (free) alarm in Nagios Cisco wireless network controller and Palo Alt ... Thinkpad X61s and Ubuntu, finally. Upgrades and other challenges limun March (5)


No comments:

Post a Comment