This file contains 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 | |
while read OLD_SHA1 NEW_SHA1 REFNAME; do | |
export GIT_WORK_TREE=/tmp/nagiosworkdir | |
/usr/bin/git checkout -f $NEW_SHA1 | |
# sed -i "s|cfg_dir=CHANGEWITHGIT|cfg_dir=${GIT_WORK_TREE}\/config|g" $GIT_WORK_TREE/etc/nagios.cfg | |
sed -i "s|cfg_file=\/usr\/local\/nagios\/etc\/objects\/commands.cfg|cfg_file=${GIT_WORK_TREE}\/objects\/commands.cfg|g" $GIT_WORK_TREE/nagios.cfg | |
sed -i "s|cfg_file=\/usr\/local\/nagios\/etc\/objects\/contacts.cfg|cfg_file=${GIT_WORK_TREE}\/objects\/contacts.cfg|g" $GIT_WORK_TREE/nagios.cfg | |
sed -i "s|cfg_file=\/usr\/local\/nagios\/etc\/objects\/timeperiods.cfg|cfg_file=${GIT_WORK_TREE}\/objects\/timeperiods.cfg|g" $GIT_WORK_TREE/nagios.cfg | |
sed -i "s|cfg_file=\/usr\/local\/nagios\/etc\/objects\/templates.cfg|cfg_file=${GIT_WORK_TREE}\/objects\/templates.cfg|g" $GIT_WORK_TREE/nagios.cfg | |
sed -i "s|cfg_file=\/usr\/local\/nagios\/etc\/objects\/hosts.cfg|cfg_file=${GIT_WORK_TREE}\/objects\/hosts.cfg|g" $GIT_WORK_TREE/nagios.cfg |
This file contains 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
############################# | |
# Base Server Class | |
############################# | |
class server::base { | |
# User Management | |
include org::users | |
realize ( | |
Users::Virtual::Localuser["user3"], | |
) |
This file contains 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/sh | |
# Save this file as /etc/network/if-up.d/mod-etc-issue and chmod +x | |
if [ "$METHOD" = loopback ]; then | |
exit 0 | |
fi | |
# Only run from ifup. | |
if [ "$MODE" != start ]; then |
This file contains 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
#scan network for Windows Servers and Printers | |
function get-serversin{ | |
<# | |
.Description | |
Retrives hosts running Windows Server operating systems in a specified network range | |
.Parameter | |
Network start address. Normally starts at .0 of the network range. | |
.Example | |
Get-ServersIn -Network 192.168.1.0 | |
Scans from 192.168.1.0 to 192.168.1.254 |
This file contains 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
Here's how it all went down. I've listed the "Received:" headers | |
in chronological order for ease of viewing. To be clear, this is | |
the *reverse* order from how they're typically seen in in a normal | |
listing of email headers. | |
The first "Received" header is when Google's mail system actually received | |
Howard's mail. Times are in PDT. As you can see, Google ingested his email | |
at 19:54 PDT, which is 21:54 CDT. Scan down to the last header, (when my email | |
service received the email), and you can see the whole delivery happened in | |
under three seconds. |
This file contains 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
""" | |
Python program for listing the vms on an ESX / vCenter host | |
""" | |
from optparse import OptionParser, make_option | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vmodl | |
import argparse |
This file contains 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
$ ping 192.168.5.6 | |
PING 192.168.5.6 (192.168.5.6): 56 data bytes | |
76 bytes from 50-204-69-121-static.hfc.comcastbusiness.net (50.204.69.121): Communication prohibited by filter | |
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst | |
4 5 00 5400 8e9f 0 0000 40 01 61cb 192.168.3.232 192.168.5.6 |
This file contains 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
➜ angerona git:(master) docker run 15d | |
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. | |
'Supervisord is running as root and it is searching ' | |
2014-11-05 22:34:09,167 CRIT Supervisor running as root (no user in config file) | |
2014-11-05 22:34:09,167 WARN Included extra file "/etc/supervisor/conf.d/makecert.conf" during parsing | |
2014-11-05 22:34:09,168 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing | |
2014-11-05 22:34:09,168 WARN Included extra file "/etc/supervisor/conf.d/system.conf" during parsing | |
2014-11-05 22:34:09,168 WARN Included extra file "/etc/supervisor/conf.d/angerona.conf" during parsing | |
2014-11-05 22:34:09,200 INFO RPC interface 'supervisor' initialized | |
2014-11-05 22:34:09,200 CRIT Server ' |
This file contains 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
$ sar | |
Linux 3.13.0-70-generic (hostname) 04/03/2017 _x86_64_ (8 CPU) | |
12:00:01 AM CPU %user %nice %system %iowait %steal %idle | |
12:05:01 AM all 0.34 2.26 2.24 0.31 0.00 94.85 | |
12:15:01 AM all 0.26 2.29 1.89 0.20 0.00 95.36 | |
12:25:01 AM all 0.30 2.52 2.06 0.25 0.00 94.87 | |
12:35:01 AM all 0.33 2.51 2.02 0.31 0.00 94.84 | |
12:45:01 AM all 7.55 2.38 4.75 0.55 0.00 84.77 | |
12:55:01 AM all 11.91 1.98 2.48 0.66 0.00 82.98 |
This file contains 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
Apr 6 09:13:36 auri EvoluentAgent[1256]: IORegistryEntrySetCFProperties Error! Result = 0x10000003 | |
Apr 6 09:13:44 auri EvoluentAgent[1256]: IORegistryEntrySetCFProperties Error! Result = 0x10000003 | |
Apr 6 09:34:04 auri com.apple.xpc.launchd[1] (com.evoluent.agent): Please switch away from OnDemand to KeepAlive. | |
Apr 6 09:34:06 auri EvoluentAgent[328]: IORegistryEntrySetCFProperties Error! Result = 0x10000003 | |
Apr 6 09:34:15 auri com.apple.xpc.launchd[1] (com.evoluent.agent): Please switch away from OnDemand to KeepAlive. | |
Apr 6 09:34:28 auri EvoluentAgent[1151]: IORegistryEntrySetCFProperties Error! Result = 0x10000003 | |
Apr 6 09:34:51 auri EvoluentAgent[1151]: IORegistryEntrySetCFProperties Error! Result = 0x10000003 | |
Apr 6 09:35:04 auri EvoluentAgent[1151]: IORegistryEntrySetCFProperties Error! Result = 0x10000003 | |
Apr 6 09:42:44 localhost com.apple.xpc.launchd[1] (com.evoluent.agent): Please switch away from OnDemand to KeepAlive. | |
Apr 6 09:42:47 localhost EvoluentAgent[355]: IORegistryEntrySetCFPropertie |
OlderNewer