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
#!/usr/bin/ruby1.9.1 | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'rvc' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' |
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
from __future__ import print_function | |
from pyVim import connect | |
from pyVmomi import vim | |
si = connect.SmartConnect(host='vcsa', user='my_user', pwd='my_password') | |
content = si.RetrieveContent() | |
# A list comprehension of all the root folder's first tier children... | |
datacenters = [entity for entity in content.rootFolder.childEntity |
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
$ journalctl -f -u xymon.service | |
-- Logs begin at Mon 2015-06-15 23:56:58 EDT. -- | |
Jun 16 12:05:59 myhost xymon.sh[9915]: Xymon stopped | |
Jun 16 12:06:41 myhost systemd[1]: Started Xymon. | |
Jun 16 12:06:41 myhost systemd[1]: Starting Xymon... | |
Jun 16 12:11:56 myhost systemd[1]: Starting Xymon... | |
Jun 16 12:11:56 myhost systemd[1]: Started Xymon. | |
Jun 16 12:19:35 myhost systemd[1]: [/etc/systemd/system/xymon.service:9] Unknown lvalue 'PIDfile' in section 'Service' | |
Jun 16 12:19:52 myhost systemd[1]: Stopping Xymon... | |
Jun 16 12:19:52 myhost xymon.sh[11052]: Xymon stopped |
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
$ ps aux | grep xymon | |
xymon 10441 0.0 0.0 4448 1564 ? Ss 12:11 0:00 /var/lib/xymon/server/bin/xymonlaunch --config=/var/lib/xymon/server/etc/tasks.cfg --env=/var/lib/xymon/server/etc/xymonserver.cfg --log=/var/log/xymon/xymonlaunch.log --pidfile=/var/log/xymon/xymonlaunch.pid | |
xymon 10442 0.0 0.0 12216 3148 ? S 12:11 0:00 xymond --pidfile=/var/log/xymon/xymond.pid --restart=/var/lib/xymon/server/tmp/xymond.chk --checkpoint-file=/var/lib/xymon/server/tmp/xymond.chk --checkpoint-interval=600 --log=/var/log/xymon/xymond.log --admin-senders=127.0.0.1,127.0.0.1 --store-clientlogs=!msgs | |
xymon 10443 0.0 0.0 9400 1836 ? S 12:12 0:00 xymond_channel --channel=stachg --log=/var/log/xymon/history.log xymond_history --pidfile=/var/log/xymon/xymond_history.pid | |
xymon 10444 0.0 0.0 9396 1032 ? S 12:12 0:00 xymond_channel --channel=page --log=/var/log/xymon/alert.log xymond_alert --checkpoint-file=/var/lib/xymon/server/tmp/alert.chk --checkpoint-inte |
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
$ sudo systemctl status xymon.service -l | |
● xymon.service - Xymon | |
Loaded: loaded (/etc/systemd/system/xymon.service; enabled; vendor preset: enabled) | |
Active: inactive (dead) since Tue 2015-06-16 12:06:41 EDT; 1min 24s ago | |
Process: 10071 ExecStart=/var/lib/xymon/server/bin/xymon.sh start (code=exited, status=0/SUCCESS) | |
Main PID: 10071 (code=exited, status=0/SUCCESS) | |
Jun 16 12:06:41 myhost systemd[1]: Started Xymon. | |
Jun 16 12:06:41 myhost systemd[1]: Starting Xymon... |
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
$ cat /etc/systemd/system/xymon.service | |
[Unit] | |
Description=Xymon | |
[Service] | |
ExecStart=/bin/su xymon /var/lib/xymon/server/bin/xymon.sh start | |
ExecStart=/bin/su xymon /var/lib/xymon/server/bin/xymon.sh stop | |
[Install] | |
WantedBy=multi-user.target |
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
# Drop ICMP echo-request messages sent to broadcast or multicast addresses | |
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts | |
# Drop source routed packets | |
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route | |
# Enable TCP SYN cookie protection from SYN floods | |
echo 1 > /proc/sys/net/ipv4/tcp_syncookies | |
# Don't accept ICMP redirect messages |
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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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 -x | |
#=============================================================================== | |
# | |
# FILE: percona-xtrabackup.sh | |
# | |
# USAGE: ./percona-xtrabackup.sh | |
# | |
# DESCRIPTION: Forked from https://gist.github.com/jaygooby/5208373 | |
# | |
# OPTIONS: --- |
NewerOlder