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/env python | |
import requests | |
import sys | |
import json | |
from datetime import date, timedelta | |
#Your PagerDuty API key. A read-only key will work for this. | |
AUTH_TOKEN = 'YOUR_API_KEY' | |
#The API base url, make sure to include the subdomain |
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/env python | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
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/env python | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
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
2011/11/23 01:49:22 ossec-execd: INFO: Started (pid: 21856). | |
2011/11/23 01:49:22 ossec-agentd(1410): INFO: Reading authentication keys file. | |
2011/11/23 01:49:22 ossec-agentd(1750): ERROR: No remote connection configured. Exiting. | |
2011/11/23 01:49:25 ossec-syscheckd(1210): ERROR: Queue '/var/ossec/queue/ossec/queue' not accessible: 'Connection refused'. | |
2011/11/23 01:49:25 ossec-rootcheck(1210): ERROR: Queue '/var/ossec/queue/ossec/queue' not accessible: 'Connection refused'. | |
2011/11/23 01:49:31 ossec-logcollector(1210): ERROR: Queue '/var/ossec/queue/ossec/queue' not accessible: 'Connection refused'. | |
2011/11/23 01:49:31 ossec-logcollector(1211): ERROR: Unable to access queue: '/var/ossec/queue/ossec/queue'. Giving up.. | |
2011/11/23 01:49:33 ossec-syscheckd(1210): ERROR: Queue '/var/ossec/queue/ossec/queue' not accessible: 'Connection refused'. | |
2011/11/23 01:49:33 ossec-rootcheck(1210): ERROR: Queue '/var/ossec/queue/ossec/queue' not accessible: 'Connection refused'. | |
2011/11/23 01:49:46 ossec-syscheckd(1210): ER |
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
$InputFileName /var/log/spanning/mailcli_production_daemon_19.log | |
$InputFileTag mailcli_production_daemon_19.log | |
$InputFileStateFile mailcli_production_daemon_19.log | |
$InputFileSeverity info | |
$InputFileFacility local7 | |
$InputRunFileMonitor |
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
/Library/Ruby/Gems/1.8/gems/knife-ec2-0.5.8/lib/chef/knife/ec2_base.rb:74:in `msg_pair': undefined method `empty?' for true:TrueClass (NoMethodError) | |
from /Library/Ruby/Gems/1.8/gems/knife-ec2-0.5.8/lib/chef/knife/ec2_server_create.rb:233:in `run' | |
from /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife.rb:391:in `run_with_pretty_exceptions' | |
from /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife.rb:166:in `run' | |
from /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/application/knife.rb:128:in `run' | |
from /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/knife:25 | |
from /usr/bin/knife:19:in `load' | |
from /usr/bin/knife:19 |
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
One the client: | |
root@ip-10-0-2-186:~# updatedb | |
root@ip-10-0-2-186:~# locate client.pem | |
/usr/share/doc/libssl-dev/demos/tunala/A-client.pem.gz | |
On the server: | |
[csmith@opschef01 Fri Aug 26 10:00 PM] ~/.chef | |
$ knife node list |
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
~# tail /var/log/chef/client.log | |
[Fri, 26 Aug 2011 20:27:00 +0000] INFO: Forked, in 2335. Priveleges: 0 0 | |
[Fri, 26 Aug 2011 20:27:05 +0000] INFO: *** Chef 0.10.4 *** | |
[Fri, 26 Aug 2011 20:27:06 +0000] INFO: Client key /etc/chef/client.pem is not present - registering | |
[Fri, 26 Aug 2011 20:27:09 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Connection refused - connect(2) | |
[Fri, 26 Aug 2011 20:27:09 +0000] ERROR: Server returned error for http://chef.spanning.co:4000/clients, retrying 1/5 in 4s | |
[Fri, 26 Aug 2011 20:27:14 +0000] INFO: HTTP Request Returned 409 Conflict: Client already exists | |
[Fri, 26 Aug 2011 20:27:14 +0000] INFO: HTTP Request Returned 403 Forbidden: You are not allowed to take this action. | |
[Fri, 26 Aug 2011 20:27:14 +0000] ERROR: Net::HTTPServerException: 403 "Forbidden" | |
[Fri, 26 Aug 2011 20:27:14 +0000] FATAL: Stacktrace dumped to /var/cache/chef/chef-stacktrace.out |
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
[csmith@opschef01 Fri Aug 26 08:48 PM] ~/.chef | |
$ knife client list | |
chef-validator | |
chef-webui | |
chickenfry | |
csmith | |
csmith_opslog02 | |
i-978d81f6 | |
ops-chef-01 | |
root |