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
| cookbook_file "/etc/init.d/set_hostname" do | |
| if node['dmi']['system']['manufacturer'] == "Dell Inc." | |
| source_file = "set_hostname-physical" | |
| else | |
| source_file = "set_hostname" | |
| end | |
| source = source_file | |
| owner "root" | |
| group "root" | |
| mode "0755" |
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/ruby | |
| require 'rubygems' | |
| require 'gelf' | |
| def send_gelf(ip,method,uri,code,size,referral) | |
| line = ip + " " + method + " " + uri + " " + code + " " + size + " " + referral | |
| n = GELF::Notifier.new("graylog2.posterdev.com", 12201) | |
| n.notify!(:host => "prod-nginx", :level => 1, :short_message => line, :_ip => ip, :_method => method, :_uri => uri, :_code => code, :_size => size, :_referral => referral) | |
| end |
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
| Report for slow logs: /var/log/mysql/mysql-slow.log | |
| 16.30k queries total, 8 unique | |
| Sorted by 't_sum' | |
| Grand Totals: Time 240.86k s, Lock 8 s, Rows sent 39.76k, Rows Examined 1.55G | |
| ______________________________________________________________________ 001 ___ | |
| Count : 7.80k (47.84%) | |
| Time : 119793.371699 s total, 15.358125 s avg, 10.015 ms to 240.771133 s max (49.74%) | |
| 95% of Time : 96388.931761 s total, 13.007953 s avg, 10.015 ms to 34.256583 s max |
NewerOlder