Skip to content

Instantly share code, notes, and snippets.

View Keybase.md

Keybase proof

I hereby claim:

  • I am silviabotros on github.
  • I am silvia (https://keybase.io/silvia) on keybase.
  • I have a public key ASAKj_LUu1aPHu0BBHCJluEELZfKxNJD65E5SkpeUAWyoAo

To claim this, I am signing this object:

View blog.sample4.rb
{
"checks": {
"add_table_partitions": {
"command": "/usr/local/pdb/bin/pdb-parted --add --interval m +7m.startof h=localhost,u=specialdbuser,p=:::redacted_partition_password:::,D=mydb,t=special_table >> /var/log/partition_rotation.log 2>&1",
"handlers": [
"default_handler",
"special_dba_handler"
],
"standalone": true,
"interval": 86400,
View blog.sample3.rb
sensu_check 'add_table_partitions' do
command "/usr/local/pdb/bin/pdb-parted --add --interval d +7d.startof h=localhost,u=specialdbuser,p=:::redacted_partition_password:::,D=mydb,t=special_table >> /var/log/partition_rotation.log 2>&1"
handlers %w(default_handler special_dba_handler)
interval 86400
standalone true
additional(:occurrences => 3, :notification => "#{node['hostname']} failed adding partitions to important table. See log file in /var/log/mail_send_cancel_pause.log")
end
View bog.sample2.rb
"redact": [
"other_password",
"password"
]
View blog.sample1.rb
{
"checks": {
"mysql_alive": {
"command": "mysql-alive.rb -h <IP> -d mysql -u :::mysql.user|sensu::: -p :::mysql.password:::",
"handlers": [
"default"
],
"standalone": true,
"interval": 10,
"notification": "OMG MySQL is dead!"
View gist:88647e4f203460eb2ba0
### Keybase proof
I hereby claim:
* I am silviabotros on github.
* I am silvia (https://keybase.io/silvia) on keybase.
* I have a public key whose fingerprint is 4243 81DC 1AE4 4E17 7F41 0797 5596 48F7 3B7B 5DC5
To claim this, I am signing this object:
View gist:4119eb7c588710c3a815
Sep 13 10:26:41 silvias-MacBookPro-2.local perl[75396] <Error>: ImageIO: CGImageDestinationFinalize image destination must have at least one image
2014-09-13 10:26:41.726 perl5.18[75396:310408] CGImageDestinationFinalize failed for output type 'public.tiff'
**** ERROR **** PerlObjCBridge:: convertPerlToObjC(): Referenced thingy not blessed
**** ERROR **** PerlObjCBridge:: convertArg() for index 2: convertPerlToObjC() failed
**** ERROR **** PerlObjCBridge:: sendObjcMessage: Error converting argument 1 for message "setObject:forKey:"
**** ERROR **** PerlObjCBridge: error [1] sending message [__NSDictionaryM setObject:forKey:] at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/PerlObjCBridge.pm line 248.
View gist:6601384
#!/usr/bin/env bash
set -eu
DEFAULT_SERVER=$(knife block list | grep '\[ Currently Selected \]' | awk '{ print $2 }')
ALL_SERVERS=$(knife block list | grep '*' | awk '{ print $2 }')
for SERVER in $ALL_SERVERS; do
knife block use $SERVER
$*
@silviabotros
silviabotros / pt_stalk replication delay
Created Jun 21, 2012
seconds behind function for pt_stalk
View pt_stalk replication delay
trg_plugin() {
mysql -e "show slave status\G" | grep "Seconds_Behind_Master" | awk '{print $2}'
}