Posted mostly for inspiration.
- Copy
nokia_sfp_changed.rb
to/usr/local/bin
(or wherever you store scripts on your system(s). - Be sure the following Gems are installed:
optparse
,slack-notifier
,snmp
# translate a note for dns if it exists | |
if [postfix_dsn] { | |
translate { | |
source => "postfix_dsn" | |
target => "postfix_dsn_description" | |
dictionary => { | |
"2.0.0" => "Success" | |
"2.1.5" => "Success - Filtered to folder" | |
"2.6.0" => "Success - Message queued for delivery" | |
"4.0.0" => "Unknown Failure (will retry)" |
Allows using RANCID to extract platform and configuration from the Nokia IXR 7250, IXR 7220, and SXR 7350 series devices.
Currently the attached module and configuration will fetch the following:
show version
- Retrieve basic metrics about the systemshow platform fan-tray
- Retrieve fan tray infoWhen you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.
Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.
Running Veeam and snmptrapd / snmptt? Want Slack notifications from Veeam for jobs? This script does the following:
Borrows liberally from the Netmask codebase, but structured to be used more readily in a browser context.
Subnet.isIP('10.0.0.0') // true
Subnet.isIP('10.0.0.257') // false
var subnet = new Subnet('10.0.0.0',12);
subnet.base; // 10.0.0.0
subnet.mask; // 255.240.0.0
Index /tmp/snmpsim/_opt_librenms_tests_snmpsim__ns-bsd.dbm does not exist for data file /opt/librenms/tests/snmpsim//ns-bsd.snmprec | |
Building index /tmp/snmpsim/_opt_librenms_tests_snmpsim__ns-bsd.dbm for data file /opt/librenms/tests/snmpsim//ns-bsd.snmprec (open flags "n")... | |
ERROR at line 1, value 'NS-BSD SERIAL i386': 'nextFlag' | |
ERROR at line 2, value '1.3.6.1.4.1.8072.3.2.8': 'nextFlag' |
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, | |
and distribution as defined by Sections 1 through 9 of this document. |