Skip to content

Instantly share code, notes, and snippets.

💭
I have a status.

Jason Antman jantman

💭
I have a status.
Block or report user

Report or block jantman

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
@jantman
jantman / zmeventnotification.pl
Created Jul 5, 2018
zmeventnotification.pl
View zmeventnotification.pl
#!/usr/bin/perl -T
#
# ==========================================================================
#
# HEAVILY HACKED-UP VERSION OF zmeventnotification.pl from
# https://github.com/pliablepixels/zmeventserver/blob/master/zmeventnotification.pl
# as of b31b08f
#
# Modified to just execute a system() shell command and pass it the EventId, MonitorId and Cause.
# The command is run with "&" appended to background it and return control to Perl so we don't
@jantman
jantman / Jenkinsfile
Last active Jun 11, 2018
c7n_custom_template
View Jenkinsfile
#!/usr/bin/env groovy
// internal/private shared library; not terribly important to the functionality
@Library('re-pipeline-library@master') _
node {
deleteDir()
checkout scm
stash name: 'configs', includes: '*.yml, templates/*.html.j2'
View inventory.py
#!/usr/bin/env python
"""
Process URL for intersphinx targets and emit html or text
originally retrieved from:
https://gist.github.com/gmr/11359058
fixed for python3 and pep8 compliance by jantman
"""
@jantman
jantman / set_pool_for_vip.py
Created Jan 7, 2016
bigsuds_python_f5_set_pool_for_vip
View set_pool_for_vip.py
# This is a COMPLETELY UNTESTED code sample, written off the top of my head. Consider it pseudocode.
# It also needs more error checking; BigSuds *should* raise exceptions for any problem.
import re
import bigsuds as pc
# INPUTS
vip_name = 'myvip'
new_pool_name = 'bluepool' # the pool to send traffic to
@jantman
jantman / 0_description.md
Created Aug 21, 2014
service noop issues
View 0_description.md

I feel like I must be missing something here.

  • The catalog JSON clearly shows noop=true on the Service[httpd] resource.
  • The agent log clearly shows the service was refreshed anyway
  • The httpd service logs clearly show the refresh actually happened (take my word on this one)
  • The report clearly does not reflect the refresh event - "out_of_sync_count: 0" "change_count: 0"
@jantman
jantman / error_output
Created Jul 30, 2014
beaker error - see rabbitmqadmin_spec.rb line 51
View error_output
/home/jantman/personal/git/puppetlabs-rabbitmq/vendor/ruby/1.9.1/gems/beaker-1.16.0/lib/beaker/dsl/helpers.rb:438:in `confine': undefined method `hosts=' for #<Class:0x000000035b2360> (NoMethodError)
from /home/jantman/personal/git/puppetlabs-rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb:51:in `block (2 levels) in <top (required)>'
from /home/jantman/personal/git/puppetlabs-rabbitmq/vendor/ruby/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/example_group.rb:368:in `module_eval'
from /home/jantman/personal/git/puppetlabs-rabbitmq/vendor/ruby/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/example_group.rb:368:in `subclass'
from /home/jantman/personal/git/puppetlabs-rabbitmq/vendor/ruby/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/example_group.rb:342:in `describe'
from /home/jantman/personal/git/puppetlabs-rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb:47:in `block in <top (required)>'
from /home/jantman/personal/git/puppetlabs-rabbitmq/vendor/ruby/1.9.1/gems/rspec-core
@jantman
jantman / linkd-configuration.xml
Created Apr 18, 2014
linkd-configuration.xml
View linkd-configuration.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<linkd-configuration threads="5" initial_sleep_time="3600000"
snmp_poll_interval="18000000" discovery_link_interval="1800000"
enable-discovery-download="true">
<iproutes>
<vendor vendor_name="netscreen" sysoidRootMask=".1.3.6.1.4.1.3224"
class-name="org.opennms.netmgt.linkd.snmp.IpRouteTable">
<specific>1.51</specific>
@jantman
jantman / example.pp
Created Feb 7, 2014
puppet-managed nagios resources with purging
View example.pp
$config_dir = '/etc/nagios'
Nagios_host <<||>> {
target => "${config_dir}/nagios_host.cfg",
before => File["${config_dir}/nagios_host.cfg"],
}
file { "${config_dir}/nagios_host.cfg":
ensure => file,
owner => $nagios_user,
@jantman
jantman / manual-example.html
Created Jan 20, 2014
Markdown generated html
View manual-example.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Manual Examples</title>
<link rel="stylesheet" href="../../../theme/css/main.css" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
@jantman
jantman / manual-example.md
Created Jan 20, 2014
Example Pelican markdown
View manual-example.md

Title: Manual Examples Date: 2014-01-19 06:00 Author: admin Category: Foo Tags: foo Slug: manual-examples

These are some manual examples...

A fenced code block of Python:

You can’t perform that action at this time.