Skip to content

Instantly share code, notes, and snippets.

View rljohnsn's full-sized avatar
🙂

Lance Johnson rljohnsn

🙂
View GitHub Profile
================================================================================
Recipe Compile Error in /tmp/kitchen/cookbooks/os-hardening/recipes/default.rb
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
Property package_name must be one of: String, Array! You passed {"version"=>"1.0.5", "release"=>"8.el6"}.
Cookbook Trace:
---------------
{
"filesystem2": {
"by_device": {
"/dev/xvda1": {
"kb_size": "8123812",
"kb_used": "2025396",
"kb_available": "5998168",
"percent_used": "26%",
"total_inodes": "524288",
"inodes_used": "54451",
@rljohnsn
rljohnsn / Apache Tomcat 8 Start stop script init.d script
Created November 3, 2015 19:58 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
#cloud-config
coreos:
update:
reboot-strategy: etcd-lock
etcd:
name: comp01
addr: 10.x.214.y:4001
peer-addr: 10.x.214.y:7001
fleet:
metadata: name=comp01,etcd_init=leader
# Build Passes
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Passing&color=green" https://api.hipchat.com/v1/rooms/message?auth_token=AUTH_TOKEN_HERE&format=json
# Build Fails
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Failing&color=red&notify=1" https://api.hipchat.com/v1/rooms/message?auth_token=AUTH_TOKEN_HERE&format=json
@rljohnsn
rljohnsn / opennms-hipchat-notifications.xml
Last active January 17, 2016 20:55
OpenNMS configuration to post messages to Hipchat
<!-- Notification configuration to map a high thresh hold exceeded event to a hipchat message -->
<!-- OPENNMS_HOME/etc/notifications.xml -->
<!-- Rule can be as specific as desired. Filter using categories or service checks. -->
<!-- I'm using a category that matches the Hipchat Room name and a category -->
<!-- indicating production (EnvironmentFilter) -->
<notification name="Hipchat - High Threshold Exceeded room specific filter" status="on" writeable="yes">
<uei>uei.opennms.org/threshold/highThresholdExceeded</uei>
<description>A monitored device has reached a high threshold</description>
<rule>(IPADDR != '0.0.0.0') &amp; (catincRoomfilter) &amp; (isServiceName) &amp; (catincEnvironmentFilter)</rule>
param (
[Parameter(Mandatory=$true)]
[String[]]$OUPaths, #Comma separated list of OUPaths to which permissions should be applied
[Parameter(Mandatory=$true)]
[String]$UserName, #The name of the user to which the ACL should be applied
[String]$LogDir = "C:\log\",
[String]$Log = "AddOrganizationalUnitPermissions.XML"
)
function Init-Logging([string]$logDirectory,[string]$logFile,$scriptName) {