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
# An unique identifier for the head node and workers of this cluster. | |
cluster_name: cluster_name | |
# The maximum number of workers nodes to launch in addition to the head | |
# node. | |
max_workers: 16 | |
# The autoscaler will scale up the cluster faster with higher upscaling speed. | |
# E.g., if the task requires adding more nodes then autoscaler will gradually | |
# scale up the cluster in chunks of upscaling_speed*currently_running_nodes. |
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
class HttpDownloader(object): | |
def get_to_s3(self, http_get_source_url: str, bucket_name: str, key: str, max_concurrency: int = 4): | |
""" | |
Taken from https://amalgjose.com/2020/08/13/python-program-to-stream-data-from-a-url-and-write-it-to-s3/. | |
:param http_get_source_url: The url to download the data from. Should be a GET request. | |
:param bucket_name: The target bucket name. | |
:param key: The target S3 key. | |
:param max_concurrency: The maximum number of threads to upload concurrently. |
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
# Search for request line | |
\d\d [A-Za-z]* \d\d\d\d \d\d:\d\d:\d\d.\d\d\d \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d\d\d\d\+00:00 heroku router.*path="(.*)\?.*" host=.* request_id=.* fwd=".*" dyno=(.*) connect=.*ms service=(.*)ms status=.* bytes=.* Context | |
# Search for lines with CPU Load Avg | |
\d\d [A-Za-z]* \d\d\d\d \d\d:\d\d:\d\d.\d\d\d \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d\d\d\d\+00:00 heroku.*source=(.*) dyno=(.*) sample#load_avg_1m=.* sample#load_avg_5m=.* sample#load_avg_15m=.* Context | |
# Search for Memory | |
\d\d [A-Za-z]* \d\d\d\d \d\d:\d\d:\d\d.\d\d\d \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d\d\d\d\+00:00 heroku.*source=.* dyno=.* sample#memory_total=.* sample#memory_rss=.* sample#memory_cache=.* sample#memory_swap=.* sample#memory_pgpgin=.*pages sample#memory_pgpgout=.*pages |
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
.ruby-gemset | |
.ruby-version | |
.DS_Store |
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
/var/log/tomcat7/catalina.out /var/log/tomcat7/localhost_access_log.txt { | |
size 1M | |
missingok | |
rotate 5 | |
compress | |
notifempty | |
copytruncate | |
dateext | |
dateformat -%s | |
} |