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
{ | |
"checks": { | |
"memory": { | |
"command": "/etc/sensu/plugins/check-memory.sh -w :::system.mem_warning|128::: -c :::system.mem_critical|64:::", | |
"interval": 15, | |
"subscribers": [ | |
"memory" | |
] | |
} | |
} |
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 | |
# | |
# Evaluate free system memory from Linux based systems. | |
# | |
# Date: 2007-11-12 | |
# Author: Thomas Borger - ESG | |
# Date: 2012-04-02 | |
# Modified: Norman Harman - [email protected] | |
# | |
# The memory check is done with following command line: |
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
1. From the AWS EC2 Console go to "Key Pairs" and generate a new key pair (eg: NewKey.pem); Download the generated pem key, and chmod it to 0666 | |
2. Use the new pem key to generate a public key | |
$ ssh-keygen -y | |
When prompted, enter the path to NewKey.pem. This will generate NewKey.pub | |
Tip: Edit NewKey.pub and append the key's name so you can identify it easier in the next steps. | |
Just append a single space, then a tag/name for the key |
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
--- a/arch/x86/kernel/entry_64.S | |
+++ b/arch/x86/kernel/entry_64.S | |
@@ -1259,7 +1259,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \ | |
idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK | |
idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK | |
-idtentry stack_segment do_stack_segment has_error_code=1 paranoid=1 | |
+idtentry stack_segment do_stack_segment has_error_code=1 | |
#ifdef CONFIG_XEN | |
idtentry xen_debug do_debug has_error_code=0 |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
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
useragent | |
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/39.0.2171.65 Chrome/39.0.2171.65 Safari/537.36" | |
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36" | |
"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)" | |
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36" | |
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)" | |
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; BRI/1; .NET4.0E; McAfee)" | |
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; AskTbOVO2/5.17.6.42067; playbrytetoolbar_Playbryte)" | |
"M |
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
0 - Filesystem | |
1 - Directory | |
2 - File | |
3 - Process | |
4 - Host | |
5 - System | |
6 - Program (?) | |
7 - Fifo (?) |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<monit id="d4e0fa0729268bdb7bd35be98bdf2d33" incarnation="1414691060" version="5.3.2"> | |
<server> | |
<uptime>30</uptime> | |
<poll>120</poll> | |
<startdelay>0</startdelay> | |
<localhostname>dev</localhostname> | |
<controlfile>/etc/monit/monitrc</controlfile> | |
<httpd> | |
<address>192.168.1.104</address> |
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
1. Assign a secondary private ip to the instance | |
- Select the instance, then choose Actions > Mange Private IP Addresses | |
- In the Manage Private IP Addresses dialog box, Click "Assign new IP" | |
- Enter a specific IP address that's within the subnet range for the instance (or just leave the field blank to have it choose one for you) | |
- (Optional) Select Allow reassignment to allow the secondary private IP address to be reassigned if it is already assigned to another network interface. | |
- Click Yes, Update, and then click Close. | |
2. Add the new IP to the instance's network interface. | |
- SSH into the instance | |
- $ sudo ip addr add new.ip.address.here/20 dev eth0 |
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
## Show current number of open connections | |
SHOW STATUS WHERE `variable_name` = 'Threads_connected'; | |
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
<VirtualHost *:80> | |
ServerName domain.com | |
ServerAlias www.domain.com | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/domain.com/html | |
<Directory /> | |
Options -Indexes +FollowSymLinks +MultiViews |