Skip to content

Instantly share code, notes, and snippets.

Nick Peelman peelman

Block or report user

Report or block peelman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@peelman
peelman / save-test-data-error
Created May 21, 2019
libre-save-test-data-error
View save-test-data-error
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'
@peelman
peelman / LICENSE
Last active Mar 9, 2017
check_modified_file_count.rb
View LICENSE
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.
@peelman
peelman / README.md
Last active Jun 6, 2018
Send Slack Message
View README.md

Send Slack Message

Simple Ruby script that sends a slack message. Like Slackcat or others, but I needed more options. Uses slack-notifier gem.

YMMV.

@peelman
peelman / README.md
Last active Jun 26, 2019
check_juniper_ex_virtchas_count.rb
View README.md

Check count of members in a Juniper virtual chassis

@peelman
peelman / ed25519-puppet-example.pp
Last active Dec 30, 2016
Use puppet to generate ED25519 keys (for older systems or systems that didn't get them generated automatically)
View ed25519-puppet-example.pp
if ($::operatingsystem == 'Ubuntu') {
package { 'openssh-server' :
ensure => latest,
}
service { 'ssh':
ensure => 'running',
enable => true,
require => Package['openssh-server'],
}
@peelman
peelman / Readme.md
Created Nov 8, 2016
A very quick Nagios Plugin to check the overall status of an ESXi Host using rbvmomi.
View Readme.md

Overview

This is a quick nagios plugin / script to query an ESXi server and grab the "overall status" parameter. This is a parameter each host should respond to and will reflect if any alarms are active on the system. See the official documentation for more info.

This should give notice in the event of a power supply failure, memory errors, loss of connectivity to datastore, etc.

The script only requires a Hostname, but allows for the providing of both a hostname and IP address. The hostname is required to make sure that the status being returned is for the correct host (I don't trust CIM to always return the hosts inside the "hostFolder" in the same order). It is actually used to query the API for the provided string, so it must be accurate and reflect what the system thinks its hostname is. Our environment and conditions mandated this. YMMV.

Parameters

@peelman
peelman / README.md
Created Oct 12, 2016
check_multiaddr.pl
View README.md

A modification to the decade-old check_multiaddr perl script so that it doesn't chop off output from the called script.

View restart-openvpn.sh
#/bin/bash
IP="10.x.x.x"
#Look for number of received pings, if 0 received then restart OpenVPN service
RESULT=`ping -c 2 -W 1 $IP | grep transmitted | awk '{print $4}'`
if [ $? -ne 0 ] && [ $RESULT -eq 0 ]
then
@peelman
peelman / mac_regex.txt
Created Aug 17, 2016
regex for mac addresses
View mac_regex.txt
(([0-9a-f]{2}:){5}[0-9a-f]{2})
@peelman
peelman / pfsense-backup.sh
Created Jul 27, 2016
Backup pfSense firewalls remotely
View pfsense-backup.sh
#!/bin/sh
#
######################################################################################################
#
# Description:
# Backup pfSense 2.3 Firewalls to Local Disk
#
######################################################################################################
#
# Author: Nick Peelman
You can’t perform that action at this time.