This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# chkconfig: 345 85 15 | |
# description: init script to handle tomcat and postgres with jasperserver, relying on the packaged scripts for logic. | |
#branded on freenode | |
#mbrownnyc everywhere else | |
# http://mbrownnyc.wordpress.com/technology-solutions/reliability-monitoring-solution/implement-icinga-on-centos6-with-selinux/ | |
# | |
JASPERCTLSCRIPT="/opt/jasperreports-server-cp-4.5.0/ctlscript.sh " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# chkconfig: 345 85 15 | |
# description: init script to splunk | |
# mbrownnyc on freenode, etc | |
# http://mbrownnyc.wordpress.com/technology-solutions/reliability-monitoring-solution/implement-splunk-on-centos6-with-selinux/ | |
# | |
SPLUNKBIN="/opt/splunk/bin/splunk" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define service{ | |
name generic-trap | |
service_description snmp_traps | |
is_volatile 1 | |
check_command check_dummy!0 | |
max_check_attempts 1 | |
normal_check_interval 5 | |
retry_check_interval 1 | |
active_checks_enabled 0 | |
passive_checks_enabled 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define service{ | |
host_name SERVERNAME | |
use generic-trap | |
contact_groups admins | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define service{ | |
host_name SERVER1 | |
use generic-trap | |
contact_groups admins | |
} | |
define service{ | |
host_name SERVER2 | |
use generic-trap | |
contact_groups admins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ldif, sys | |
from StringIO import StringIO | |
from ldap.cidict import cidict | |
def get_search_results(results): | |
#Given a set of results, return a list of LDAPSearchResult objects. | |
res = [] | |
if type(results) == tuple and len(results) == 2 : | |
(code, arr) = results |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# ex: python ldap_resmodel.py -q -u [email protected] -p 'password_with_a_trailing_backslash\' -b 'OU=Child OU,DC=domain,DC=local' -f | |
# see python ldap_resmodel.py -h | |
#this is written to support python 2.6 | |
# on EL, must yum -y install python-ldap | |
# you must create /usr/lib/python2.*/ldaphelper.py from https://gist.github.com/raw/4453803/ (see http://www.packtpub.com/article/python-ldap-applications-ldap-opearations) | |
# curl https://gist.github.com/raw/4453803/ > /usr/lib/python2.6/ldaphelper.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Const HKEY_LOCAL_MACHINE = &H80000002 | |
Dim oReg : Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") | |
Dim oShell : Set oShell = CreateObject("WScript.Shell") | |
Dim sPath, aSub, sKey, aSubToo, sKeyToo, dwValue | |
sPath = "SYSTEM\CurrentControlSet\Enum\USB" | |
oReg.EnumKey HKEY_LOCAL_MACHINE, sPath, aSub | |
'in one level | |
For Each sKey In aSub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
namespace MACE_DataCollector_wrapper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'on error resume next | |
Set objShell = CreateObject("WScript.Shell") | |
DeviceEnabledList = "" | |
DEVCONEXEC = "" | |
Main() | |
wscript.quit | |
Function Main() |
OlderNewer